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

# Add channel to contact

> Add a new communication channel to an existing contact.



## OpenAPI

````yaml /openapi.json post /v1/contacts/{contactId}/channels
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/contacts/{contactId}/channels:
    post:
      summary: Add channel to contact
      description: Add a new communication channel to an existing contact.
      operationId: addContactChannel
      parameters:
        - $ref: '#/components/parameters/ContactIdParam'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddChannelRequest'
            example:
              channel: email
              identifier: john.work@company.com
              label: work
      responses:
        '201':
          description: Channel added.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContactChannelResponse'
        '400':
          description: Invalid request or duplicate identifier.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Contact not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  parameters:
    ContactIdParam:
      name: contactId
      in: path
      required: true
      schema:
        type: string
  schemas:
    AddChannelRequest:
      type: object
      description: Request body to add a channel to a contact.
      required:
        - channel
        - identifier
      properties:
        channel:
          type: string
          enum:
            - sms
            - whatsapp
            - email
            - telegram
            - voice
          description: Channel type.
        identifier:
          type: string
          description: Channel identifier (phone number in E.164 format or email address).
          example: '+14155551234'
        countryCode:
          type: string
          minLength: 2
          maxLength: 2
          description: ISO country code for phone numbers.
          example: US
        label:
          type: string
          maxLength: 50
          description: Optional label for the channel.
          example: work
        isPrimary:
          type: boolean
          description: Whether this should be the primary channel for its type.
          default: false
    ContactChannelResponse:
      type: object
      required:
        - channel
      properties:
        channel:
          $ref: '#/components/schemas/ContactChannel'
    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
    ContactChannel:
      type: object
      description: A communication channel for a contact.
      required:
        - id
        - channel
        - identifier
        - isPrimary
        - verified
        - createdAt
      properties:
        id:
          type: string
        channel:
          type: string
          enum:
            - sms
            - whatsapp
            - email
            - telegram
            - voice
          description: Channel type.
        identifier:
          type: string
          description: Channel identifier (phone number or email address).
          example: '+14155551234'
        countryCode:
          type: string
          description: ISO country code for phone numbers.
          example: US
        label:
          type: string
          description: Optional label for the channel.
          example: work
        isPrimary:
          type: boolean
          description: Whether this is the primary channel for its type.
        verified:
          type: boolean
          description: Whether this channel has been verified.
        metrics:
          type: object
          description: Delivery metrics for this channel.
          properties:
            successCount:
              type: integer
            failureCount:
              type: integer
            totalAttempts:
              type: integer
            avgDeliveryTimeMs:
              type: number
            lastSuccessAt:
              type: string
              format: date-time
        lastInboundAt:
          type: string
          format: date-time
          description: Last time a message was received on this channel.
        metadata:
          type: object
          additionalProperties:
            type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````