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

# Update phone number

> Update a phone number and bind it to the agents that handle its calls.



## OpenAPI

````yaml api-reference/telephony/openapi.json PATCH /v1/telephony/phone-numbers/{id}
openapi: 3.0.3
info:
  title: Persistence Telephony API
  version: '1.0'
  description: Manage the phone numbers your agents call from and answer on.
servers:
  - url: https://api.persistence.dev
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: Telephony
    description: Phone number management.
paths:
  /v1/telephony/phone-numbers/{id}:
    patch:
      tags:
        - Telephony
      summary: Update (bind) a phone number
      description: >-
        Update a phone number and bind it to the agents that handle its inbound
        and outbound calls.
      operationId: updatePhoneNumber
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Phone Number ID
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PhoneNumberUpdateRequest'
        description: Update request
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PhoneNumber'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    PhoneNumberUpdateRequest:
      type: object
      properties:
        allowedInboundCountries:
          type: array
          items:
            type: integer
        allowedOutboundCountries:
          type: array
          items:
            type: integer
        friendlyName:
          type: array
          items:
            type: integer
        inboundAgentId:
          type: array
          items:
            type: integer
        label:
          type: array
          items:
            type: integer
        outboundAgentId:
          type: array
          items:
            type: integer
        outboundTermination:
          type: array
          items:
            type: integer
        useSameForInbound:
          type: array
          items:
            type: integer
    PhoneNumber:
      type: object
      properties:
        allowedInboundCountries:
          type: array
          items:
            type: string
        allowedOutboundCountries:
          type: array
          items:
            type: string
        country:
          type: string
        createdAt:
          type: string
        friendlyName:
          type: string
        id:
          type: string
        inboundAgentName:
          type: string
        inboundAgentPublicId:
          type: string
        inboundWebhookUrl:
          type: string
        isCustomerManaged:
          type: boolean
        isInboundReady:
          type: boolean
        isOutboundReady:
          type: boolean
        label:
          type: string
        outboundAgentName:
          type: string
        outboundAgentPublicId:
          type: string
        phoneNumber:
          type: string
        provider:
          type: string
        providerCurrency:
          type: string
        providerMonthlyCost:
          type: number
        sipConfig:
          $ref: '#/components/schemas/SipConfig'
        spaceId:
          type: string
        status:
          type: string
        updatedAt:
          type: string
    Error:
      type: object
      properties:
        code:
          type: string
        error:
          type: string
    SipConfig:
      type: object
      properties:
        ipAllowlist:
          type: array
          items:
            type: string
        password:
          type: string
        terminationUrl:
          type: string
        transport:
          type: string
        username:
          type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key issued for your workspace.

````