> For the complete documentation index, see [llms.txt](https://docs.astraapi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.astraapi.com/integrando/grupos/criar-grupo.md).

# Criar grupo

{% hint style="info" %}
Assim como no Whatsapp Web você vai precisar adicionar ao menos um contato para conseguir criar um grupo.
{% endhint %}

### Exemplo de body a ser enviado

```json
{
    "name": "teste",
    "participants": ["557999070094@s.whatsapp.net", "557998416831@s.whatsapp.net"]
}
```

{% hint style="danger" %} <mark style="color:red;">Você não deve passar o número conectado a</mark> <mark style="color:red;"></mark><mark style="color:red;">**astraApi**</mark> <mark style="color:red;"></mark><mark style="color:red;">que é responsável pela criação do grupo no array de números que vão compor o grupo.</mark>
{% endhint %}

<mark style="color:green;">`POST`</mark> `https://api.astraapi.com/api/group/{{instanceId}}`

#### Path Parameters

| Name                                         | Type   | Description         |
| -------------------------------------------- | ------ | ------------------- |
| instanceId<mark style="color:red;">\*</mark> | Number | Número da instancia |

#### Headers

| Name                                            | Type   | Description            |
| ----------------------------------------------- | ------ | ---------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | Seu token de segurança |

#### Request Body

| Name                                   | Type      | Description                     |
| -------------------------------------- | --------- | ------------------------------- |
| name<mark style="color:red;">\*</mark> | String    | Nome do grupo                   |
| participants                           | String\[] | Números dos integrates do grupo |

{% tabs %}
{% tab title="200: OK Dados do grupo" %}

```json
{
    "id": "120363160697014651@g.us",
    "subject": "teste",
    "subjectOwner": "98989@s.whatsapp.net",
    "subjectTime": 1686709379,
    "size": null,
    "creation": 1686709379,
    "owner": "8989898@s.whatsapp.net",
    "restrict": false,
    "announce": false,
    "participants": [
        {
            "id": "56595959@s.whatsapp.net",
            "admin": "superadmin"
        },
        {
            "id": "5659656@s.whatsapp.net",
            "admin": null
        },
        {
            "id": "8798989@s.whatsapp.net",
            "admin": null
        }
    ]
}
```

{% endtab %}
{% endtabs %}
