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

# Create a contact group

> Creates a broadcast contact group. Members are contacts of this workspace — list them with `GET /api/v1/contacts` to find their IDs. Only members who have a WhatsApp conversation can receive a broadcast.

Rate limit: 30 requests per minute.



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/contact-groups
openapi: 3.1.0
info:
  title: Adraa Inbox API
  description: >-
    Public REST API for Adraa Inbox. Assign agents to conversations and send
    messages from your own systems. Authenticate every request with a workspace
    API token.
  version: 1.0.0
  contact:
    email: support@adraa.ai
servers:
  - url: https://api.inbox.adraa.ai
    description: Production
security:
  - apiToken: []
paths:
  /api/v1/contact-groups:
    post:
      summary: Create a contact group
      description: >-
        Creates a broadcast contact group. Members are contacts of this
        workspace — list them with `GET /api/v1/contacts` to find their IDs.
        Only members who have a WhatsApp conversation can receive a broadcast.


        Rate limit: 30 requests per minute.
      operationId: createContactGroup
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - name
              properties:
                name:
                  type: string
                  maxLength: 80
                  description: Group name. Must be unique within the workspace.
                  example: VIP customers
                description:
                  type: string
                  maxLength: 240
                  description: Optional description of the audience.
                  example: High-value accounts
                memberIds:
                  type: array
                  items:
                    type: string
                  description: >-
                    Contact IDs to add to the group. Each must belong to this
                    workspace.
                  example:
                    - cmbxgy7kq0002ph01u2v3w4x5
      responses:
        '201':
          description: The created group
          content:
            application/json:
              schema:
                type: object
                properties:
                  group:
                    $ref: '#/components/schemas/ContactGroup'
        '400':
          description: >-
            Invalid name or one or more member IDs are not contacts of this
            workspace
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: INVALID_GROUP_MEMBERS
                  message: >-
                    One or more selected contacts do not belong to this
                    workspace
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  schemas:
    ContactGroup:
      type: object
      properties:
        id:
          type: string
          example: cmbxh1a2b0004ph01q8r9s0t1
        name:
          type: string
          example: VIP customers
        description:
          type:
            - string
            - 'null'
          example: High-value accounts
        memberCount:
          type: integer
          example: 42
        whatsappCount:
          type: integer
          description: How many members can be reached on WhatsApp.
          example: 37
        members:
          type: array
          items:
            $ref: '#/components/schemas/ContactGroupMember'
        createdAt:
          type: string
          format: date-time
          example: '2026-06-14T09:00:00.000Z'
        updatedAt:
          type: string
          format: date-time
          example: '2026-06-14T09:00:00.000Z'
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: Machine-readable error code.
            message:
              type: string
              description: Human-readable explanation.
            details:
              description: Field-level details for validation errors.
              type: array
              items:
                type: object
                properties:
                  field:
                    type: string
                  message:
                    type: string
    ContactGroupMember:
      type: object
      properties:
        id:
          type: string
          description: Contact ID.
          example: cmbxgy7kq0002ph01u2v3w4x5
        name:
          type: string
          example: Sara
        email:
          type:
            - string
            - 'null'
          example: null
        phone:
          type:
            - string
            - 'null'
          example: '+966500000000'
        hasWhatsapp:
          type: boolean
          description: >-
            Whether this contact has a WhatsApp conversation and can receive a
            broadcast.
          example: true
        channels:
          type: array
          items:
            type: string
          example:
            - whatsapp
  responses:
    Unauthorized:
      description: Missing, invalid, or revoked API token
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: INVALID_API_TOKEN
              message: Invalid or revoked API token
  securitySchemes:
    apiToken:
      type: http
      scheme: bearer
      description: >-
        Workspace API token created in Settings → API. Tokens start with
        `adraa_`.

````