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

# Add recipients

> Adds one recipient (a bare object) or many (`{ "recipients": [...] }`), deduplicated per `(campaign, phone)`. Stored numbers are masked in responses. Scope `campaigns:write`.



## OpenAPI

````yaml /api-reference/openapi.json post /campaigns/{campaign_id}/recipients
openapi: 3.1.0
info:
  title: Lehar API
  version: v0
  description: >-
    Customer-facing REST API for the Lehar voice-AI platform. Platform-admin
    endpoints are intentionally excluded from this reference. Regenerate with
    `npm run sync:openapi`.
servers:
  - url: https://api.lehar.ai/ca/api/v0
security:
  - ApiKeyAuth: []
  - BearerAuth: []
paths:
  /campaigns/{campaign_id}/recipients:
    post:
      tags:
        - Campaigns
      summary: Add recipients
      description: >-
        Adds one recipient (a bare object) or many (`{ "recipients": [...] }`),
        deduplicated per `(campaign, phone)`. Stored numbers are masked in
        responses. Scope `campaigns:write`.
      operationId: >-
        upsert_campaign_recipients_ca_api_v0_campaigns__campaign_id__recipients_post
      parameters:
        - name: campaign_id
          in: path
          required: true
          schema:
            type: string
            title: Campaign Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                phone_number:
                  type: string
                  description: 'E.164. Aliases: `phone`, `mobile`, `number`.'
                variables:
                  type: object
                  description: Per-recipient values for prompt placeholders.
                next_action_at:
                  type: string
                  format: date-time
                recipients:
                  type: array
                  items:
                    type: object
                  description: 'Batch form: a list of recipient objects.'
            example:
              phone_number: '+919876543210'
              variables:
                callee_name: Jane
                company: Acme
      responses:
        '201':
          description: Upserted recipients (numbers masked)
          content:
            application/json:
              example:
                data:
                  - id: recipient_01EXAMPLE
                    campaign_id: campaign_01EXAMPLE
                    phone_number_masked: +9***3210
                    status: pending
                    variables:
                      callee_name: Jane
                      company: Acme
                    whatsapp_context: {}
                    outcome: null
                    answers: null
                    qualified: null
                    next_action_at: null
                    last_customer_message_at: null
                    service_window_expires_at: null
                    created_at: '2026-05-22T10:10:00Z'
                    updated_at: '2026-05-22T10:10:00Z'
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY
    BearerAuth:
      type: http
      scheme: bearer

````