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

# Update Phone Number

> Update an existing phone number.



## OpenAPI

````yaml patch /api/v1/phone-number/{phone_number_id}
openapi: 3.1.0
info:
  title: Voicebot Public API
  description: Public API for Voicebot Assistant Management
  version: 1.0.0
servers: []
security: []
paths:
  /api/v1/phone-number/{phone_number_id}:
    patch:
      tags:
        - phone-number
      summary: Update Phone Number
      description: Update an existing phone number.
      operationId: update_phone_number_api_v1_phone_number__phone_number_id__patch
      parameters:
        - name: phone_number_id
          in: path
          required: true
          schema:
            type: string
            title: Phone Number Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PhoneNumbersUpdateRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PhoneNumberResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    PhoneNumbersUpdateRequest:
      properties:
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        assistantId:
          anyOf:
            - type: string
            - type: 'null'
          title: Assistantid
        squadId:
          anyOf:
            - type: string
            - type: 'null'
          title: Squadid
        fallbackDestination:
          anyOf:
            - $ref: >-
                #/components/schemas/app__schemas__phone_number__TransferDestinationNumber
            - $ref: >-
                #/components/schemas/app__schemas__phone_number__TransferDestinationSip
            - type: 'null'
          title: Fallbackdestination
        serverUrl:
          anyOf:
            - type: string
            - type: 'null'
          title: Serverurl
          description: >-
            Server URL must match either workflow.amira.bot or
            workflow.voicebot.studio
        serverUrlSecret:
          anyOf:
            - type: string
            - type: 'null'
          title: Serverurlsecret
      type: object
      title: PhoneNumbersUpdateRequest
    PhoneNumberResponse:
      properties:
        id:
          type: string
          title: Id
        provider:
          type: string
          title: Provider
        number:
          type: string
          title: Number
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        assistantId:
          anyOf:
            - type: string
            - type: 'null'
          title: Assistantid
        squadId:
          anyOf:
            - type: string
            - type: 'null'
          title: Squadid
        fallbackDestination:
          anyOf:
            - $ref: >-
                #/components/schemas/app__schemas__phone_number__TransferDestinationNumber
            - $ref: >-
                #/components/schemas/app__schemas__phone_number__TransferDestinationSip
            - type: 'null'
          title: Fallbackdestination
        serverUrl:
          anyOf:
            - type: string
            - type: 'null'
          title: Serverurl
        serverUrlSecret:
          anyOf:
            - type: string
            - type: 'null'
          title: Serverurlsecret
        createdAt:
          type: string
          format: date-time
          title: Createdat
        updatedAt:
          type: string
          format: date-time
          title: Updatedat
        orgId:
          anyOf:
            - type: string
            - type: 'null'
          title: Orgid
        twilioAccountSid:
          anyOf:
            - type: string
            - type: 'null'
          title: Twilioaccountsid
        twilioAuthToken:
          anyOf:
            - type: string
            - type: 'null'
          title: Twilioauthtoken
      type: object
      required:
        - id
        - provider
        - number
        - createdAt
        - updatedAt
      title: PhoneNumberResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    app__schemas__phone_number__TransferDestinationNumber:
      properties:
        type:
          type: string
          const: number
          title: Type
          default: number
        number:
          type: string
          title: Number
        extension:
          anyOf:
            - type: string
            - type: 'null'
          title: Extension
        callerId:
          anyOf:
            - type: string
            - type: 'null'
          title: Callerid
        message:
          anyOf:
            - type: string
            - type: 'null'
          title: Message
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        numberE164CheckEnabled:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Numbere164Checkenabled
          default: true
      type: object
      required:
        - number
      title: TransferDestinationNumber
    app__schemas__phone_number__TransferDestinationSip:
      properties:
        type:
          type: string
          const: sip
          title: Type
          default: sip
        sipUri:
          type: string
          title: Sipuri
        message:
          anyOf:
            - type: string
            - type: 'null'
          title: Message
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
      type: object
      required:
        - sipUri
      title: TransferDestinationSip
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key

````