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

# Create group

> Creates a group with a name and an initial participant list. The response includes who joined (`added`) and who failed (`failed`).



## OpenAPI

````yaml /en/api-reference/openapi.json post /groups/create
openapi: 3.1.0
info:
  title: Zapfy API
  description: >-
    Multi-tenant WhatsApp API. Send messages and manage webhooks through a
    single surface.
  version: 1.0.0
servers:
  - url: https://api.zapfy.io/v1
security:
  - accountToken: []
paths:
  /groups/create:
    post:
      tags:
        - Groups
      summary: Create group
      description: >-
        Creates a group with a name and an initial participant list. The
        response includes who joined (`added`) and who failed (`failed`).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateGroupBody'
      responses:
        '200':
          $ref: '#/components/responses/GroupCreated'
        '400':
          $ref: '#/components/responses/Error'
        '401':
          $ref: '#/components/responses/Error'
        '403':
          $ref: '#/components/responses/Error'
        '502':
          $ref: '#/components/responses/Error'
      security:
        - instanceToken: []
components:
  schemas:
    CreateGroupBody:
      type: object
      required:
        - name
        - participants
      properties:
        name:
          type: string
          example: Family
          description: Name of the group to create.
        participants:
          type: array
          minItems: 1
          items:
            $ref: '#/components/schemas/Recipient'
          description: Initial participants (phones in E.164).
          example:
            - '5511988887777'
    Recipient:
      type: string
      description: >-
        Recipient: a phone in E.164 (with or without `+`, spaces or formatting,
        e.g. `5511999998888` or `+55 11 99999-8888`) or a group id. To send to a
        group, use the group id (from `GET /groups`).
      example: '5511999998888'
    GroupCreatedResult:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/GroupId'
          description: the id of the created group (returned by GET /groups).
        name:
          type: string
          example: Family
          description: Name of the created group.
        owner:
          type: string
          description: Group owner phone in E.164.
          example: '5511999998888'
        added:
          type: array
          items:
            type: string
          description: Phones successfully added.
          example:
            - '5511988887777'
        failed:
          type: array
          items:
            type: string
          description: Participants that could not be added.
          example: []
    GroupId:
      type: string
      description: the group id (returned by GET /groups).
      example: '120363012345678901'
  responses:
    GroupCreated:
      description: Group created.
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                $ref: '#/components/schemas/GroupCreatedResult'
    Error:
      description: Error.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                example: Instance not found
  securitySchemes:
    accountToken:
      type: http
      scheme: bearer
      description: Account token (`zpfy_acct_...`) — manages instances and webhooks.
    instanceToken:
      type: http
      scheme: bearer
      description: Instance token (`zpfy_inst_...`) — sends messages.

````