> ## 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 phone number

> Update a phone number's name or sender assignment.



## OpenAPI

````yaml /openapi.json patch /v1/phone-numbers/{phoneNumberId}
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/phone-numbers/{phoneNumberId}:
    patch:
      summary: Update phone number
      description: Update a phone number's name or sender assignment.
      operationId: updatePhoneNumber
      parameters:
        - $ref: '#/components/parameters/PhoneNumberIdParam'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PhoneNumberUpdateRequest'
            examples:
              rename:
                summary: Rename phone number
                value:
                  name: Support Line
              assign:
                summary: Assign to sender
                value:
                  senderId: sender_abc123
              unassign:
                summary: Unassign from sender
                value:
                  senderId: null
      responses:
        '200':
          description: Phone number updated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PhoneNumberResponse'
        '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: Phone number or sender not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  parameters:
    PhoneNumberIdParam:
      name: phoneNumberId
      in: path
      required: true
      schema:
        type: string
  schemas:
    PhoneNumberUpdateRequest:
      type: object
      properties:
        name:
          type: string
          maxLength: 100
          nullable: true
          description: Custom name for the phone number. Set to null to clear.
        senderId:
          type: string
          nullable: true
          description: Sender ID to assign the phone number to. Set to null to unassign.
    PhoneNumberResponse:
      type: object
      required:
        - phoneNumber
      properties:
        phoneNumber:
          $ref: '#/components/schemas/OwnedPhoneNumber'
    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
    OwnedPhoneNumber:
      type: object
      required:
        - id
        - phoneNumber
        - capabilities
        - status
        - pricing
        - createdAt
      properties:
        id:
          type: string
        phoneNumber:
          type: string
          example: '+15551234567'
        name:
          type: string
          description: Optional custom name for the phone number.
        capabilities:
          type: array
          items:
            type: string
          example:
            - sms
            - voice
        status:
          $ref: '#/components/schemas/PhoneNumberStatus'
        senderId:
          type: string
          description: Sender ID if the phone number is assigned to a sender.
        pricing:
          $ref: '#/components/schemas/OwnedPhoneNumberPricing'
        nextRenewalDate:
          type: string
          format: date-time
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    PhoneNumberStatus:
      type: string
      enum:
        - active
        - suspended
        - pending
    OwnedPhoneNumberPricing:
      type: object
      properties:
        monthlyPrice:
          type: number
          description: Monthly price in USD.
        upfrontCost:
          type: number
          description: One-time purchase cost in cents.
        monthlyCost:
          type: number
          description: Monthly cost in cents.
        isFreeNumber:
          type: boolean
          description: Whether this is a free number.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````