Vapi Phone Numbers API

The Phone Numbers API from Vapi — 3 operation(s) for phone numbers.

Operations 6

POST /phone-number Create Phone Number #
GET /phone-number List Phone Numbers #
GET /v2/phone-number List Phone Numbers #
GET /phone-number/{id} Get Phone Number #
PATCH /phone-number/{id} Update Phone Number #
DELETE /phone-number/{id} Delete Phone Number #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/vapi-phone-numbers-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

vapi-phone-numbers-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Vapi Analytics Phone Numbers API
  description: Voice AI for developers.
  version: '1.0'
  contact: {}
servers:
- url: https://api.vapi.ai
tags:
- name: Phone Numbers
paths:
  /phone-number:
    post:
      operationId: PhoneNumberController_create
      summary: Create Phone Number
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
              - $ref: '#/components/schemas/CreateByoPhoneNumberDTO'
                title: ByoPhoneNumber
              - $ref: '#/components/schemas/CreateTwilioPhoneNumberDTO'
                title: TwilioPhoneNumber
              - $ref: '#/components/schemas/CreateVonagePhoneNumberDTO'
                title: VonagePhoneNumber
              - $ref: '#/components/schemas/CreateVapiPhoneNumberDTO'
                title: VapiPhoneNumber
              - $ref: '#/components/schemas/CreateTelnyxPhoneNumberDTO'
                title: TelnyxPhoneNumber
              discriminator:
                propertyName: provider
                mapping:
                  byo-phone-number: '#/components/schemas/CreateByoPhoneNumberDTO'
                  twilio: '#/components/schemas/CreateTwilioPhoneNumberDTO'
                  vonage: '#/components/schemas/CreateVonagePhoneNumberDTO'
                  vapi: '#/components/schemas/CreateVapiPhoneNumberDTO'
                  telnyx: '#/components/schemas/CreateTelnyxPhoneNumberDTO'
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                title: PhoneNumber
                oneOf:
                - $ref: '#/components/schemas/ByoPhoneNumber'
                  title: ByoPhoneNumber
                - $ref: '#/components/schemas/TwilioPhoneNumber'
                  title: TwilioPhoneNumber
                - $ref: '#/components/schemas/VonagePhoneNumber'
                  title: VonagePhoneNumber
                - $ref: '#/components/schemas/VapiPhoneNumber'
                  title: VapiPhoneNumber
                - $ref: '#/components/schemas/TelnyxPhoneNumber'
                  title: TelnyxPhoneNumber
                discriminator:
                  propertyName: provider
                  mapping:
                    byo-phone-number: '#/components/schemas/ByoPhoneNumber'
                    twilio: '#/components/schemas/TwilioPhoneNumber'
                    vonage: '#/components/schemas/VonagePhoneNumber'
                    vapi: '#/components/schemas/VapiPhoneNumber'
                    telnyx: '#/components/schemas/TelnyxPhoneNumber'
      tags:
      - Phone Numbers
      security:
      - bearer: []
    get:
      operationId: PhoneNumberController_findAll
      summary: List Phone Numbers
      parameters:
      - name: limit
        required: false
        in: query
        description: This is the maximum number of items to return. Defaults to 100.
        schema:
          minimum: 0
          maximum: 1000
          type: number
      - name: createdAtGt
        required: false
        in: query
        description: This will return items where the createdAt is greater than the specified value.
        schema:
          format: date-time
          type: string
      - name: createdAtLt
        required: false
        in: query
        description: This will return items where the createdAt is less than the specified value.
        schema:
          format: date-time
          type: string
      - name: createdAtGe
        required: false
        in: query
        description: This will return items where the createdAt is greater than or equal to the specified value.
        schema:
          format: date-time
          type: string
      - name: createdAtLe
        required: false
        in: query
        description: This will return items where the createdAt is less than or equal to the specified value.
        schema:
          format: date-time
          type: string
      - name: updatedAtGt
        required: false
        in: query
        description: This will return items where the updatedAt is greater than the specified value.
        schema:
          format: date-time
          type: string
      - name: updatedAtLt
        required: false
        in: query
        description: This will return items where the updatedAt is less than the specified value.
        schema:
          format: date-time
          type: string
      - name: updatedAtGe
        required: false
        in: query
        description: This will return items where the updatedAt is greater than or equal to the specified value.
        schema:
          format: date-time
          type: string
      - name: updatedAtLe
        required: false
        in: query
        description: This will return items where the updatedAt is less than or equal to the specified value.
        schema:
          format: date-time
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  title: PhoneNumber
                  oneOf:
                  - $ref: '#/components/schemas/ByoPhoneNumber'
                    title: ByoPhoneNumber
                  - $ref: '#/components/schemas/TwilioPhoneNumber'
                    title: TwilioPhoneNumber
                  - $ref: '#/components/schemas/VonagePhoneNumber'
                    title: VonagePhoneNumber
                  - $ref: '#/components/schemas/VapiPhoneNumber'
                    title: VapiPhoneNumber
                  - $ref: '#/components/schemas/TelnyxPhoneNumber'
                    title: TelnyxPhoneNumber
                  discriminator:
                    propertyName: provider
                    mapping:
                      byo-phone-number: '#/components/schemas/ByoPhoneNumber'
                      twilio: '#/components/schemas/TwilioPhoneNumber'
                      vonage: '#/components/schemas/VonagePhoneNumber'
                      vapi: '#/components/schemas/VapiPhoneNumber'
                      telnyx: '#/components/schemas/TelnyxPhoneNumber'
      tags:
      - Phone Numbers
      security:
      - bearer: []
  /v2/phone-number:
    get:
      operationId: PhoneNumberController_findAllPaginated
      summary: List Phone Numbers
      parameters:
      - name: search
        required: false
        in: query
        description: This will search phone numbers by name, number, or SIP URI (partial match, case-insensitive).
        schema:
          maxLength: 100
          type: string
      - name: page
        required: false
        in: query
        description: This is the page number to return. Defaults to 1.
        schema:
          minimum: 1
          type: number
      - name: sortOrder
        required: false
        in: query
        description: This is the sort order for pagination. Defaults to 'DESC'.
        schema:
          enum:
          - ASC
          - DESC
          type: string
      - name: sortBy
        required: false
        in: query
        description: This is the column to sort by. Defaults to 'createdAt'.
        schema:
          enum:
          - createdAt
          - duration
          - cost
          type: string
      - name: limit
        required: false
        in: query
        description: This is the maximum number of items to return. Defaults to 100.
        schema:
          minimum: 0
          maximum: 1000
          type: number
      - name: createdAtGt
        required: false
        in: query
        description: This will return items where the createdAt is greater than the specified value.
        schema:
          format: date-time
          type: string
      - name: createdAtLt
        required: false
        in: query
        description: This will return items where the createdAt is less than the specified value.
        schema:
          format: date-time
          type: string
      - name: createdAtGe
        required: false
        in: query
        description: This will return items where the createdAt is greater than or equal to the specified value.
        schema:
          format: date-time
          type: string
      - name: createdAtLe
        required: false
        in: query
        description: This will return items where the createdAt is less than or equal to the specified value.
        schema:
          format: date-time
          type: string
      - name: updatedAtGt
        required: false
        in: query
        description: This will return items where the updatedAt is greater than the specified value.
        schema:
          format: date-time
          type: string
      - name: updatedAtLt
        required: false
        in: query
        description: This will return items where the updatedAt is less than the specified value.
        schema:
          format: date-time
          type: string
      - name: updatedAtGe
        required: false
        in: query
        description: This will return items where the updatedAt is greater than or equal to the specified value.
        schema:
          format: date-time
          type: string
      - name: updatedAtLe
        required: false
        in: query
        description: This will return items where the updatedAt is less than or equal to the specified value.
        schema:
          format: date-time
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PhoneNumberPaginatedResponse'
      tags:
      - Phone Numbers
      security:
      - bearer: []
  /phone-number/{id}:
    get:
      operationId: PhoneNumberController_findOne
      summary: Get Phone Number
      parameters:
      - name: id
        required: true
        in: path
        schema:
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                title: PhoneNumber
                oneOf:
                - $ref: '#/components/schemas/ByoPhoneNumber'
                  title: ByoPhoneNumber
                - $ref: '#/components/schemas/TwilioPhoneNumber'
                  title: TwilioPhoneNumber
                - $ref: '#/components/schemas/VonagePhoneNumber'
                  title: VonagePhoneNumber
                - $ref: '#/components/schemas/VapiPhoneNumber'
                  title: VapiPhoneNumber
                - $ref: '#/components/schemas/TelnyxPhoneNumber'
                  title: TelnyxPhoneNumber
                discriminator:
                  propertyName: provider
                  mapping:
                    byo-phone-number: '#/components/schemas/ByoPhoneNumber'
                    twilio: '#/components/schemas/TwilioPhoneNumber'
                    vonage: '#/components/schemas/VonagePhoneNumber'
                    vapi: '#/components/schemas/VapiPhoneNumber'
                    telnyx: '#/components/schemas/TelnyxPhoneNumber'
      tags:
      - Phone Numbers
      security:
      - bearer: []
    patch:
      operationId: PhoneNumberController_update
      summary: Update Phone Number
      parameters:
      - name: id
        required: true
        in: path
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
              - $ref: '#/components/schemas/UpdateByoPhoneNumberDTO'
                title: ByoPhoneNumber
              - $ref: '#/components/schemas/UpdateTwilioPhoneNumberDTO'
                title: TwilioPhoneNumber
              - $ref: '#/components/schemas/UpdateVonagePhoneNumberDTO'
                title: VonagePhoneNumber
              - $ref: '#/components/schemas/UpdateVapiPhoneNumberDTO'
                title: VapiPhoneNumber
              - $ref: '#/components/schemas/UpdateTelnyxPhoneNumberDTO'
                title: TelnyxPhoneNumber
              discriminator:
                propertyName: provider
                mapping:
                  byo-phone-number: '#/components/schemas/UpdateByoPhoneNumberDTO'
                  twilio: '#/components/schemas/UpdateTwilioPhoneNumberDTO'
                  vonage: '#/components/schemas/UpdateVonagePhoneNumberDTO'
                  vapi: '#/components/schemas/UpdateVapiPhoneNumberDTO'
                  telnyx: '#/components/schemas/UpdateTelnyxPhoneNumberDTO'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                title: PhoneNumber
                oneOf:
                - $ref: '#/components/schemas/ByoPhoneNumber'
                  title: ByoPhoneNumber
                - $ref: '#/components/schemas/TwilioPhoneNumber'
                  title: TwilioPhoneNumber
                - $ref: '#/components/schemas/VonagePhoneNumber'
                  title: VonagePhoneNumber
                - $ref: '#/components/schemas/VapiPhoneNumber'
                  title: VapiPhoneNumber
                - $ref: '#/components/schemas/TelnyxPhoneNumber'
                  title: TelnyxPhoneNumber
                discriminator:
                  propertyName: provider
                  mapping:
                    byo-phone-number: '#/components/schemas/ByoPhoneNumber'
                    twilio: '#/components/schemas/TwilioPhoneNumber'
                    vonage: '#/components/schemas/VonagePhoneNumber'
                    vapi: '#/components/schemas/VapiPhoneNumber'
                    telnyx: '#/components/schemas/TelnyxPhoneNumber'
      tags:
      - Phone Numbers
      security:
      - bearer: []
    delete:
      operationId: PhoneNumberController_remove
      summary: Delete Phone Number
      parameters:
      - name: id
        required: true
        in: path
        schema:
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                title: PhoneNumber
                oneOf:
                - $ref: '#/components/schemas/ByoPhoneNumber'
                  title: ByoPhoneNumber
                - $ref: '#/components/schemas/TwilioPhoneNumber'
                  title: TwilioPhoneNumber
                - $ref: '#/components/schemas/VonagePhoneNumber'
                  title: VonagePhoneNumber
                - $ref: '#/components/schemas/VapiPhoneNumber'
                  title: VapiPhoneNumber
                - $ref: '#/components/schemas/TelnyxPhoneNumber'
                  title: TelnyxPhoneNumber
                discriminator:
                  propertyName: provider
                  mapping:
                    byo-phone-number: '#/components/schemas/ByoPhoneNumber'
                    twilio: '#/components/schemas/TwilioPhoneNumber'
                    vonage: '#/components/schemas/VonagePhoneNumber'
                    vapi: '#/components/schemas/VapiPhoneNumber'
                    telnyx: '#/components/schemas/TelnyxPhoneNumber'
      tags:
      - Phone Numbers
      security:
      - bearer: []
components:
  schemas:
    VonagePhoneNumber:
      type: object
      properties:
        fallbackDestination:
          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.'
          oneOf:
          - $ref: '#/components/schemas/TransferDestinationNumber'
            title: NumberTransferDestination
          - $ref: '#/components/schemas/TransferDestinationSip'
            title: SipTransferDestination
        hooks:
          type: array
          description: This is the hooks that will be used for incoming calls to this phone number.
          items:
            oneOf:
            - $ref: '#/components/schemas/PhoneNumberHookCallRinging'
              title: PhoneNumberHookCallRinging
            - $ref: '#/components/schemas/PhoneNumberHookCallEnding'
              title: PhoneNumberHookCallEnding
        provider:
          type: string
          description: This is to use numbers bought on Vonage.
          enum:
          - vonage
        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:
          format: date-time
          type: string
          description: This is the ISO 8601 date-time string of when the phone number was created.
        updatedAt:
          format: date-time
          type: string
          description: This is the ISO 8601 date-time string of when the phone number was last updated.
        status:
          type: string
          description: This is the status of the phone number.
          enum:
          - active
          - activating
          - blocked
        name:
          type: string
          description: This is the name of the phone number. This is just for your own reference.
          maxLength: 40
        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:
          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'
          allOf:
          - $ref: '#/components/schemas/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
    TransferPlan:
      type: object
      properties:
        mode:
          type: string
          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'''
          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
        message:
          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`.'
          oneOf:
          - type: string
          - $ref: '#/components/schemas/CustomMessage'
        timeout:
          type: number
          description: 'This is the timeout in seconds for the warm-transfer-wait-for-operator-to-speak-first-and-then-say-message/summary


            @default 60'
          minimum: 1
          maximum: 600
          default: 60
        sipVerb:
          type: object
          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'
          default: refer
          enum:
          - refer
          - bye
          - dial
        dialTimeout:
          type: number
          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'
          minimum: 1
          maximum: 600
          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:
          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'' }'
          oneOf:
          - $ref: '#/components/schemas/ContextEngineeringPlanLastNMessages'
            title: Last N Messages
          - $ref: '#/components/schemas/ContextEngineeringPlanNone'
            title: None
          - $ref: '#/components/schemas/ContextEngineeringPlanAll'
            title: 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>

            ```'
          maxLength: 4096
        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`.'
          allOf:
          - $ref: '#/components/schemas/SummaryPlan'
        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:
          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.'
          allOf:
          - $ref: '#/components/schemas/TransferFallbackPlan'
      required:
      - mode
    PhoneNumberHookCallRinging:
      type: object
      properties:
        'on':
          type: string
          description: This is the event to trigger the hook on
          enum:
          - call.ringing
          maxLength: 1000
        filters:
          type: array
          description: Optional filters to decide when to trigger the hook. Currently supports filtering by caller country code.
          items:
            $ref: '#/components/schemas/PhoneNumberCallRingingHookFilter'
        do:
          type: array
          description: Only the first action will be executed. Additional actions will be ignored.
          items:
            oneOf:
            - $ref: '#/components/schemas/TransferPhoneNumberHookAction'
              title: TransferPhoneNumberHookAction
            - $ref: '#/components/schemas/SayPhoneNumberHookAction'
              title: SayPhoneNumberHookAction
      required:
      - 'on'
      - do
    ContextEngineeringPlanAll:
      type: object
      properties:
        type:
          type: string
          enum:
          - all
      required:
      - type
    CreateTwilioPhoneNumberDTO:
      type: object
      properties:
        fallbackDestination:
          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.'
          oneOf:
          - $ref: '#/components/schemas/TransferDestinationNumber'
            title: NumberTransferDestination
          - $ref: '#/components/schemas/TransferDestinationSip'
            title: SipTransferDestination
        hooks:
          type: array
          description: This is the hooks that will be used for incoming calls to this phone number.
          items:
            oneOf:
            - $ref: '#/components/schemas/PhoneNumberHookCallRinging'
              title: PhoneNumberHookCallRinging
            - $ref: '#/components/schemas/PhoneNumberHookCallEnding'
              title: PhoneNumberHookCallEnding
        provider:
          type: string
          description: This is to use numbers bought on Twilio.
          enum:
          - twilio
        smsEnabled:
          type: boolean
          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'
          default: true
        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.
        name:
          type: string
          description: This is the name of the phone number. This is just for your own reference.
          maxLength: 40
        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:
          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'
          allOf:
          - $ref: '#/components/schemas/Server'
      required:
      - provider
      - number
      - twilioAccountSid
    CreateVonagePhoneNumberDTO:
      type: object
      properties:
        fallbackDestination:
          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 n

# --- truncated at 32 KB (103 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/vapi/refs/heads/main/openapi/vapi-phone-numbers-api-openapi.yml