> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.vapi.ai/llms.txt.
> For full documentation content, see https://docs.vapi.ai/llms-full.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.vapi.ai/_mcp/server.

# Update Phone Number

PATCH https://api.vapi.ai/phone-number/{id}
Content-Type: application/json

Reference: https://docs.vapi.ai/api-reference/phone-numbers/update

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: api
  version: 1.0.0
paths:
  /phone-number/{id}:
    patch:
      operationId: update
      summary: Update Phone Number
      tags:
        - subpackage_phoneNumbers
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
        - name: Authorization
          in: header
          description: Retrieve your API Key from [Dashboard](dashboard.vapi.ai).
          required: true
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/phoneNumbers_update_Response_200'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/phoneNumbers_update_Request'
servers:
  - url: https://api.vapi.ai
components:
  schemas:
    TextContentType:
      type: string
      enum:
        - text
      title: TextContentType
    TextContentLanguage:
      type: string
      enum:
        - aa
        - ab
        - ae
        - af
        - ak
        - am
        - an
        - ar
        - as
        - av
        - ay
        - az
        - ba
        - be
        - bg
        - bh
        - bi
        - bm
        - bn
        - bo
        - br
        - bs
        - ca
        - ce
        - ch
        - co
        - cr
        - cs
        - cu
        - cv
        - cy
        - da
        - de
        - dv
        - dz
        - ee
        - el
        - en
        - eo
        - es
        - et
        - eu
        - fa
        - ff
        - fi
        - fj
        - fo
        - fr
        - fy
        - ga
        - gd
        - gl
        - gn
        - gu
        - gv
        - ha
        - he
        - hi
        - ho
        - hr
        - ht
        - hu
        - hy
        - hz
        - ia
        - id
        - ie
        - ig
        - ii
        - ik
        - io
        - is
        - it
        - iu
        - ja
        - jv
        - ka
        - kg
        - ki
        - kj
        - kk
        - kl
        - km
        - kn
        - ko
        - kr
        - ks
        - ku
        - kv
        - kw
        - ky
        - la
        - lb
        - lg
        - li
        - ln
        - lo
        - lt
        - lu
        - lv
        - mg
        - mh
        - mi
        - mk
        - ml
        - mn
        - mr
        - ms
        - mt
        - my
        - na
        - nb
        - nd
        - ne
        - ng
        - nl
        - nn
        - 'no'
        - nr
        - nv
        - ny
        - oc
        - oj
        - om
        - or
        - os
        - pa
        - pi
        - pl
        - ps
        - pt
        - qu
        - rm
        - rn
        - ro
        - ru
        - rw
        - sa
        - sc
        - sd
        - se
        - sg
        - si
        - sk
        - sl
        - sm
        - sn
        - so
        - sq
        - sr
        - ss
        - st
        - su
        - sv
        - sw
        - ta
        - te
        - tg
        - th
        - ti
        - tk
        - tl
        - tn
        - to
        - tr
        - ts
        - tt
        - tw
        - ty
        - ug
        - uk
        - ur
        - uz
        - ve
        - vi
        - vo
        - wa
        - wo
        - xh
        - yi
        - yue
        - yo
        - za
        - zh
        - zu
      title: TextContentLanguage
    TextContent:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/TextContentType'
        text:
          type: string
        language:
          $ref: '#/components/schemas/TextContentLanguage'
      required:
        - type
        - text
        - language
      title: TextContent
    CustomMessageContentsItems:
      oneOf:
        - $ref: '#/components/schemas/TextContent'
      title: CustomMessageContentsItems
    CustomMessageType:
      type: string
      enum:
        - custom-message
      description: This is a custom message.
      title: CustomMessageType
    CustomMessage:
      type: object
      properties:
        contents:
          type: array
          items:
            $ref: '#/components/schemas/CustomMessageContentsItems'
          description: >-
            This is an alternative to the `content` property. It allows to
            specify variants of the same content, one per language.


            Usage:

            - If your assistants are multilingual, you can provide content for
            each language.

            - If you don't provide content for a language, the first item in the
            array will be automatically translated to the active language at
            that moment.


            This will override the `content` property.
        type:
          $ref: '#/components/schemas/CustomMessageType'
          description: This is a custom message.
        content:
          type: string
          description: >-
            This is the content that the assistant will say when this message is
            triggered.
      required:
        - type
      title: CustomMessage
    TransferDestinationNumberMessage:
      oneOf:
        - type: string
        - $ref: '#/components/schemas/CustomMessage'
      description: >-
        This is spoken to the customer before connecting them to the
        destination.


        Usage:

        - If this is not provided and transfer tool messages is not provided,
        default is "Transferring the call now".

        - If set to "", nothing is spoken. This is useful when you want to
        silently transfer. This is especially useful when transferring between
        assistants in a squad. In this scenario, you likely also want to set
        `assistant.firstMessageMode=assistant-speaks-first-with-model-generated-message`
        for the destination assistant.


        This accepts a string or a ToolMessageStart class. Latter is useful if
        you want to specify multiple messages for different languages through
        the `contents` field.
      title: TransferDestinationNumberMessage
    TransferDestinationNumberType:
      type: string
      enum:
        - number
      title: TransferDestinationNumberType
    TransferPlanMode:
      type: string
      enum:
        - blind-transfer
        - blind-transfer-add-summary-to-sip-header
        - warm-transfer-say-message
        - warm-transfer-say-summary
        - warm-transfer-twiml
        - warm-transfer-wait-for-operator-to-speak-first-and-then-say-message
        - warm-transfer-wait-for-operator-to-speak-first-and-then-say-summary
        - warm-transfer-experimental
      description: >-
        This configures how transfer is executed and the experience of the
        destination party receiving the call.


        Usage:

        - `blind-transfer`: The assistant forwards the call to the destination
        without any message or summary.

        - `blind-transfer-add-summary-to-sip-header`: The assistant forwards the
        call to the destination and adds a SIP header X-Transfer-Summary to the
        call to include the summary.

        - `warm-transfer-say-message`: The assistant dials the destination,
        delivers the `message` to the destination party, connects the customer,
        and leaves the call.

        - `warm-transfer-say-summary`: The assistant dials the destination,
        provides a summary of the call to the destination party, connects the
        customer, and leaves the call.

        - `warm-transfer-wait-for-operator-to-speak-first-and-then-say-message`:
        The assistant dials the destination, waits for the operator to speak,
        delivers the `message` to the destination party, and then connects the
        customer.

        - `warm-transfer-wait-for-operator-to-speak-first-and-then-say-summary`:
        The assistant dials the destination, waits for the operator to speak,
        provides a summary of the call to the destination party, and then
        connects the customer.

        - `warm-transfer-twiml`: The assistant dials the destination, executes
        the twiml instructions on the destination call leg, connects the
        customer, and leaves the call.

        - `warm-transfer-experimental`: The assistant puts the customer on hold,
        dials the destination, and if the destination answers (and is human),
        delivers a message or summary before connecting the customer. If the
        destination is unreachable or not human (e.g., with voicemail
        detection), the assistant delivers the `fallbackMessage` to the customer
        and optionally ends the call.


        @default 'blind-transfer'
      title: TransferPlanMode
    TransferPlanMessage:
      oneOf:
        - type: string
        - $ref: '#/components/schemas/CustomMessage'
      description: >-
        This is the message the assistant will deliver to the destination party
        before connecting the customer.


        Usage:

        - Used only when `mode` is `blind-transfer-add-summary-to-sip-header`,
        `warm-transfer-say-message`,
        `warm-transfer-wait-for-operator-to-speak-first-and-then-say-message`,
        or `warm-transfer-experimental`.
      title: TransferPlanMessage
    TransferPlanSipVerb:
      type: string
      enum:
        - refer
        - bye
        - dial
      default: refer
      description: |-
        This specifies the SIP verb to use while transferring the call.
        - 'refer': Uses SIP REFER to transfer the call (default)
        - 'bye': Ends current call with SIP BYE
        - 'dial': Uses SIP DIAL to transfer the call
      title: TransferPlanSipVerb
    ContextEngineeringPlanLastNMessagesType:
      type: string
      enum:
        - lastNMessages
      title: ContextEngineeringPlanLastNMessagesType
    ContextEngineeringPlanLastNMessages:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/ContextEngineeringPlanLastNMessagesType'
        maxMessages:
          type: number
          format: double
          description: >-
            This is the maximum number of messages to include in the context
            engineering plan.
      required:
        - type
        - maxMessages
      title: ContextEngineeringPlanLastNMessages
    ContextEngineeringPlanNoneType:
      type: string
      enum:
        - none
      title: ContextEngineeringPlanNoneType
    ContextEngineeringPlanNone:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/ContextEngineeringPlanNoneType'
      required:
        - type
      title: ContextEngineeringPlanNone
    ContextEngineeringPlanAllType:
      type: string
      enum:
        - all
      title: ContextEngineeringPlanAllType
    ContextEngineeringPlanAll:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/ContextEngineeringPlanAllType'
      required:
        - type
      title: ContextEngineeringPlanAll
    TransferPlanContextEngineeringPlan:
      oneOf:
        - $ref: '#/components/schemas/ContextEngineeringPlanLastNMessages'
        - $ref: '#/components/schemas/ContextEngineeringPlanNone'
        - $ref: '#/components/schemas/ContextEngineeringPlanAll'
      description: >-
        This is the plan for manipulating the message context before initiating
        the warm transfer.

        Usage:

        - Used only when `mode` is `warm-transfer-experimental`.

        - These messages will automatically be added to the transferAssistant's
        system message.

        - If 'none', we will not add any transcript to the transferAssistant's
        system message.

        - If you want to provide your own messages, use
        transferAssistant.model.messages instead.


        @default { type: 'all' }
      title: TransferPlanContextEngineeringPlan
    SummaryPlanMessagesItems:
      type: object
      properties: {}
      title: SummaryPlanMessagesItems
    SummaryPlan:
      type: object
      properties:
        messages:
          type: array
          items:
            $ref: '#/components/schemas/SummaryPlanMessagesItems'
          description: >-
            These are the messages used to generate the summary.


            @default: ```

            [
              {
                "role": "system",
                "content": "You are an expert note-taker. You will be given a transcript of a call. Summarize the call in 2-3 sentences. DO NOT return anything except the summary."
              },
              {
                "role": "user",
                "content": "Here is the transcript:\n\n{{transcript}}\n\n. Here is the ended reason of the call:\n\n{{endedReason}}\n\n"
              }
            ]```


            You can customize by providing any messages you want.


            Here are the template variables available:

            - {{transcript}}: The transcript of the call from
            `call.artifact.transcript` 

            - {{systemPrompt}}: The system prompt of the call from
            `assistant.model.messages[type=system].content` 

            - {{messages}}: The messages of the call from
            `assistant.model.messages` 

            - {{endedReason}}: The ended reason of the call from
            `call.endedReason`
        enabled:
          type: boolean
          description: >-
            This determines whether a summary is generated and stored in
            `call.analysis.summary`. Defaults to true.


            Usage:

            - If you want to disable the summary, set this to false.


            @default true
        timeoutSeconds:
          type: number
          format: double
          description: >-
            This is how long the request is tried before giving up. When request
            times out, `call.analysis.summary` will be empty.


            Usage:

            - To guarantee the summary is generated, set this value high. Note,
            this will delay the end of call report in cases where model is slow
            to respond.


            @default 5 seconds
      title: SummaryPlan
    TransferFallbackPlanMessage:
      oneOf:
        - type: string
        - $ref: '#/components/schemas/CustomMessage'
      description: >-
        This is the message the assistant will deliver to the customer if the
        transfer fails.
      title: TransferFallbackPlanMessage
    TransferFallbackPlan:
      type: object
      properties:
        message:
          $ref: '#/components/schemas/TransferFallbackPlanMessage'
          description: >-
            This is the message the assistant will deliver to the customer if
            the transfer fails.
        endCallEnabled:
          type: boolean
          default: true
          description: >-
            This controls what happens after delivering the failure message to
            the customer.

            - true: End the call after delivering the failure message (default)

            - false: Keep the assistant on the call to continue handling the
            customer's request


            @default true
      required:
        - message
      title: TransferFallbackPlan
    TransferPlan:
      type: object
      properties:
        mode:
          $ref: '#/components/schemas/TransferPlanMode'
          description: >-
            This configures how transfer is executed and the experience of the
            destination party receiving the call.


            Usage:

            - `blind-transfer`: The assistant forwards the call to the
            destination without any message or summary.

            - `blind-transfer-add-summary-to-sip-header`: The assistant forwards
            the call to the destination and adds a SIP header X-Transfer-Summary
            to the call to include the summary.

            - `warm-transfer-say-message`: The assistant dials the destination,
            delivers the `message` to the destination party, connects the
            customer, and leaves the call.

            - `warm-transfer-say-summary`: The assistant dials the destination,
            provides a summary of the call to the destination party, connects
            the customer, and leaves the call.

            -
            `warm-transfer-wait-for-operator-to-speak-first-and-then-say-message`:
            The assistant dials the destination, waits for the operator to
            speak, delivers the `message` to the destination party, and then
            connects the customer.

            -
            `warm-transfer-wait-for-operator-to-speak-first-and-then-say-summary`:
            The assistant dials the destination, waits for the operator to
            speak, provides a summary of the call to the destination party, and
            then connects the customer.

            - `warm-transfer-twiml`: The assistant dials the destination,
            executes the twiml instructions on the destination call leg,
            connects the customer, and leaves the call.

            - `warm-transfer-experimental`: The assistant puts the customer on
            hold, dials the destination, and if the destination answers (and is
            human), delivers a message or summary before connecting the
            customer. If the destination is unreachable or not human (e.g., with
            voicemail detection), the assistant delivers the `fallbackMessage`
            to the customer and optionally ends the call.


            @default 'blind-transfer'
        message:
          $ref: '#/components/schemas/TransferPlanMessage'
          description: >-
            This is the message the assistant will deliver to the destination
            party before connecting the customer.


            Usage:

            - Used only when `mode` is
            `blind-transfer-add-summary-to-sip-header`,
            `warm-transfer-say-message`,
            `warm-transfer-wait-for-operator-to-speak-first-and-then-say-message`,
            or `warm-transfer-experimental`.
        timeout:
          type: number
          format: double
          default: 60
          description: >-
            This is the timeout in seconds for the
            warm-transfer-wait-for-operator-to-speak-first-and-then-say-message/summary


            @default 60
        sipVerb:
          $ref: '#/components/schemas/TransferPlanSipVerb'
          description: |-
            This specifies the SIP verb to use while transferring the call.
            - 'refer': Uses SIP REFER to transfer the call (default)
            - 'bye': Ends current call with SIP BYE
            - 'dial': Uses SIP DIAL to transfer the call
        dialTimeout:
          type: number
          format: double
          default: 60
          description: >-
            This sets the timeout for the dial operation in seconds. This is the
            duration the call will ring before timing out.


            Only applicable when `sipVerb='dial'`. Not applicable for SIP REFER
            or BYE.


            @default 60
        holdAudioUrl:
          type: string
          description: >-
            This is the URL to an audio file played while the customer is on
            hold during transfer.


            Usage:

            - Used only when `mode` is `warm-transfer-experimental`.

            - Used when transferring calls to play hold audio for the customer.

            - Must be a publicly accessible URL to an audio file.

            - Supported formats: MP3 and WAV.

            - If not provided, the default hold audio will be used.
        transferCompleteAudioUrl:
          type: string
          description: >-
            This is the URL to an audio file played after the warm transfer
            message or summary is delivered to the destination party.

            It can be used to play a custom sound like 'beep' to notify that the
            transfer is complete.


            Usage:

            - Used only when `mode` is `warm-transfer-experimental`.

            - Used when transferring calls to play hold audio for the
            destination party.

            - Must be a publicly accessible URL to an audio file.

            - Supported formats: MP3 and WAV.
        contextEngineeringPlan:
          $ref: '#/components/schemas/TransferPlanContextEngineeringPlan'
          description: >-
            This is the plan for manipulating the message context before
            initiating the warm transfer.

            Usage:

            - Used only when `mode` is `warm-transfer-experimental`.

            - These messages will automatically be added to the
            transferAssistant's system message.

            - If 'none', we will not add any transcript to the
            transferAssistant's system message.

            - If you want to provide your own messages, use
            transferAssistant.model.messages instead.


            @default { type: 'all' }
        twiml:
          type: string
          description: >-
            This is the TwiML instructions to execute on the destination call
            leg before connecting the customer.


            Usage:

            - Used only when `mode` is `warm-transfer-twiml`.

            - Supports only `Play`, `Say`, `Gather`, `Hangup` and `Pause` verbs.

            - Maximum length is 4096 characters.


            Example:

            ```

            <Say voice="alice" language="en-US">Hello, transferring a customer
            to you.</Say>

            <Pause length="2"/>

            <Say>They called about billing questions.</Say>

            ```
        summaryPlan:
          $ref: '#/components/schemas/SummaryPlan'
          description: >-
            This is the plan for generating a summary of the call to present to
            the destination party.


            Usage:

            - Used only when `mode` is
            `blind-transfer-add-summary-to-sip-header` or
            `warm-transfer-say-summary` or
            `warm-transfer-wait-for-operator-to-speak-first-and-then-say-summary`
            or `warm-transfer-experimental`.
        sipHeadersInReferToEnabled:
          type: boolean
          description: >-
            This flag includes the sipHeaders from above in the refer to sip uri
            as url encoded query params.


            @default false
        fallbackPlan:
          $ref: '#/components/schemas/TransferFallbackPlan'
          description: >-
            This configures the fallback plan when the transfer fails
            (destination unreachable, busy, or not human).


            Usage:

            - Used only when `mode` is `warm-transfer-experimental`.

            - If not provided when using `warm-transfer-experimental`, a default
            message will be used.
      required:
        - mode
      title: TransferPlan
    TransferDestinationNumber:
      type: object
      properties:
        message:
          $ref: '#/components/schemas/TransferDestinationNumberMessage'
          description: >-
            This is spoken to the customer before connecting them to the
            destination.


            Usage:

            - If this is not provided and transfer tool messages is not
            provided, default is "Transferring the call now".

            - If set to "", nothing is spoken. This is useful when you want to
            silently transfer. This is especially useful when transferring
            between assistants in a squad. In this scenario, you likely also
            want to set
            `assistant.firstMessageMode=assistant-speaks-first-with-model-generated-message`
            for the destination assistant.


            This accepts a string or a ToolMessageStart class. Latter is useful
            if you want to specify multiple messages for different languages
            through the `contents` field.
        type:
          $ref: '#/components/schemas/TransferDestinationNumberType'
        numberE164CheckEnabled:
          type: boolean
          default: true
          description: >-
            This is the flag to toggle the E164 check for the `number` field.
            This is an advanced property which should be used if you know your
            use case requires it.


            Use cases:

            - `false`: To allow non-E164 numbers like `+001234567890`, `1234`,
            or `abc`. This is useful for dialing out to non-E164 numbers on your
            SIP trunks.

            - `true` (default): To allow only E164 numbers like `+14155551234`.
            This is standard for PSTN calls.


            If `false`, the `number` is still required to only contain
            alphanumeric characters (regex: `/^\+?[a-zA-Z0-9]+$/`).


            @default true (E164 check is enabled)
        number:
          type: string
          description: This is the phone number to transfer the call to.
        extension:
          type: string
          description: >-
            This is the extension to dial after transferring the call to the
            `number`.
        callerId:
          type: string
          description: >-
            This is the caller ID to use when transferring the call to the
            `number`.


            Usage:

            - If not provided, the caller ID will be the number the call is
            coming **from**.
              Example: a customer with number +14151111111 calls in to and the assistant transfers out to +16470000000. +16470000000 will see +14151111111 as the caller.
              For inbound calls, the caller ID is the customer's number. For outbound calls, the caller ID is the phone number of the assistant.
            - To change this behavior, provide a `callerId`.

            - Set to '{{customer.number}}' to always use the customer's number
            as the caller ID.

            - Set to '{{phoneNumber.number}}' to always use the phone number of
            the assistant as the caller ID.

            - Set to any E164 number to always use that number as the caller ID.
            This needs to be a number that is owned or verified by your
            Transport provider like Twilio.


            For Twilio, you can read up more here:
            https://www.twilio.com/docs/voice/twiml/dial#callerid
        transferPlan:
          $ref: '#/components/schemas/TransferPlan'
          description: >-
            This configures how transfer is executed and the experience of the
            destination party receiving the call. Defaults to `blind-transfer`.


            @default `transferPlan.mode='blind-transfer'`
        description:
          type: string
          description: >-
            This is the description of the destination, used by the AI to choose
            when and how to transfer the call.
      required:
        - type
        - number
      title: TransferDestinationNumber
    TransferDestinationSipMessage:
      oneOf:
        - type: string
        - $ref: '#/components/schemas/CustomMessage'
      description: >-
        This is spoken to the customer before connecting them to the
        destination.


        Usage:

        - If this is not provided and transfer tool messages is not provided,
        default is "Transferring the call now".

        - If set to "", nothing is spoken. This is useful when you want to
        silently transfer. This is especially useful when transferring between
        assistants in a squad. In this scenario, you likely also want to set
        `assistant.firstMessageMode=assistant-speaks-first-with-model-generated-message`
        for the destination assistant.


        This accepts a string or a ToolMessageStart class. Latter is useful if
        you want to specify multiple messages for different languages through
        the `contents` field.
      title: TransferDestinationSipMessage
    TransferDestinationSipType:
      type: string
      enum:
        - sip
      title: TransferDestinationSipType
    TransferDestinationSipSipHeaders:
      type: object
      properties: {}
      description: These are custom headers to be added to SIP refer during transfer call.
      title: TransferDestinationSipSipHeaders
    TransferDestinationSip:
      type: object
      properties:
        message:
          $ref: '#/components/schemas/TransferDestinationSipMessage'
          description: >-
            This is spoken to the customer before connecting them to the
            destination.


            Usage:

            - If this is not provided and transfer tool messages is not
            provided, default is "Transferring the call now".

            - If set to "", nothing is spoken. This is useful when you want to
            silently transfer. This is especially useful when transferring
            between assistants in a squad. In this scenario, you likely also
            want to set
            `assistant.firstMessageMode=assistant-speaks-first-with-model-generated-message`
            for the destination assistant.


            This accepts a string or a ToolMessageStart class. Latter is useful
            if you want to specify multiple messages for different languages
            through the `contents` field.
        type:
          $ref: '#/components/schemas/TransferDestinationSipType'
        sipUri:
          type: string
          description: This is the SIP URI to transfer the call to.
        callerId:
          type: string
          description: >-
            This is the caller ID to use when transferring the call to the
            `sipUri`.


            Usage:

            - If not provided, the caller ID will be determined by the SIP
            infrastructure.

            - Set to '{{customer.number}}' to always use the customer's number
            as the caller ID.

            - Set to '{{phoneNumber.number}}' to always use the phone number of
            the assistant as the caller ID.

            - Set to any E164 number to always use that number as the caller ID.


            Only applicable when `transferPlan.sipVerb='dial'`. Not applicable
            for SIP REFER.
        transferPlan:
          $ref: '#/components/schemas/TransferPlan'
          description: >-
            This configures how transfer is executed and the experience of the
            destination party receiving the call. Defaults to `blind-transfer`.


            @default `transferPlan.mode='blind-transfer'`
        sipHeaders:
          $ref: '#/components/schemas/TransferDestinationSipSipHeaders'
          description: >-
            These are custom headers to be added to SIP refer during transfer
            call.
        description:
          type: string
          description: >-
            This is the description of the destination, used by the AI to choose
            when and how to transfer the call.
      required:
        - type
        - sipUri
      title: TransferDestinationSip
    UpdateByoPhoneNumberDtoFallbackDestination:
      oneOf:
        - $ref: '#/components/schemas/TransferDestinationNumber'
        - $ref: '#/components/schemas/TransferDestinationSip'
      description: >-
        This is the fallback destination an inbound call will be transferred to
        if:

        1. `assistantId` is not set

        2. `squadId` is not set

        3. and, `assistant-request` message to the `serverUrl` fails


        If this is not set and above conditions are met, the inbound call is
        hung up with an error message.
      title: UpdateByoPhoneNumberDtoFallbackDestination
    PhoneNumberHookCallRingingOn:
      type: string
      enum:
        - call.ringing
      description: This is the event to trigger the hook on
      title: PhoneNumberHookCallRingingOn
    PhoneNumberCallRingingHookFilterType:
      type: string
      enum:
        - startsWith
      description: >-
        This is the type of filter - matches when the specified field starts
        with any of the given prefixes
      title: PhoneNumberCallRingingHookFilterType
    PhoneNumberCallRingingHookFilterKey:
      type: string
      enum:
        - number
      description: >-
        The field to check. Currently only "number" (the caller's phone number)
        is supported.
      title: PhoneNumberCallRingingHookFilterKey
    PhoneNumberCallRingingHookFilter:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/PhoneNumberCallRingingHookFilterType'
          description: >-
            This is the type of filter - matches when the specified field starts
            with any of the given prefixes
        key:
          $ref: '#/components/schemas/PhoneNumberCallRingingHookFilterKey'
          description: >-
            The field to check. Currently only "number" (the caller's phone
            number) is supported.
        startsWith:
          type: array
          items:
            type: string
          description: >-
            Array of prefixes to match. Do not include the + prefix. Inbound
            calls from numbers starting with any of these prefixes will trigger
            the hook actions.
      required:
        - type
        - key
        - startsWith
      title: PhoneNumberCallRingingHookFilter
    TransferPhoneNumberHookActionType:
      type: string
      enum:
        - transfer
      description: This is the type of action - must be "transfer"
      title: TransferPhoneNumberHookActionType
    TransferPhoneNumberHookActionDestination:
      oneOf:
        - $ref: '#/components/schemas/TransferDestinationNumber'
        - $ref: '#/components/schemas/TransferDestinationSip'
      description: >-
        This is the destination details for the transfer - can be a phone number
        or SIP URI
      title: TransferPhoneNumberHookActionDestination
    TransferPhoneNumberHookAction:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/TransferPhoneNumberHookActionType'
          description: This is the type of action - must be "transfer"
        destination:
          $ref: '#/components/schemas/TransferPhoneNumberHookActionDestination'
          description: >-
            This is the destination details for the transfer - can be a phone
            number or SIP URI
      required:
        - type
      title: TransferPhoneNumberHookAction
    SayPhoneNumberHookActionType:
      type: string
      enum:
        - say
      description: This is the type of action - must be "say"
      title: SayPhoneNumberHookActionType
    SayPhoneNumberHookAction:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/SayPhoneNumberHookActionType'
          description: This is the type of action - must be "say"
        exact:
          type: string
          description: This is the message to say
      required:
        - type
        - exact
      title: SayPhoneNumberHookAction
    PhoneNumberHookCallRingingDoItems:
      oneOf:
        - $ref: '#/components/schemas/TransferPhoneNumberHookAction'
        - $ref: '#/components/schemas/SayPhoneNumberHookAction'
      title: PhoneNumberHookCallRingingDoItems
    PhoneNumberHookCallRinging:
      type: object
      properties:
        'on':
          $ref: '#/components/schemas/PhoneNumberHookCallRingingOn'
          description: This is the event to trigger the hook on
        filters:
          type: array
          items:
            $ref: '#/components/schemas/PhoneNumberCallRingingHookFilter'
          description: >-
            Optional filters to decide when to trigger the hook. Currently
            supports filtering by caller country code.
        do:
          type: array
          items:
            $ref: '#/components/schemas/PhoneNumberHookCallRingingDoItems'
          description: >-
            Only the first action will be executed. Additional actions will be
            ignored.
      required:
        - 'on'
        - do
      title: PhoneNumberHookCallRinging
    PhoneNumberHookCallEndingOn:
      type: string
      enum:
        - call.ending
      description: This is the event to trigger the hook on
      title: PhoneNumberHookCallEndingOn
    PhoneNumberCallEndingHookFilterType:
      type: string
      enum:
        - oneOf
      description: This is the type of filter - currently only "oneOf" is supported
      title: PhoneNumberCallEndingHookFilterType
    PhoneNumberCallEndingHookFilterKey:
      type: string
      enum:
        - call.endedReason
      description: >-
        This is the key to filter on - only "call.endedReason" is allowed for
        phone number call ending hooks
      title: PhoneNumberCallEndingHookFilterKey
    PhoneNumberCallEndingHookFilterOneOf:
      type: string
      enum:
        - assistant-request-failed
        - assistant-request-returned-error
        - assistant-request-returned-unspeakable-error
        - assistant-request-returned-invalid-assistant
        - assistant-request-returned-no-assistant
        - assistant-request-returned-forwarding-phone-number
      description: >-
        This is the array of assistant-request related ended reasons to match
        against
      title: PhoneNumberCallEndingHookFilterOneOf
    PhoneNumberCallEndingHookFilter:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/PhoneNumberCallEndingHookFilterType'
          description: This is the type of filter - currently only "oneOf" is supported
        key:
          $ref: '#/components/schemas/PhoneNumberCallEndingHookFilterKey'
          description: >-
            This is the key to filter on - only "call.endedReason" is allowed
            for phone number call ending hooks
        oneOf:
          $ref: '#/components/schemas/PhoneNumberCallEndingHookFilterOneOf'
          description: >-
            This is the array of assistant-request related ended reasons to
            match against
      required:
        - type
        - key
        - oneOf
      title: PhoneNumberCallEndingHookFilter
    PhoneNumberHookCallEndingDo:
      oneOf:
        - $ref: '#/components/schemas/TransferPhoneNumberHookAction'
        - $ref: '#/components/schemas/SayPhoneNumberHookAction'
      description: This is the action to perform when the hook triggers
      title: PhoneNumberHookCallEndingDo
    PhoneNumberHookCallEnding:
      type: object
      properties:
        'on':
          $ref: '#/components/schemas/PhoneNumberHookCallEndingOn'
          description: This is the event to trigger the hook on
        filters:
          type: array
          items:
            $ref: '#/components/schemas/PhoneNumberCallEndingHookFilter'
          description: >-
            Optional filters to decide when to trigger - restricted to
            assistant-request related ended reasons
        do:
          $ref: '#/components/schemas/PhoneNumberHookCallEndingDo'
          description: This is the action to perform when the hook triggers
      required:
        - 'on'
      title: PhoneNumberHookCallEnding
    UpdateByoPhoneNumberDtoHooksItems:
      oneOf:
        - $ref: '#/components/schemas/PhoneNumberHookCallRinging'
        - $ref: '#/components/schemas/PhoneNumberHookCallEnding'
      title: UpdateByoPhoneNumberDtoHooksItems
    ServerHeaders:
      type: object
      properties: {}
      description: >-
        These are the headers to include in the request.


        Each key-value pair represents a header name and its value.


        Note: Specifying an Authorization header here will override the
        authorization provided by the `credentialId` (if provided). This is an
        anti-pattern and should be avoided outside of edge case scenarios.
      title: ServerHeaders
    BackoffPlanType:
      type: string
      enum:
        - fixed
        - exponential
      description: |-
        This is the type of backoff plan to use. Defaults to fixed.

        @default fixed
      title: BackoffPlanType
    BackoffPlanExcludedStatusCodesItems:
      type: object
      properties: {}
      title: BackoffPlanExcludedStatusCodesItems
    BackoffPlan:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/BackoffPlanType'
          description: |-
            This is the type of backoff plan to use. Defaults to fixed.

            @default fixed
        maxRetries:
          type: number
          format: double
          description: >-
            This is the maximum number of retries to attempt if the request
            fails. Defaults to 0 (no retries).


            @default 0
        baseDelaySeconds:
          type: number
          format: double
          description: >-
            This is the base delay in seconds. For linear backoff, this is the
            delay between each retry. For exponential backoff, this is the
            initial delay.
        excludedStatusCodes:
          type: array
          items:
            $ref: '#/components/schemas/BackoffPlanExcludedStatusCodesItems'
          description: >-
            This is the excluded status codes. If the response status code is in
            this list, the request will not be retried.

            By default, the request will be retried for any non-2xx status code.
      required:
        - type
        - maxRetries
        - baseDelaySeconds
      title: BackoffPlan
    Server:
      type: object
      properties:
        timeoutSeconds:
          type: number
          format: double
          description: >-
            This is the timeout in seconds for the request. Defaults to 20
            seconds.


            @default 20
        credentialId:
          type: string
          description: The credential ID for server authentication
        staticIpAddressesEnabled:
          type: boolean
          description: >-
            If enabled, requests will originate from a static set of IPs owned
            and managed by Vapi.


            @default false
        encryptedPaths:
          type: array
          items:
            type: string
          description: >-
            This is the paths to encrypt in the request body if credentialId and
            encryptionPlan are defined.
        url:
          type: string
          description: This is where the request will be sent.
        headers:
          $ref: '#/components/schemas/ServerHeaders'
          description: >-
            These are the headers to include in the request.


            Each key-value pair represents a header name and its value.


            Note: Specifying an Authorization header here will override the
            authorization provided by the `credentialId` (if provided). This is
            an anti-pattern and should be avoided outside of edge case
            scenarios.
        backoffPlan:
          $ref: '#/components/schemas/BackoffPlan'
          description: >-
            This is the backoff plan if the request fails. Defaults to undefined
            (the request will not be retried).


            @default undefined (the request will not be retried)
      title: Server
    UpdateTwilioPhoneNumberDtoFallbackDestination:
      oneOf:
        - $ref: '#/components/schemas/TransferDestinationNumber'
        - $ref: '#/components/schemas/TransferDestinationSip'
      description: >-
        This is the fallback destination an inbound call will be transferred to
        if:

        1. `assistantId` is not set

        2. `squadId` is not set

        3. and, `assistant-request` message to the `serverUrl` fails


        If this is not set and above conditions are met, the inbound call is
        hung up with an error message.
      title: UpdateTwilioPhoneNumberDtoFallbackDestination
    UpdateTwilioPhoneNumberDtoHooksItems:
      oneOf:
        - $ref: '#/components/schemas/PhoneNumberHookCallRinging'
        - $ref: '#/components/schemas/PhoneNumberHookCallEnding'
      title: UpdateTwilioPhoneNumberDtoHooksItems
    UpdateVonagePhoneNumberDtoFallbackDestination:
      oneOf:
        - $ref: '#/components/schemas/TransferDestinationNumber'
        - $ref: '#/components/schemas/TransferDestinationSip'
      description: >-
        This is the fallback destination an inbound call will be transferred to
        if:

        1. `assistantId` is not set

        2. `squadId` is not set

        3. and, `assistant-request` message to the `serverUrl` fails


        If this is not set and above conditions are met, the inbound call is
        hung up with an error message.
      title: UpdateVonagePhoneNumberDtoFallbackDestination
    UpdateVonagePhoneNumberDtoHooksItems:
      oneOf:
        - $ref: '#/components/schemas/PhoneNumberHookCallRinging'
        - $ref: '#/components/schemas/PhoneNumberHookCallEnding'
      title: UpdateVonagePhoneNumberDtoHooksItems
    UpdateVapiPhoneNumberDtoFallbackDestination:
      oneOf:
        - $ref: '#/components/schemas/TransferDestinationNumber'
        - $ref: '#/components/schemas/TransferDestinationSip'
      description: >-
        This is the fallback destination an inbound call will be transferred to
        if:

        1. `assistantId` is not set

        2. `squadId` is not set

        3. and, `assistant-request` message to the `serverUrl` fails


        If this is not set and above conditions are met, the inbound call is
        hung up with an error message.
      title: UpdateVapiPhoneNumberDtoFallbackDestination
    UpdateVapiPhoneNumberDtoHooksItems:
      oneOf:
        - $ref: '#/components/schemas/PhoneNumberHookCallRinging'
        - $ref: '#/components/schemas/PhoneNumberHookCallEnding'
      title: UpdateVapiPhoneNumberDtoHooksItems
    SipAuthentication:
      type: object
      properties:
        realm:
          type: string
          description: >-
            This will be expected in the `realm` field of the `authorization`
            header of the SIP INVITE. Defaults to sip.vapi.ai.
        username:
          type: string
          description: >-
            This will be expected in the `username` field of the `authorization`
            header of the SIP INVITE.
        password:
          type: string
          description: >-
            This will be expected to generate the `response` field of the
            `authorization` header of the SIP INVITE, through digest
            authentication.
      required:
        - username
        - password
      title: SipAuthentication
    UpdateTelnyxPhoneNumberDtoFallbackDestination:
      oneOf:
        - $ref: '#/components/schemas/TransferDestinationNumber'
        - $ref: '#/components/schemas/TransferDestinationSip'
      description: >-
        This is the fallback destination an inbound call will be transferred to
        if:

        1. `assistantId` is not set

        2. `squadId` is not set

        3. and, `assistant-request` message to the `serverUrl` fails


        If this is not set and above conditions are met, the inbound call is
        hung up with an error message.
      title: UpdateTelnyxPhoneNumberDtoFallbackDestination
    UpdateTelnyxPhoneNumberDtoHooksItems:
      oneOf:
        - $ref: '#/components/schemas/PhoneNumberHookCallRinging'
        - $ref: '#/components/schemas/PhoneNumberHookCallEnding'
      title: UpdateTelnyxPhoneNumberDtoHooksItems
    phoneNumbers_update_Request:
      oneOf:
        - type: object
          properties:
            provider:
              type: string
              enum:
                - byo-phone-number
              description: 'Discriminator value: byo-phone-number'
            fallbackDestination:
              $ref: '#/components/schemas/UpdateByoPhoneNumberDtoFallbackDestination'
              description: >-
                This is the fallback destination an inbound call will be
                transferred to if:

                1. `assistantId` is not set

                2. `squadId` is not set

                3. and, `assistant-request` message to the `serverUrl` fails


                If this is not set and above conditions are met, the inbound
                call is hung up with an error message.
            hooks:
              type: array
              items:
                $ref: '#/components/schemas/UpdateByoPhoneNumberDtoHooksItems'
              description: >-
                This is the hooks that will be used for incoming calls to this
                phone number.
            numberE164CheckEnabled:
              type: boolean
              default: true
              description: >-
                This is the flag to toggle the E164 check for the `number`
                field. This is an advanced property which should be used if you
                know your use case requires it.


                Use cases:

                - `false`: To allow non-E164 numbers like `+001234567890`,
                `1234`, or `abc`. This is useful for dialing out to non-E164
                numbers on your SIP trunks.

                - `true` (default): To allow only E164 numbers like
                `+14155551234`. This is standard for PSTN calls.


                If `false`, the `number` is still required to only contain
                alphanumeric characters (regex: `/^\+?[a-zA-Z0-9]+$/`).


                @default true (E164 check is enabled)
            name:
              type: string
              description: >-
                This is the name of the phone number. This is just for your own
                reference.
            assistantId:
              type: string
              description: >-
                This is the assistant that will be used for incoming calls to
                this phone number.


                If neither `assistantId`, `squadId` nor `workflowId` is set,
                `assistant-request` will be sent to your Server URL. Check
                `ServerMessage` and `ServerMessageResponse` for the shape of the
                message and response that is expected.
            workflowId:
              type: string
              description: >-
                This is the workflow that will be used for incoming calls to
                this phone number.


                If neither `assistantId`, `squadId`, nor `workflowId` is set,
                `assistant-request` will be sent to your Server URL. Check
                `ServerMessage` and `ServerMessageResponse` for the shape of the
                message and response that is expected.
            squadId:
              type: string
              description: >-
                This is the squad that will be used for incoming calls to this
                phone number.


                If neither `assistantId`, `squadId`, nor `workflowId` is set,
                `assistant-request` will be sent to your Server URL. Check
                `ServerMessage` and `ServerMessageResponse` for the shape of the
                message and response that is expected.
            server:
              $ref: '#/components/schemas/Server'
              description: >-
                This is where Vapi will send webhooks. You can find all webhooks
                available along with their shape in ServerMessage schema.


                The order of precedence is:


                1. assistant.server

                2. phoneNumber.server

                3. org.server
            number:
              type: string
              description: This is the number of the customer.
            credentialId:
              type: string
              description: >-
                This is the credential of your own SIP trunk or Carrier (type
                `byo-sip-trunk`) which can be used to make calls to this phone
                number.


                You can add the SIP trunk or Carrier credential in the Provider
                Credentials page on the Dashboard to get the credentialId.
          required:
            - provider
          description: UpdateByoPhoneNumberDTO variant
        - type: object
          properties:
            provider:
              type: string
              enum:
                - twilio
              description: 'Discriminator value: twilio'
            fallbackDestination:
              $ref: >-
                #/components/schemas/UpdateTwilioPhoneNumberDtoFallbackDestination
              description: >-
                This is the fallback destination an inbound call will be
                transferred to if:

                1. `assistantId` is not set

                2. `squadId` is not set

                3. and, `assistant-request` message to the `serverUrl` fails


                If this is not set and above conditions are met, the inbound
                call is hung up with an error message.
            hooks:
              type: array
              items:
                $ref: '#/components/schemas/UpdateTwilioPhoneNumberDtoHooksItems'
              description: >-
                This is the hooks that will be used for incoming calls to this
                phone number.
            smsEnabled:
              type: boolean
              default: true
              description: >-
                Controls whether Vapi sets the messaging webhook URL on the
                Twilio number during import.


                If set to `false`, Vapi will not update the Twilio messaging
                URL, leaving it as is.

                If `true` or omitted (default), Vapi will configure both the
                voice and messaging URLs.


                @default true
            name:
              type: string
              description: >-
                This is the name of the phone number. This is just for your own
                reference.
            assistantId:
              type: string
              description: >-
                This is the assistant that will be used for incoming calls to
                this phone number.


                If neither `assistantId`, `squadId` nor `workflowId` is set,
                `assistant-request` will be sent to your Server URL. Check
                `ServerMessage` and `ServerMessageResponse` for the shape of the
                message and response that is expected.
            workflowId:
              type: string
              description: >-
                This is the workflow that will be used for incoming calls to
                this phone number.


                If neither `assistantId`, `squadId`, nor `workflowId` is set,
                `assistant-request` will be sent to your Server URL. Check
                `ServerMessage` and `ServerMessageResponse` for the shape of the
                message and response that is expected.
            squadId:
              type: string
              description: >-
                This is the squad that will be used for incoming calls to this
                phone number.


                If neither `assistantId`, `squadId`, nor `workflowId` is set,
                `assistant-request` will be sent to your Server URL. Check
                `ServerMessage` and `ServerMessageResponse` for the shape of the
                message and response that is expected.
            server:
              $ref: '#/components/schemas/Server'
              description: >-
                This is where Vapi will send webhooks. You can find all webhooks
                available along with their shape in ServerMessage schema.


                The order of precedence is:


                1. assistant.server

                2. phoneNumber.server

                3. org.server
            number:
              type: string
              description: These are the digits of the phone number you own on your Twilio.
            twilioAccountSid:
              type: string
              description: This is the Twilio Account SID for the phone number.
            twilioAuthToken:
              type: string
              description: This is the Twilio Auth Token for the phone number.
            twilioApiKey:
              type: string
              description: This is the Twilio API Key for the phone number.
            twilioApiSecret:
              type: string
              description: This is the Twilio API Secret for the phone number.
          required:
            - provider
          description: UpdateTwilioPhoneNumberDTO variant
        - type: object
          properties:
            provider:
              type: string
              enum:
                - vonage
              description: 'Discriminator value: vonage'
            fallbackDestination:
              $ref: >-
                #/components/schemas/UpdateVonagePhoneNumberDtoFallbackDestination
              description: >-
                This is the fallback destination an inbound call will be
                transferred to if:

                1. `assistantId` is not set

                2. `squadId` is not set

                3. and, `assistant-request` message to the `serverUrl` fails


                If this is not set and above conditions are met, the inbound
                call is hung up with an error message.
            hooks:
              type: array
              items:
                $ref: '#/components/schemas/UpdateVonagePhoneNumberDtoHooksItems'
              description: >-
                This is the hooks that will be used for incoming calls to this
                phone number.
            name:
              type: string
              description: >-
                This is the name of the phone number. This is just for your own
                reference.
            assistantId:
              type: string
              description: >-
                This is the assistant that will be used for incoming calls to
                this phone number.


                If neither `assistantId`, `squadId` nor `workflowId` is set,
                `assistant-request` will be sent to your Server URL. Check
                `ServerMessage` and `ServerMessageResponse` for the shape of the
                message and response that is expected.
            workflowId:
              type: string
              description: >-
                This is the workflow that will be used for incoming calls to
                this phone number.


                If neither `assistantId`, `squadId`, nor `workflowId` is set,
                `assistant-request` will be sent to your Server URL. Check
                `ServerMessage` and `ServerMessageResponse` for the shape of the
                message and response that is expected.
            squadId:
              type: string
              description: >-
                This is the squad that will be used for incoming calls to this
                phone number.


                If neither `assistantId`, `squadId`, nor `workflowId` is set,
                `assistant-request` will be sent to your Server URL. Check
                `ServerMessage` and `ServerMessageResponse` for the shape of the
                message and response that is expected.
            server:
              $ref: '#/components/schemas/Server'
              description: >-
                This is where Vapi will send webhooks. You can find all webhooks
                available along with their shape in ServerMessage schema.


                The order of precedence is:


                1. assistant.server

                2. phoneNumber.server

                3. org.server
            number:
              type: string
              description: These are the digits of the phone number you own on your Vonage.
            credentialId:
              type: string
              description: >-
                This is the credential you added in dashboard.vapi.ai/keys. This
                is used to configure the number to send inbound calls to Vapi,
                make outbound calls and do live call updates like transfers and
                hangups.
          required:
            - provider
          description: UpdateVonagePhoneNumberDTO variant
        - type: object
          properties:
            provider:
              type: string
              enum:
                - vapi
              description: 'Discriminator value: vapi'
            fallbackDestination:
              $ref: '#/components/schemas/UpdateVapiPhoneNumberDtoFallbackDestination'
              description: >-
                This is the fallback destination an inbound call will be
                transferred to if:

                1. `assistantId` is not set

                2. `squadId` is not set

                3. and, `assistant-request` message to the `serverUrl` fails


                If this is not set and above conditions are met, the inbound
                call is hung up with an error message.
            hooks:
              type: array
              items:
                $ref: '#/components/schemas/UpdateVapiPhoneNumberDtoHooksItems'
              description: >-
                This is the hooks that will be used for incoming calls to this
                phone number.
            name:
              type: string
              description: >-
                This is the name of the phone number. This is just for your own
                reference.
            assistantId:
              type: string
              description: >-
                This is the assistant that will be used for incoming calls to
                this phone number.


                If neither `assistantId`, `squadId` nor `workflowId` is set,
                `assistant-request` will be sent to your Server URL. Check
                `ServerMessage` and `ServerMessageResponse` for the shape of the
                message and response that is expected.
            workflowId:
              type: string
              description: >-
                This is the workflow that will be used for incoming calls to
                this phone number.


                If neither `assistantId`, `squadId`, nor `workflowId` is set,
                `assistant-request` will be sent to your Server URL. Check
                `ServerMessage` and `ServerMessageResponse` for the shape of the
                message and response that is expected.
            squadId:
              type: string
              description: >-
                This is the squad that will be used for incoming calls to this
                phone number.


                If neither `assistantId`, `squadId`, nor `workflowId` is set,
                `assistant-request` will be sent to your Server URL. Check
                `ServerMessage` and `ServerMessageResponse` for the shape of the
                message and response that is expected.
            server:
              $ref: '#/components/schemas/Server'
              description: >-
                This is where Vapi will send webhooks. You can find all webhooks
                available along with their shape in ServerMessage schema.


                The order of precedence is:


                1. assistant.server

                2. phoneNumber.server

                3. org.server
            sipUri:
              type: string
              description: >-
                This is the SIP URI of the phone number. You can SIP INVITE
                this. The assistant attached to this number will answer.


                This is case-insensitive.
            authentication:
              $ref: '#/components/schemas/SipAuthentication'
              description: >-
                This enables authentication for incoming SIP INVITE requests to
                the `sipUri`.


                If not set, any username/password to the 401 challenge of the
                SIP INVITE will be accepted.
          required:
            - provider
          description: UpdateVapiPhoneNumberDTO variant
        - type: object
          properties:
            provider:
              type: string
              enum:
                - telnyx
              description: 'Discriminator value: telnyx'
            fallbackDestination:
              $ref: >-
                #/components/schemas/UpdateTelnyxPhoneNumberDtoFallbackDestination
              description: >-
                This is the fallback destination an inbound call will be
                transferred to if:

                1. `assistantId` is not set

                2. `squadId` is not set

                3. and, `assistant-request` message to the `serverUrl` fails


                If this is not set and above conditions are met, the inbound
                call is hung up with an error message.
            hooks:
              type: array
              items:
                $ref: '#/components/schemas/UpdateTelnyxPhoneNumberDtoHooksItems'
              description: >-
                This is the hooks that will be used for incoming calls to this
                phone number.
            name:
              type: string
              description: >-
                This is the name of the phone number. This is just for your own
                reference.
            assistantId:
              type: string
              description: >-
                This is the assistant that will be used for incoming calls to
                this phone number.


                If neither `assistantId`, `squadId` nor `workflowId` is set,
                `assistant-request` will be sent to your Server URL. Check
                `ServerMessage` and `ServerMessageResponse` for the shape of the
                message and response that is expected.
            workflowId:
              type: string
              description: >-
                This is the workflow that will be used for incoming calls to
                this phone number.


                If neither `assistantId`, `squadId`, nor `workflowId` is set,
                `assistant-request` will be sent to your Server URL. Check
                `ServerMessage` and `ServerMessageResponse` for the shape of the
                message and response that is expected.
            squadId:
              type: string
              description: >-
                This is the squad that will be used for incoming calls to this
                phone number.


                If neither `assistantId`, `squadId`, nor `workflowId` is set,
                `assistant-request` will be sent to your Server URL. Check
                `ServerMessage` and `ServerMessageResponse` for the shape of the
                message and response that is expected.
            server:
              $ref: '#/components/schemas/Server'
              description: >-
                This is where Vapi will send webhooks. You can find all webhooks
                available along with their shape in ServerMessage schema.


                The order of precedence is:


                1. assistant.server

                2. phoneNumber.server

                3. org.server
            number:
              type: string
              description: These are the digits of the phone number you own on your Telnyx.
            credentialId:
              type: string
              description: >-
                This is the credential you added in dashboard.vapi.ai/keys. This
                is used to configure the number to send inbound calls to Vapi,
                make outbound calls and do live call updates like transfers and
                hangups.
          required:
            - provider
          description: UpdateTelnyxPhoneNumberDTO variant
      discriminator:
        propertyName: provider
      title: phoneNumbers_update_Request
    PhoneNumberIdPatchResponsesContentApplicationJsonSchemaDiscriminatorMappingByoPhoneNumberFallbackDestination:
      oneOf:
        - $ref: '#/components/schemas/TransferDestinationNumber'
        - $ref: '#/components/schemas/TransferDestinationSip'
      description: >-
        This is the fallback destination an inbound call will be transferred to
        if:

        1. `assistantId` is not set

        2. `squadId` is not set

        3. and, `assistant-request` message to the `serverUrl` fails


        If this is not set and above conditions are met, the inbound call is
        hung up with an error message.
      title: >-
        PhoneNumberIdPatchResponsesContentApplicationJsonSchemaDiscriminatorMappingByoPhoneNumberFallbackDestination
    PhoneNumberIdPatchResponsesContentApplicationJsonSchemaDiscriminatorMappingByoPhoneNumberHooksItems:
      oneOf:
        - $ref: '#/components/schemas/PhoneNumberHookCallRinging'
        - $ref: '#/components/schemas/PhoneNumberHookCallEnding'
      title: >-
        PhoneNumberIdPatchResponsesContentApplicationJsonSchemaDiscriminatorMappingByoPhoneNumberHooksItems
    PhoneNumberIdPatchResponsesContentApplicationJsonSchemaDiscriminatorMappingByoPhoneNumberStatus:
      type: string
      enum:
        - active
        - activating
        - blocked
      description: This is the status of the phone number.
      title: >-
        PhoneNumberIdPatchResponsesContentApplicationJsonSchemaDiscriminatorMappingByoPhoneNumberStatus
    PhoneNumberIdPatchResponsesContentApplicationJsonSchemaDiscriminatorMappingTwilioFallbackDestination:
      oneOf:
        - $ref: '#/components/schemas/TransferDestinationNumber'
        - $ref: '#/components/schemas/TransferDestinationSip'
      description: >-
        This is the fallback destination an inbound call will be transferred to
        if:

        1. `assistantId` is not set

        2. `squadId` is not set

        3. and, `assistant-request` message to the `serverUrl` fails


        If this is not set and above conditions are met, the inbound call is
        hung up with an error message.
      title: >-
        PhoneNumberIdPatchResponsesContentApplicationJsonSchemaDiscriminatorMappingTwilioFallbackDestination
    PhoneNumberIdPatchResponsesContentApplicationJsonSchemaDiscriminatorMappingTwilioHooksItems:
      oneOf:
        - $ref: '#/components/schemas/PhoneNumberHookCallRinging'
        - $ref: '#/components/schemas/PhoneNumberHookCallEnding'
      title: >-
        PhoneNumberIdPatchResponsesContentApplicationJsonSchemaDiscriminatorMappingTwilioHooksItems
    PhoneNumberIdPatchResponsesContentApplicationJsonSchemaDiscriminatorMappingTwilioStatus:
      type: string
      enum:
        - active
        - activating
        - blocked
      description: This is the status of the phone number.
      title: >-
        PhoneNumberIdPatchResponsesContentApplicationJsonSchemaDiscriminatorMappingTwilioStatus
    PhoneNumberIdPatchResponsesContentApplicationJsonSchemaDiscriminatorMappingVonageFallbackDestination:
      oneOf:
        - $ref: '#/components/schemas/TransferDestinationNumber'
        - $ref: '#/components/schemas/TransferDestinationSip'
      description: >-
        This is the fallback destination an inbound call will be transferred to
        if:

        1. `assistantId` is not set

        2. `squadId` is not set

        3. and, `assistant-request` message to the `serverUrl` fails


        If this is not set and above conditions are met, the inbound call is
        hung up with an error message.
      title: >-
        PhoneNumberIdPatchResponsesContentApplicationJsonSchemaDiscriminatorMappingVonageFallbackDestination
    PhoneNumberIdPatchResponsesContentApplicationJsonSchemaDiscriminatorMappingVonageHooksItems:
      oneOf:
        - $ref: '#/components/schemas/PhoneNumberHookCallRinging'
        - $ref: '#/components/schemas/PhoneNumberHookCallEnding'
      title: >-
        PhoneNumberIdPatchResponsesContentApplicationJsonSchemaDiscriminatorMappingVonageHooksItems
    PhoneNumberIdPatchResponsesContentApplicationJsonSchemaDiscriminatorMappingVonageStatus:
      type: string
      enum:
        - active
        - activating
        - blocked
      description: This is the status of the phone number.
      title: >-
        PhoneNumberIdPatchResponsesContentApplicationJsonSchemaDiscriminatorMappingVonageStatus
    PhoneNumberIdPatchResponsesContentApplicationJsonSchemaDiscriminatorMappingVapiFallbackDestination:
      oneOf:
        - $ref: '#/components/schemas/TransferDestinationNumber'
        - $ref: '#/components/schemas/TransferDestinationSip'
      description: >-
        This is the fallback destination an inbound call will be transferred to
        if:

        1. `assistantId` is not set

        2. `squadId` is not set

        3. and, `assistant-request` message to the `serverUrl` fails


        If this is not set and above conditions are met, the inbound call is
        hung up with an error message.
      title: >-
        PhoneNumberIdPatchResponsesContentApplicationJsonSchemaDiscriminatorMappingVapiFallbackDestination
    PhoneNumberIdPatchResponsesContentApplicationJsonSchemaDiscriminatorMappingVapiHooksItems:
      oneOf:
        - $ref: '#/components/schemas/PhoneNumberHookCallRinging'
        - $ref: '#/components/schemas/PhoneNumberHookCallEnding'
      title: >-
        PhoneNumberIdPatchResponsesContentApplicationJsonSchemaDiscriminatorMappingVapiHooksItems
    PhoneNumberIdPatchResponsesContentApplicationJsonSchemaDiscriminatorMappingVapiStatus:
      type: string
      enum:
        - active
        - activating
        - blocked
      description: This is the status of the phone number.
      title: >-
        PhoneNumberIdPatchResponsesContentApplicationJsonSchemaDiscriminatorMappingVapiStatus
    PhoneNumberIdPatchResponsesContentApplicationJsonSchemaDiscriminatorMappingTelnyxFallbackDestination:
      oneOf:
        - $ref: '#/components/schemas/TransferDestinationNumber'
        - $ref: '#/components/schemas/TransferDestinationSip'
      description: >-
        This is the fallback destination an inbound call will be transferred to
        if:

        1. `assistantId` is not set

        2. `squadId` is not set

        3. and, `assistant-request` message to the `serverUrl` fails


        If this is not set and above conditions are met, the inbound call is
        hung up with an error message.
      title: >-
        PhoneNumberIdPatchResponsesContentApplicationJsonSchemaDiscriminatorMappingTelnyxFallbackDestination
    PhoneNumberIdPatchResponsesContentApplicationJsonSchemaDiscriminatorMappingTelnyxHooksItems:
      oneOf:
        - $ref: '#/components/schemas/PhoneNumberHookCallRinging'
        - $ref: '#/components/schemas/PhoneNumberHookCallEnding'
      title: >-
        PhoneNumberIdPatchResponsesContentApplicationJsonSchemaDiscriminatorMappingTelnyxHooksItems
    PhoneNumberIdPatchResponsesContentApplicationJsonSchemaDiscriminatorMappingTelnyxStatus:
      type: string
      enum:
        - active
        - activating
        - blocked
      description: This is the status of the phone number.
      title: >-
        PhoneNumberIdPatchResponsesContentApplicationJsonSchemaDiscriminatorMappingTelnyxStatus
    phoneNumbers_update_Response_200:
      oneOf:
        - type: object
          properties:
            provider:
              type: string
              enum:
                - byo-phone-number
              description: 'Discriminator value: byo-phone-number'
            fallbackDestination:
              $ref: >-
                #/components/schemas/PhoneNumberIdPatchResponsesContentApplicationJsonSchemaDiscriminatorMappingByoPhoneNumberFallbackDestination
              description: >-
                This is the fallback destination an inbound call will be
                transferred to if:

                1. `assistantId` is not set

                2. `squadId` is not set

                3. and, `assistant-request` message to the `serverUrl` fails


                If this is not set and above conditions are met, the inbound
                call is hung up with an error message.
            hooks:
              type: array
              items:
                $ref: >-
                  #/components/schemas/PhoneNumberIdPatchResponsesContentApplicationJsonSchemaDiscriminatorMappingByoPhoneNumberHooksItems
              description: >-
                This is the hooks that will be used for incoming calls to this
                phone number.
            numberE164CheckEnabled:
              type: boolean
              default: true
              description: >-
                This is the flag to toggle the E164 check for the `number`
                field. This is an advanced property which should be used if you
                know your use case requires it.


                Use cases:

                - `false`: To allow non-E164 numbers like `+001234567890`,
                `1234`, or `abc`. This is useful for dialing out to non-E164
                numbers on your SIP trunks.

                - `true` (default): To allow only E164 numbers like
                `+14155551234`. This is standard for PSTN calls.


                If `false`, the `number` is still required to only contain
                alphanumeric characters (regex: `/^\+?[a-zA-Z0-9]+$/`).


                @default true (E164 check is enabled)
            id:
              type: string
              description: This is the unique identifier for the phone number.
            orgId:
              type: string
              description: >-
                This is the unique identifier for the org that this phone number
                belongs to.
            createdAt:
              type: string
              format: date-time
              description: >-
                This is the ISO 8601 date-time string of when the phone number
                was created.
            updatedAt:
              type: string
              format: date-time
              description: >-
                This is the ISO 8601 date-time string of when the phone number
                was last updated.
            status:
              $ref: >-
                #/components/schemas/PhoneNumberIdPatchResponsesContentApplicationJsonSchemaDiscriminatorMappingByoPhoneNumberStatus
              description: This is the status of the phone number.
            name:
              type: string
              description: >-
                This is the name of the phone number. This is just for your own
                reference.
            assistantId:
              type: string
              description: >-
                This is the assistant that will be used for incoming calls to
                this phone number.


                If neither `assistantId`, `squadId` nor `workflowId` is set,
                `assistant-request` will be sent to your Server URL. Check
                `ServerMessage` and `ServerMessageResponse` for the shape of the
                message and response that is expected.
            workflowId:
              type: string
              description: >-
                This is the workflow that will be used for incoming calls to
                this phone number.


                If neither `assistantId`, `squadId`, nor `workflowId` is set,
                `assistant-request` will be sent to your Server URL. Check
                `ServerMessage` and `ServerMessageResponse` for the shape of the
                message and response that is expected.
            squadId:
              type: string
              description: >-
                This is the squad that will be used for incoming calls to this
                phone number.


                If neither `assistantId`, `squadId`, nor `workflowId` is set,
                `assistant-request` will be sent to your Server URL. Check
                `ServerMessage` and `ServerMessageResponse` for the shape of the
                message and response that is expected.
            server:
              $ref: '#/components/schemas/Server'
              description: >-
                This is where Vapi will send webhooks. You can find all webhooks
                available along with their shape in ServerMessage schema.


                The order of precedence is:


                1. assistant.server

                2. phoneNumber.server

                3. org.server
            number:
              type: string
              description: This is the number of the customer.
            credentialId:
              type: string
              description: >-
                This is the credential of your own SIP trunk or Carrier (type
                `byo-sip-trunk`) which can be used to make calls to this phone
                number.


                You can add the SIP trunk or Carrier credential in the Provider
                Credentials page on the Dashboard to get the credentialId.
          required:
            - provider
            - id
            - orgId
            - createdAt
            - updatedAt
            - credentialId
          description: ByoPhoneNumber variant
        - type: object
          properties:
            provider:
              type: string
              enum:
                - twilio
              description: 'Discriminator value: twilio'
            fallbackDestination:
              $ref: >-
                #/components/schemas/PhoneNumberIdPatchResponsesContentApplicationJsonSchemaDiscriminatorMappingTwilioFallbackDestination
              description: >-
                This is the fallback destination an inbound call will be
                transferred to if:

                1. `assistantId` is not set

                2. `squadId` is not set

                3. and, `assistant-request` message to the `serverUrl` fails


                If this is not set and above conditions are met, the inbound
                call is hung up with an error message.
            hooks:
              type: array
              items:
                $ref: >-
                  #/components/schemas/PhoneNumberIdPatchResponsesContentApplicationJsonSchemaDiscriminatorMappingTwilioHooksItems
              description: >-
                This is the hooks that will be used for incoming calls to this
                phone number.
            smsEnabled:
              type: boolean
              default: true
              description: >-
                Controls whether Vapi sets the messaging webhook URL on the
                Twilio number during import.


                If set to `false`, Vapi will not update the Twilio messaging
                URL, leaving it as is.

                If `true` or omitted (default), Vapi will configure both the
                voice and messaging URLs.


                @default true
            id:
              type: string
              description: This is the unique identifier for the phone number.
            orgId:
              type: string
              description: >-
                This is the unique identifier for the org that this phone number
                belongs to.
            createdAt:
              type: string
              format: date-time
              description: >-
                This is the ISO 8601 date-time string of when the phone number
                was created.
            updatedAt:
              type: string
              format: date-time
              description: >-
                This is the ISO 8601 date-time string of when the phone number
                was last updated.
            status:
              $ref: >-
                #/components/schemas/PhoneNumberIdPatchResponsesContentApplicationJsonSchemaDiscriminatorMappingTwilioStatus
              description: This is the status of the phone number.
            twilioAuthToken:
              type: string
              description: This is the Twilio Auth Token for the phone number.
            twilioApiKey:
              type: string
              description: This is the Twilio API Key for the phone number.
            twilioApiSecret:
              type: string
              description: This is the Twilio API Secret for the phone number.
            name:
              type: string
              description: >-
                This is the name of the phone number. This is just for your own
                reference.
            assistantId:
              type: string
              description: >-
                This is the assistant that will be used for incoming calls to
                this phone number.


                If neither `assistantId`, `squadId` nor `workflowId` is set,
                `assistant-request` will be sent to your Server URL. Check
                `ServerMessage` and `ServerMessageResponse` for the shape of the
                message and response that is expected.
            workflowId:
              type: string
              description: >-
                This is the workflow that will be used for incoming calls to
                this phone number.


                If neither `assistantId`, `squadId`, nor `workflowId` is set,
                `assistant-request` will be sent to your Server URL. Check
                `ServerMessage` and `ServerMessageResponse` for the shape of the
                message and response that is expected.
            squadId:
              type: string
              description: >-
                This is the squad that will be used for incoming calls to this
                phone number.


                If neither `assistantId`, `squadId`, nor `workflowId` is set,
                `assistant-request` will be sent to your Server URL. Check
                `ServerMessage` and `ServerMessageResponse` for the shape of the
                message and response that is expected.
            server:
              $ref: '#/components/schemas/Server'
              description: >-
                This is where Vapi will send webhooks. You can find all webhooks
                available along with their shape in ServerMessage schema.


                The order of precedence is:


                1. assistant.server

                2. phoneNumber.server

                3. org.server
            number:
              type: string
              description: These are the digits of the phone number you own on your Twilio.
            twilioAccountSid:
              type: string
              description: This is the Twilio Account SID for the phone number.
          required:
            - provider
            - id
            - orgId
            - createdAt
            - updatedAt
            - number
            - twilioAccountSid
          description: TwilioPhoneNumber variant
        - type: object
          properties:
            provider:
              type: string
              enum:
                - vonage
              description: 'Discriminator value: vonage'
            fallbackDestination:
              $ref: >-
                #/components/schemas/PhoneNumberIdPatchResponsesContentApplicationJsonSchemaDiscriminatorMappingVonageFallbackDestination
              description: >-
                This is the fallback destination an inbound call will be
                transferred to if:

                1. `assistantId` is not set

                2. `squadId` is not set

                3. and, `assistant-request` message to the `serverUrl` fails


                If this is not set and above conditions are met, the inbound
                call is hung up with an error message.
            hooks:
              type: array
              items:
                $ref: >-
                  #/components/schemas/PhoneNumberIdPatchResponsesContentApplicationJsonSchemaDiscriminatorMappingVonageHooksItems
              description: >-
                This is the hooks that will be used for incoming calls to this
                phone number.
            id:
              type: string
              description: This is the unique identifier for the phone number.
            orgId:
              type: string
              description: >-
                This is the unique identifier for the org that this phone number
                belongs to.
            createdAt:
              type: string
              format: date-time
              description: >-
                This is the ISO 8601 date-time string of when the phone number
                was created.
            updatedAt:
              type: string
              format: date-time
              description: >-
                This is the ISO 8601 date-time string of when the phone number
                was last updated.
            status:
              $ref: >-
                #/components/schemas/PhoneNumberIdPatchResponsesContentApplicationJsonSchemaDiscriminatorMappingVonageStatus
              description: This is the status of the phone number.
            name:
              type: string
              description: >-
                This is the name of the phone number. This is just for your own
                reference.
            assistantId:
              type: string
              description: >-
                This is the assistant that will be used for incoming calls to
                this phone number.


                If neither `assistantId`, `squadId` nor `workflowId` is set,
                `assistant-request` will be sent to your Server URL. Check
                `ServerMessage` and `ServerMessageResponse` for the shape of the
                message and response that is expected.
            workflowId:
              type: string
              description: >-
                This is the workflow that will be used for incoming calls to
                this phone number.


                If neither `assistantId`, `squadId`, nor `workflowId` is set,
                `assistant-request` will be sent to your Server URL. Check
                `ServerMessage` and `ServerMessageResponse` for the shape of the
                message and response that is expected.
            squadId:
              type: string
              description: >-
                This is the squad that will be used for incoming calls to this
                phone number.


                If neither `assistantId`, `squadId`, nor `workflowId` is set,
                `assistant-request` will be sent to your Server URL. Check
                `ServerMessage` and `ServerMessageResponse` for the shape of the
                message and response that is expected.
            server:
              $ref: '#/components/schemas/Server'
              description: >-
                This is where Vapi will send webhooks. You can find all webhooks
                available along with their shape in ServerMessage schema.


                The order of precedence is:


                1. assistant.server

                2. phoneNumber.server

                3. org.server
            number:
              type: string
              description: These are the digits of the phone number you own on your Vonage.
            credentialId:
              type: string
              description: >-
                This is the credential you added in dashboard.vapi.ai/keys. This
                is used to configure the number to send inbound calls to Vapi,
                make outbound calls and do live call updates like transfers and
                hangups.
          required:
            - provider
            - id
            - orgId
            - createdAt
            - updatedAt
            - number
            - credentialId
          description: VonagePhoneNumber variant
        - type: object
          properties:
            provider:
              type: string
              enum:
                - vapi
              description: 'Discriminator value: vapi'
            fallbackDestination:
              $ref: >-
                #/components/schemas/PhoneNumberIdPatchResponsesContentApplicationJsonSchemaDiscriminatorMappingVapiFallbackDestination
              description: >-
                This is the fallback destination an inbound call will be
                transferred to if:

                1. `assistantId` is not set

                2. `squadId` is not set

                3. and, `assistant-request` message to the `serverUrl` fails


                If this is not set and above conditions are met, the inbound
                call is hung up with an error message.
            hooks:
              type: array
              items:
                $ref: >-
                  #/components/schemas/PhoneNumberIdPatchResponsesContentApplicationJsonSchemaDiscriminatorMappingVapiHooksItems
              description: >-
                This is the hooks that will be used for incoming calls to this
                phone number.
            id:
              type: string
              description: This is the unique identifier for the phone number.
            orgId:
              type: string
              description: >-
                This is the unique identifier for the org that this phone number
                belongs to.
            createdAt:
              type: string
              format: date-time
              description: >-
                This is the ISO 8601 date-time string of when the phone number
                was created.
            updatedAt:
              type: string
              format: date-time
              description: >-
                This is the ISO 8601 date-time string of when the phone number
                was last updated.
            status:
              $ref: >-
                #/components/schemas/PhoneNumberIdPatchResponsesContentApplicationJsonSchemaDiscriminatorMappingVapiStatus
              description: This is the status of the phone number.
            number:
              type: string
              description: >-
                These are the digits of the phone number you purchased from
                Vapi.
            name:
              type: string
              description: >-
                This is the name of the phone number. This is just for your own
                reference.
            assistantId:
              type: string
              description: >-
                This is the assistant that will be used for incoming calls to
                this phone number.


                If neither `assistantId`, `squadId` nor `workflowId` is set,
                `assistant-request` will be sent to your Server URL. Check
                `ServerMessage` and `ServerMessageResponse` for the shape of the
                message and response that is expected.
            workflowId:
              type: string
              description: >-
                This is the workflow that will be used for incoming calls to
                this phone number.


                If neither `assistantId`, `squadId`, nor `workflowId` is set,
                `assistant-request` will be sent to your Server URL. Check
                `ServerMessage` and `ServerMessageResponse` for the shape of the
                message and response that is expected.
            squadId:
              type: string
              description: >-
                This is the squad that will be used for incoming calls to this
                phone number.


                If neither `assistantId`, `squadId`, nor `workflowId` is set,
                `assistant-request` will be sent to your Server URL. Check
                `ServerMessage` and `ServerMessageResponse` for the shape of the
                message and response that is expected.
            server:
              $ref: '#/components/schemas/Server'
              description: >-
                This is where Vapi will send webhooks. You can find all webhooks
                available along with their shape in ServerMessage schema.


                The order of precedence is:


                1. assistant.server

                2. phoneNumber.server

                3. org.server
            numberDesiredAreaCode:
              type: string
              description: This is the area code of the phone number to purchase.
            sipUri:
              type: string
              description: >-
                This is the SIP URI of the phone number. You can SIP INVITE
                this. The assistant attached to this number will answer.


                This is case-insensitive.
            authentication:
              $ref: '#/components/schemas/SipAuthentication'
              description: >-
                This enables authentication for incoming SIP INVITE requests to
                the `sipUri`.


                If not set, any username/password to the 401 challenge of the
                SIP INVITE will be accepted.
          required:
            - provider
            - id
            - orgId
            - createdAt
            - updatedAt
          description: VapiPhoneNumber variant
        - type: object
          properties:
            provider:
              type: string
              enum:
                - telnyx
              description: 'Discriminator value: telnyx'
            fallbackDestination:
              $ref: >-
                #/components/schemas/PhoneNumberIdPatchResponsesContentApplicationJsonSchemaDiscriminatorMappingTelnyxFallbackDestination
              description: >-
                This is the fallback destination an inbound call will be
                transferred to if:

                1. `assistantId` is not set

                2. `squadId` is not set

                3. and, `assistant-request` message to the `serverUrl` fails


                If this is not set and above conditions are met, the inbound
                call is hung up with an error message.
            hooks:
              type: array
              items:
                $ref: >-
                  #/components/schemas/PhoneNumberIdPatchResponsesContentApplicationJsonSchemaDiscriminatorMappingTelnyxHooksItems
              description: >-
                This is the hooks that will be used for incoming calls to this
                phone number.
            id:
              type: string
              description: This is the unique identifier for the phone number.
            orgId:
              type: string
              description: >-
                This is the unique identifier for the org that this phone number
                belongs to.
            createdAt:
              type: string
              format: date-time
              description: >-
                This is the ISO 8601 date-time string of when the phone number
                was created.
            updatedAt:
              type: string
              format: date-time
              description: >-
                This is the ISO 8601 date-time string of when the phone number
                was last updated.
            status:
              $ref: >-
                #/components/schemas/PhoneNumberIdPatchResponsesContentApplicationJsonSchemaDiscriminatorMappingTelnyxStatus
              description: This is the status of the phone number.
            name:
              type: string
              description: >-
                This is the name of the phone number. This is just for your own
                reference.
            assistantId:
              type: string
              description: >-
                This is the assistant that will be used for incoming calls to
                this phone number.


                If neither `assistantId`, `squadId` nor `workflowId` is set,
                `assistant-request` will be sent to your Server URL. Check
                `ServerMessage` and `ServerMessageResponse` for the shape of the
                message and response that is expected.
            workflowId:
              type: string
              description: >-
                This is the workflow that will be used for incoming calls to
                this phone number.


                If neither `assistantId`, `squadId`, nor `workflowId` is set,
                `assistant-request` will be sent to your Server URL. Check
                `ServerMessage` and `ServerMessageResponse` for the shape of the
                message and response that is expected.
            squadId:
              type: string
              description: >-
                This is the squad that will be used for incoming calls to this
                phone number.


                If neither `assistantId`, `squadId`, nor `workflowId` is set,
                `assistant-request` will be sent to your Server URL. Check
                `ServerMessage` and `ServerMessageResponse` for the shape of the
                message and response that is expected.
            server:
              $ref: '#/components/schemas/Server'
              description: >-
                This is where Vapi will send webhooks. You can find all webhooks
                available along with their shape in ServerMessage schema.


                The order of precedence is:


                1. assistant.server

                2. phoneNumber.server

                3. org.server
            number:
              type: string
              description: These are the digits of the phone number you own on your Telnyx.
            credentialId:
              type: string
              description: >-
                This is the credential you added in dashboard.vapi.ai/keys. This
                is used to configure the number to send inbound calls to Vapi,
                make outbound calls and do live call updates like transfers and
                hangups.
          required:
            - provider
            - id
            - orgId
            - createdAt
            - updatedAt
            - number
            - credentialId
          description: TelnyxPhoneNumber variant
      discriminator:
        propertyName: provider
      title: phoneNumbers_update_Response_200
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: Retrieve your API Key from [Dashboard](dashboard.vapi.ai).

```

## SDK Code Examples

```python
from vapi import Vapi

client = Vapi(
    token="YOUR_TOKEN_HERE",
)

client.phone_numbers.update(
    id="id",
)

```

```go
package example

import (
    context "context"

    serversdkgo "github.com/VapiAI/server-sdk-go"
    client "github.com/VapiAI/server-sdk-go/client"
    option "github.com/VapiAI/server-sdk-go/option"
)

func do() {
    client := client.NewClient(
        option.WithToken(
            "YOUR_TOKEN_HERE",
        ),
    )
    request := &serversdkgo.UpdatePhoneNumbersRequest{
        Id: "id",
    }
    client.PhoneNumbers.Update(
        context.TODO(),
        request,
    )
}

```