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

# Assign phone number to campaign

> Assign a US phone number to an approved 10DLC campaign. The campaign must be in approved status.



## OpenAPI

````yaml /openapi.json post /v1/10dlc/campaigns/{campaignId}/phone-numbers
openapi: 3.0.3
info:
  title: Zavu Unified Messaging Layer API
  version: 0.2.0
  description: >
    Unified multi-channel messaging API for Zavu.


    Supported channels:

    - **SMS**: Simple text messages

    - **WhatsApp**: Rich messaging with media, buttons, lists, CTA URL buttons,
    and templates

    - **Telegram**: Bot messaging with text, media, and interactive elements

    - **Email**: Transactional emails via Amazon SES


    Design goals:

    - Simple `send()` entrypoint for developers

    - Project-level authentication via Bearer token

    - Support for all WhatsApp message types (text, image, video, audio,
    document, sticker, location, contact, buttons, list, cta_url, reaction,
    template)

    - If a non-text message type is sent, WhatsApp channel is used automatically

    - 24-hour WhatsApp conversation window enforcement

    - Universal `to` field accepts phone numbers (E.164), email addresses, or
    numeric chat IDs (Telegram/Instagram)
servers:
  - url: https://api.zavu.dev
security:
  - bearerAuth: []
paths:
  /v1/10dlc/campaigns/{campaignId}/phone-numbers:
    post:
      tags:
        - 10DLC
      summary: Assign phone number to campaign
      description: >-
        Assign a US phone number to an approved 10DLC campaign. The campaign
        must be in approved status.
      operationId: assignTenDlcPhoneNumber
      parameters:
        - $ref: '#/components/parameters/TenDlcCampaignIdParam'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TenDlcPhoneNumberAssignRequest'
            example:
              phoneNumberId: pn_abc123
      responses:
        '201':
          description: Phone number assigned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TenDlcAssignmentResponse'
        '400':
          description: Campaign not approved or invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Campaign or phone number not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  parameters:
    TenDlcCampaignIdParam:
      name: campaignId
      in: path
      required: true
      description: 10DLC campaign ID.
      schema:
        type: string
  schemas:
    TenDlcPhoneNumberAssignRequest:
      type: object
      required:
        - phoneNumberId
      properties:
        phoneNumberId:
          type: string
          description: ID of the phone number to assign.
    TenDlcAssignmentResponse:
      type: object
      required:
        - assignment
      properties:
        assignment:
          $ref: '#/components/schemas/TenDlcPhoneNumberAssignment'
    Error:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          example: invalid_request
        message:
          type: string
          example: Phone number is invalid
        details:
          type: object
          additionalProperties: true
    TenDlcPhoneNumberAssignment:
      type: object
      required:
        - id
        - campaignId
        - phoneNumberId
        - status
        - createdAt
        - updatedAt
      properties:
        id:
          type: string
        campaignId:
          type: string
        phoneNumberId:
          type: string
        status:
          type: string
          description: Assignment status.
          enum:
            - pending
            - active
            - failed
        failureReason:
          type: string
          nullable: true
        assignedAt:
          type: string
          format: date-time
          nullable: true
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````