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

# Update phone number



## OpenAPI

````yaml /api/platform/v1/openapi-platform.yaml patch /whatsapp/phone_numbers/{phone_number_id}
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/phone_numbers/{phone_number_id}:
    parameters:
      - name: phone_number_id
        in: path
        required: true
        description: Meta phone number ID
        schema:
          type: string
    patch:
      tags:
        - Phone Numbers
      summary: Update phone number
      operationId: updateWhatsappPhoneNumber
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WhatsappPhoneNumberUpdateRequest'
            examples:
              rotate_token:
                summary: Rotate credentials
                value:
                  whatsapp_phone_number:
                    access_token: EAABsbCS...new-token
                    webhook_destination_url: https://yourapp.com/webhooks/whatsapp
              toggle_calls:
                summary: Enable voice calls
                value:
                  whatsapp_phone_number:
                    calls_enabled: true
      responses:
        '200':
          description: Phone number updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WhatsappPhoneNumberResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '422':
          $ref: '#/components/responses/ValidationError'
components:
  schemas:
    WhatsappPhoneNumberUpdateRequest:
      type: object
      required:
        - whatsapp_phone_number
      properties:
        whatsapp_phone_number:
          type: object
          properties:
            name:
              type: string
            kind:
              type: string
              enum:
                - production
                - sandbox
            phone_number_id:
              type: string
              description: Required when switching to production
            business_account_id:
              type: string
            access_token:
              type: string
            webhook_verify_token:
              type:
                - string
                - 'null'
            webhook_destination_url:
              type:
                - string
                - 'null'
              format: uri
            inbound_processing_enabled:
              type: boolean
            calls_enabled:
              type: boolean
    WhatsappPhoneNumberResponse:
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/WhatsappPhoneNumber'
    WhatsappPhoneNumber:
      type: object
      required:
        - id
        - internal_id
        - phone_number_id
        - name
        - created_at
        - updated_at
      properties:
        id:
          type: string
          description: Meta phone number ID
        internal_id:
          type: string
          format: uuid
          description: Kapso configuration ID
        phone_number_id:
          type: string
          description: Meta phone number ID
        name:
          type: string
          description: Label for this number
        business_account_id:
          type:
            - string
            - 'null'
          description: WhatsApp Business Account ID
        is_coexistence:
          type:
            - boolean
            - 'null'
          description: Using with WhatsApp Business App
        inbound_processing_enabled:
          type: boolean
          description: Process incoming messages
        calls_enabled:
          type: boolean
          description: Handle voice calls
        webhook_verified_at:
          type:
            - string
            - 'null'
          format: date-time
          description: When Meta confirmed webhook
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        customer_id:
          type:
            - string
            - 'null'
          format: uuid
        display_name:
          type:
            - string
            - 'null'
          description: Customer-facing display name
        display_phone_number:
          type:
            - string
            - 'null'
          description: Formatted number from Meta
        display_phone_number_normalized:
          type:
            - string
            - 'null'
          description: Digits only
        verified_name:
          type:
            - string
            - 'null'
          description: Meta-verified business name
        quality_rating:
          type:
            - string
            - 'null'
          description: GREEN, YELLOW, or RED
        code_verification_status:
          type:
            - string
            - 'null'
        name_status:
          type:
            - string
            - 'null'
          description: Display name review status
        status:
          type:
            - string
            - 'null'
          description: Connection status (e.g., CONNECTED)
        throughput_tier:
          type:
            - string
            - 'null'
          description: Message rate limit tier
        whatsapp_business_manager_messaging_limit:
          anyOf:
            - type: integer
            - type: string
            - type: 'null'
        is_official_business_account:
          type:
            - boolean
            - 'null'
          description: Green checkmark verified
        is_pin_enabled:
          type:
            - boolean
            - 'null'
          description: Two-factor PIN enabled
    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

````