> ## 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.

# Send a broadcast to an audience

> Sends an approved WhatsApp template to an audience defined inline. The audience is one of: a saved `group`, an ad-hoc set of `contacts`, a `filter` over contact/conversation attributes, or an imported list of `recipients` (phone numbers with per-row variables). Only contacts with a WhatsApp conversation are reached. Delivery is attempted per recipient; the response reports how many succeeded and failed.

Rate limit: 10 requests per minute.



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/broadcasts
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/broadcasts:
    post:
      summary: Send a broadcast to an audience
      description: >-
        Sends an approved WhatsApp template to an audience defined inline. The
        audience is one of: a saved `group`, an ad-hoc set of `contacts`, a
        `filter` over contact/conversation attributes, or an imported list of
        `recipients` (phone numbers with per-row variables). Only contacts with
        a WhatsApp conversation are reached. Delivery is attempted per
        recipient; the response reports how many succeeded and failed.


        Rate limit: 10 requests per minute.
      operationId: sendAudienceBroadcast
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - templateName
                - audience
              properties:
                templateName:
                  type: string
                  maxLength: 512
                  description: Name of an approved WhatsApp template.
                  example: order_status_update
                language:
                  type: string
                  default: en_US
                  example: en_US
                parameters:
                  type: array
                  items:
                    type: string
                    maxLength: 1024
                  description: >-
                    Default {{1}}, {{2}}, … values for group/contacts/filter
                    audiences. Ignored for `recipients` rows that carry their
                    own values.
                  example:
                    - Sara
                    - A-1043
                    - Shipped
                audience:
                  $ref: '#/components/schemas/BroadcastAudience'
      responses:
        '201':
          description: Broadcast processed
          content:
            application/json:
              schema:
                type: object
                properties:
                  broadcast:
                    $ref: '#/components/schemas/Broadcast'
        '400':
          description: No reachable recipients in the audience
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: NO_WHATSAPP_RECIPIENTS
                  message: >-
                    No contacts in this audience have a WhatsApp conversation to
                    deliver to
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  schemas:
    BroadcastAudience:
      description: Who to send to. Exactly one shape.
      oneOf:
        - type: object
          required:
            - type
            - groupId
          properties:
            type:
              type: string
              enum:
                - group
            groupId:
              type: string
        - type: object
          required:
            - type
            - contactIds
          properties:
            type:
              type: string
              enum:
                - contacts
            contactIds:
              type: array
              items:
                type: string
              minItems: 1
        - type: object
          required:
            - type
            - filter
          properties:
            type:
              type: string
              enum:
                - filter
            filter:
              $ref: '#/components/schemas/BroadcastAudienceFilter'
        - type: object
          required:
            - type
            - recipients
          properties:
            type:
              type: string
              enum:
                - recipients
            recipients:
              type: array
              minItems: 1
              items:
                type: object
                required:
                  - phone
                properties:
                  phone:
                    type: string
                    example: '+15551234567'
                  parameters:
                    type: array
                    items:
                      type: string
                    description: Per-recipient {{1}}, {{2}}, … values.
                    example:
                      - Sara
                      - A-1043
    Broadcast:
      type: object
      properties:
        id:
          type: string
          example: cmbxh3c4d0006ph01u2v3w4x5
        groupId:
          type:
            - string
            - 'null'
          example: cmbxh1a2b0004ph01q8r9s0t1
        groupName:
          type: string
          example: VIP customers
        channel:
          type: string
          example: whatsapp
        templateName:
          type: string
          example: order_status_update
        templateLanguage:
          type: string
          example: en_US
        status:
          type: string
          enum:
            - completed
            - partial
            - failed
          description: >-
            `completed` — every recipient succeeded; `partial` — some failed;
            `failed` — none were delivered.
          example: completed
        totalRecipients:
          type: integer
          description: Group members who had a WhatsApp conversation to deliver to.
          example: 37
        sentCount:
          type: integer
          example: 37
        failedCount:
          type: integer
          example: 0
        createdAt:
          type: string
          format: date-time
          example: '2026-06-15T12: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
    BroadcastAudienceFilter:
      type: object
      description: >-
        Attribute and conversation filters. Combined with AND; omit a field to
        ignore it.
      properties:
        tagIds:
          type: array
          items:
            type: string
        countries:
          type: array
          items:
            type: string
          description: ISO 3166-1 alpha-2 country codes derived from the contact's phone.
          example:
            - SA
            - AE
        assignedAgentIds:
          type: array
          items:
            type: string
        teamIds:
          type: array
          items:
            type: string
          description: >-
            Agent group ids; matches contacts whose last assigned agent is in
            any of these teams.
        statuses:
          type: array
          items:
            type: string
            enum:
              - open
              - closed
        unreadOnly:
          type: boolean
        languages:
          type: array
          items:
            type: string
          example:
            - ar
            - en
        lastActivityFrom:
          type: string
          format: date-time
        lastActivityTo:
          type: string
          format: date-time
  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_`.

````