> ## Documentation Index
> Fetch the complete documentation index at: https://docs.oxenty.api.br/llms.txt
> Use this file to discover all available pages before exploring further.

# Criar Grupo

> Cria um novo grupo do WhatsApp

Cria um novo grupo do WhatsApp com os participantes especificados.

<Warning>
  A criação de grupos tem rate limit de **3/minuto** para evitar bloqueios do WhatsApp.
</Warning>

## Request Body

<ParamField body="sessionId" type="string" required>
  ID da sessão.
</ParamField>

<ParamField body="subject" type="string" required>
  Nome do grupo (máximo 25 caracteres).
</ParamField>

<ParamField body="participants" type="string[]" required>
  Lista de JIDs dos participantes iniciais.

  **Mínimo:** 1 participante\
  **Máximo:** 256 participantes
</ParamField>

## Resposta

<ResponseField name="success" type="boolean">
  Se a operação foi bem-sucedida.
</ResponseField>

<ResponseField name="group" type="object">
  Dados do grupo criado.

  <Expandable title="Campos">
    <ResponseField name="id" type="string">
      JID do grupo.
    </ResponseField>

    <ResponseField name="subject" type="string">
      Nome do grupo.
    </ResponseField>

    <ResponseField name="owner" type="string">
      JID do criador.
    </ResponseField>

    <ResponseField name="creation" type="number">
      Timestamp de criação.
    </ResponseField>

    <ResponseField name="participants" type="array">
      Lista de participantes.
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL theme={"system"}
  curl -X POST "https://api.oxenty.api.br/api/groups" \
    -H "X-API-Key: YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "sessionId": "550e8400-e29b-41d4-a716-446655440000",
      "subject": "Equipe de Vendas",
      "participants": [
        "5511999999999@s.whatsapp.net",
        "5511888888888@s.whatsapp.net"
      ]
    }'
  ```

  ```typescript TypeScript theme={"system"}
  const group = await client.groups.create(sessionId, {
    subject: 'Equipe de Vendas',
    participants: [
      '5511999999999@s.whatsapp.net',
      '5511888888888@s.whatsapp.net',
    ],
  });
  ```

  ```python Python theme={"system"}
  group = client.groups.create(
      session_id,
      subject='Equipe de Vendas',
      participants=[
          '5511999999999@s.whatsapp.net',
          '5511888888888@s.whatsapp.net'
      ]
  )
  ```
</RequestExample>

<ResponseExample>
  ```json 201 Created theme={"system"}
  {
    "success": true,
    "group": {
      "id": "120363123456789012@g.us",
      "subject": "Equipe de Vendas",
      "owner": "5511777777777@s.whatsapp.net",
      "creation": 1705315200,
      "participants": [
        {
          "id": "5511777777777@s.whatsapp.net",
          "admin": "superadmin"
        },
        {
          "id": "5511999999999@s.whatsapp.net",
          "admin": null
        },
        {
          "id": "5511888888888@s.whatsapp.net",
          "admin": null
        }
      ]
    }
  }
  ```
</ResponseExample>
