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

# Add recipients

> Add up to 1000 recipients to a draft broadcast. Duplicates are skipped.

Recipients use Meta's component syntax with body, header, and button components.




## OpenAPI

````yaml /api/platform/v1/openapi-platform.yaml post /whatsapp/broadcasts/{broadcast_id}/recipients
openapi: 3.1.0
info:
  title: Kapso Platform API
  version: 0.2.0
  description: >
    Build WhatsApp messaging into your product. Manage customers, connect phone
    numbers, send broadcasts, and handle conversations.
servers:
  - url: https://api.kapso.ai/platform/v1
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: Customers
    description: Manage customer accounts
  - name: Setup Links
    description: WhatsApp onboarding via embedded signup
  - name: Phone Numbers
    description: Connect and manage WhatsApp numbers
  - name: Webhooks
    description: Subscribe to WhatsApp events
  - name: Display Names
    description: Update WhatsApp business display names
  - name: Broadcasts
    description: |
      Send template messages at scale

      **Alpha**: This API is in alpha and subject to change
  - name: Conversations
    description: Manage conversation state
  - name: Media
    description: Upload media files for WhatsApp messaging
  - name: Users
    description: Manage project team members
  - name: Inbox Embeds
    description: Create and manage embeddable inbox access links
  - name: Webhook Deliveries
    description: View webhook delivery attempts and their status
  - name: External API Logs
    description: View logs of external API calls made by the project
  - name: Log Search
    description: Search Logs V2 events across API, Meta, workflow, and webhook sources
  - name: Provider Models
    description: List available AI provider models
  - name: WhatsApp Flows
    description: Build interactive WhatsApp Flows for surveys and forms
  - name: Contacts
    description: Manage WhatsApp contacts
paths:
  /whatsapp/broadcasts/{broadcast_id}/recipients:
    parameters:
      - name: broadcast_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
    post:
      tags:
        - Broadcasts
      summary: Add recipients
      description: >
        Add up to 1000 recipients to a draft broadcast. Duplicates are skipped.


        Recipients use Meta's component syntax with body, header, and button
        components.
      operationId: addWhatsappBroadcastRecipients
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WhatsappBroadcastRecipientsAddRequest'
            examples:
              body_params:
                summary: Body text parameters
                value:
                  whatsapp_broadcast:
                    recipients:
                      - phone_number: '+14155550123'
                        components:
                          - type: body
                            parameters:
                              - type: text
                                parameter_name: first_name
                                text: John
                              - type: text
                                parameter_name: discount
                                text: SAVE50
                      - phone_number: '+14155550124'
                        components:
                          - type: body
                            parameters:
                              - type: text
                                parameter_name: first_name
                                text: Jane
                              - type: text
                                parameter_name: discount
                                text: SAVE40
              with_buttons:
                summary: Body params with dynamic button URL
                value:
                  whatsapp_broadcast:
                    recipients:
                      - phone_number: '+14155550123'
                        components:
                          - type: body
                            parameters:
                              - type: text
                                parameter_name: first_name
                                text: Alicia
                              - type: text
                                parameter_name: discount_code
                                text: SAVE25
                          - type: button
                            sub_type: url
                            index: 0
                            parameters:
                              - type: text
                                text: promo-code-12345
              with_media:
                summary: Media header with body params
                value:
                  whatsapp_broadcast:
                    recipients:
                      - phone_number: '+14155550123'
                        components:
                          - type: header
                            parameters:
                              - type: image
                                image:
                                  link: https://cdn.acme.com/promo-banner.jpg
                          - type: body
                            parameters:
                              - type: text
                                parameter_name: first_name
                                text: Alicia
                              - type: text
                                parameter_name: discount_code
                                text: SAVE25
      responses:
        '201':
          description: Added
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WhatsappBroadcastRecipientsAddResponse'
              examples:
                summary:
                  value:
                    data:
                      added: 495
                      duplicates: 5
                      errors:
                        - >-
                          Recipient 3: template parameters invalid - requires 2
                          parameters but got 1
                        - 'Recipient 7: invalid phone number format'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '422':
          $ref: '#/components/responses/ValidationError'
components:
  schemas:
    WhatsappBroadcastRecipientsAddRequest:
      type: object
      required:
        - whatsapp_broadcast
      properties:
        whatsapp_broadcast:
          type: object
          required:
            - recipients
          properties:
            recipients:
              type: array
              minItems: 1
              items:
                type: object
                properties:
                  phone_number:
                    type: string
                    description: E.164 phone (required unless whatsapp_contact_id provided)
                  whatsapp_contact_id:
                    type: string
                    format: uuid
                    description: Existing contact ID
                  components:
                    type: array
                    description: Meta template components (body, header, button)
                    items:
                      type: object
                      required:
                        - type
                      properties:
                        type:
                          type: string
                          enum:
                            - header
                            - body
                            - button
                        sub_type:
                          type: string
                          description: Button sub_type (url, quick_reply)
                        index:
                          type: integer
                          description: Button index (0-based)
                        parameters:
                          type: array
                          items:
                            type: object
                            properties:
                              type:
                                type: string
                                description: Parameter type (text, image, video, document)
                              parameter_name:
                                type: string
                                description: >-
                                  Named parameter from template (e.g.,
                                  first_name, discount_code)
                              text:
                                type: string
                                description: Text value for text parameters
                              image:
                                type: object
                                description: Image object for header images
                                additionalProperties: true
                              video:
                                type: object
                                description: Video object for header videos
                                additionalProperties: true
                              document:
                                type: object
                                description: Document object for header documents
                                additionalProperties: true
                            additionalProperties: true
    WhatsappBroadcastRecipientsAddResponse:
      type: object
      required:
        - data
      properties:
        data:
          type: object
          required:
            - added
            - duplicates
            - errors
          properties:
            added:
              type: integer
              minimum: 0
            duplicates:
              type: integer
              minimum: 0
            errors:
              type: array
              items:
                type: string
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
  responses:
    UnauthorizedError:
      description: Missing or invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFoundError:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    ValidationError:
      description: Request validation failed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````