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

# Update channel

> Update a contact's channel properties.



## OpenAPI

````yaml /openapi.json patch /v1/contacts/{contactId}/channels/{channelId}
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/{channelId}:
    patch:
      summary: Update channel
      description: Update a contact's channel properties.
      operationId: updateContactChannel
      parameters:
        - $ref: '#/components/parameters/ContactIdParam'
        - name: channelId
          in: path
          required: true
          schema:
            type: string
          description: Channel ID.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateChannelRequest'
      responses:
        '200':
          description: Channel updated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContactChannelResponse'
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Contact or channel 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:
    UpdateChannelRequest:
      type: object
      description: Request body to update a channel.
      properties:
        label:
          type: string
          maxLength: 50
          nullable: true
          description: Optional label for the channel. Set to null to clear.
        verified:
          type: boolean
          description: Whether the channel is verified.
        metadata:
          type: object
          additionalProperties:
            type: string
    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

````