# Criando organização filha

#### Exemplo de mutation

```graphql
mutation {
  createOrganization(organization: { 
    name: "Org filha 1",
    locale: {
      country: "BR",
      language: "pt-BR",
      timezone: "America/Sao_Paulo",
      date_format: DD_MM_YYYY
    }
  }) {
    id
    name
    cnpj
    default_email_templates_ids
    settings { webhook_url }
    groups { id name } # Por padrão são criados "Administrador" e "Sem grupo"
  }
}

```

#### Parâmetros opcionais&#x20;

```typescript
organization.cnpj: "29423653000165"
organization.webhook_url: "https://asdf.free.beeceptor.com"
organization.default_email_templates_ids: [123, 312] // Todos os templates de email padrões (Um padrão para cada tipo de template, "Solicitação de assinatura" e "Assinatura com sucesso")
```

### Parâmetros

#### `organization`— `ChildOrganizationInput!`

| Campo                         | Tipo          | Obrigatório | Descrição                               |
| ----------------------------- | ------------- | ----------- | --------------------------------------- |
| `name`                        | `String`      | Não         | Nome da organização.                    |
| `cnpj`                        | `String`      | Não         | CNPJ da organização.                    |
| `locale`                      | `LocaleInput` | Não         | Configurações regionais da organização. |
| `default_email_templates_ids` | `[Int]`       | Não         | IDs dos templates de e-mail padrão.     |

#### `locale`— `LocaleInput`

| Campo         | Tipo             | Descrição                                               |
| ------------- | ---------------- | ------------------------------------------------------- |
| `country`     | `String`         | País. Exemplo: `BR`.                                    |
| `language`    | `String`         | Idioma. Exemplo: `pt-BR`.                               |
| `timezone`    | `String`         | Fuso horário. Exemplo: `America/Sao_Paulo`.             |
| `date_format` | `DateFormatEnum` | Formato de data. Valores: `DD_MM_YYYY` ou `MM_DD_YYYY`. |

### Exemplo de request

```json
{
  "organization": {
    "name": "Empresa Exemplo Ltda",
    "cnpj": "29423653000165",
    "locale": {
      "country": "BR",
      "language": "pt-BR",
      "timezone": "America/Sao_Paulo",
      "date_format": "DD_MM_YYYY"
    },
    "default_email_templates_ids": [1, 2, 3]
  }
}
```

### Exemplo de resposta

```json
{
  "data": {
    "createOrganization": {
      "id": 123,
      "uuid": "b4f3d8c0-0000-0000-0000-000000000000",
      "name": "Empresa Exemplo Ltda",
      "cnpj": "00.000.000/0000-00",
      "plan": "FREE",
      "default_email_templates_ids": [1, 2, 3],
      "created_at": "2026-05-11T10:00:00-03:00"
    }
  }
}
```

### Retorno

A mutation retorna um objeto `EnterpriseChildOrganization`.

| Campo                         | Tipo               | Descrição                                             |
| ----------------------------- | ------------------ | ----------------------------------------------------- |
| `id`                          | `Int!`             | ID interno da organização.                            |
| `uuid`                        | `String`           | UUID da organização.                                  |
| `name`                        | `String`           | Nome da organização.                                  |
| `cnpj`                        | `CNPJScalar`       | CNPJ da organização.                                  |
| `plan`                        | `PipefyPlansEnum!` | Plano da organização. Valores: `FREE` ou `UNLIMITED`. |
| `default_email_templates_ids` | `[Int]`            | IDs dos templates de e-mail padrão.                   |
| `settings`                    | `Setting`          | Configurações da organização.                         |
| `groups`                      | `[Group]`          | Grupos da organização.                                |
| `created_at`                  | `TimestampScalar`  | Data de criação.                                      |

```
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.autentique.com.br/api/corporate/mutations/gestao-de-organizacoes-filhas/criando-organizacao-filha.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
