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

# Create group

> Create a WhatsApp group with participants and settings.

Creates a group with a `name` and a list of `participants` (numbers in
international format). Supports advanced settings at creation time:

* `admin_only_messages` — only admins can send messages.
* `admin_approval` — joining requires admin approval.
* `description`, `picture` — group metadata.
* `disappearing_messages` — disappearing messages (`24h`, `7d`, `90d`).

> [!NOTE]
>
> For large groups, use `async` to create the group asynchronously and
> avoid timeouts. Participants are added in the background.

## Communities

### Create a community

Send `is_parent: true`. WhatsApp creates the community together with its
**announcement group** and a **General** subgroup.

```json theme={null}
{
  "sessionId": "my-session",
  "name": "My Community",
  "participants": ["5511999999999"],
  "is_parent": true
}
```

* The community starts with only you as admin. `participants` is still
  required, but it is ignored in this case.
* The response carries the community JID. The JIDs of the announcement group
  and of General show up in `GET /api/v1/groups/list`;
  in each group's `/info`, `is_community`, `linked_parent_jid` and
  `is_announcement_group` tell its role.
* Members join through the announcement group: use `add` on
  `/groups/{groupId}/participants` with its JID. An `add` on the community JID
  is redirected to the announcement group.
* Admins are set on the community JID, with `promote`/`demote`. The person must
  already be a member.

### Create a group inside the community

Send `parent_jid` with the community JID. The group is created already linked
to it, with the given `participants`.

```json theme={null}
{
  "sessionId": "my-session",
  "name": "Class A",
  "participants": ["5511999999999"],
  "parent_jid": "120363432278592836@g.us"
}
```

`parent_jid` can't be used together with `is_parent`.

### Link an existing group

To move a group that already exists into the community, use
`POST /api/v1/groups/{groupId}/link` with the community JID in `parent_jid`.
The session must be a community admin.

```json theme={null}
{
  "sessionId": "my-session",
  "parent_jid": "120363432278592836@g.us"
}
```

> [!NOTE]
>
> Linking a group seconds after creating it usually fails. To get a new group
> inside the community, create it with `parent_jid`.


## OpenAPI

````yaml api-reference/openapi.en.json POST /api/v1/groups/create
openapi: 3.1.0
info:
  title: D-API - Complete WhatsApp Infrastructure
  description: >-
    A scalable, robust solution for automation managers, SaaS products and end
    users who need a reliable WhatsApp integration. It offers multiple
    simultaneous instances, real-time webhooks, an intuitive dashboard and a
    documented REST API with 99.9% uptime and latency under 30ms.
  version: 1.2.1
  contact:
    name: Suporte D-API
    email: suporte@d-api.cloud
    url: https://d-api.cloud
servers:
  - url: https://api.d-api.cloud
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: Home
    description: Base endpoints
  - name: Sessions
    description: Endpoints for managing sessions
  - name: Messages
    description: Endpoints for sending messages
  - name: Cloud API
    description: >-
      WhatsApp Official API (Meta Cloud API): manual connection, template
      management (list/create/delete) and template sending.
  - name: IVR Calls
    description: 'Voice call dispatch (IVR): single or bulk, with audio or an IVR flow.'
  - name: SMS
    description: 'SMS sending: single or bulk.'
  - name: Commands
    description: >-
      Look up asynchronous commands (async: true) by the commandId returned when
      enqueued.
paths:
  /api/v1/groups/create:
    post:
      tags:
        - Groups
      summary: Create group (Enhanced)
      description: >-
        Creates a new WhatsApp group with participants and optional advanced
        settings (admin-only messages, locked settings, description,
        disappearing messages, etc.)
      operationId: postApiV1GroupsCreate
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                sessionId:
                  minLength: 1
                  type: string
                name:
                  minLength: 1
                  type: string
                participants:
                  minItems: 1
                  type: array
                  items:
                    type: string
                async:
                  anyOf:
                    - type: boolean
                    - type: string
                is_parent:
                  type: boolean
                parent_jid:
                  minLength: 1
                  type: string
                admin_only_messages:
                  type: boolean
                lock_settings:
                  type: boolean
                admin_approval:
                  type: boolean
                admin_add_only:
                  type: boolean
                description:
                  minLength: 1
                  type: string
                picture:
                  minLength: 1
                  type: string
                disappearing_messages:
                  anyOf:
                    - const: 24h
                      type: string
                    - const: 7d
                      type: string
                    - const: 90d
                      type: string
                    - const: 'off'
                      type: string
              required:
                - sessionId
                - name
                - participants
          multipart/form-data:
            schema:
              type: object
              properties:
                sessionId:
                  minLength: 1
                  type: string
                name:
                  minLength: 1
                  type: string
                participants:
                  minItems: 1
                  type: array
                  items:
                    type: string
                async:
                  anyOf:
                    - type: boolean
                    - type: string
                is_parent:
                  type: boolean
                parent_jid:
                  minLength: 1
                  type: string
                admin_only_messages:
                  type: boolean
                lock_settings:
                  type: boolean
                admin_approval:
                  type: boolean
                admin_add_only:
                  type: boolean
                description:
                  minLength: 1
                  type: string
                picture:
                  minLength: 1
                  type: string
                disappearing_messages:
                  anyOf:
                    - const: 24h
                      type: string
                    - const: 7d
                      type: string
                    - const: 90d
                      type: string
                    - const: 'off'
                      type: string
              required:
                - sessionId
                - name
                - participants
          text/plain:
            schema:
              type: object
              properties:
                sessionId:
                  minLength: 1
                  type: string
                name:
                  minLength: 1
                  type: string
                participants:
                  minItems: 1
                  type: array
                  items:
                    type: string
                async:
                  anyOf:
                    - type: boolean
                    - type: string
                is_parent:
                  type: boolean
                parent_jid:
                  minLength: 1
                  type: string
                admin_only_messages:
                  type: boolean
                lock_settings:
                  type: boolean
                admin_approval:
                  type: boolean
                admin_add_only:
                  type: boolean
                description:
                  minLength: 1
                  type: string
                picture:
                  minLength: 1
                  type: string
                disappearing_messages:
                  anyOf:
                    - const: 24h
                      type: string
                    - const: 7d
                      type: string
                    - const: 90d
                      type: string
                    - const: 'off'
                      type: string
              required:
                - sessionId
                - name
                - participants
      responses:
        '200':
          description: Successful response
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: 'API Key for authentication. Format: <API_KEY>'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.