Update Phone Number

PATCH

Path parameters

idstringRequired

Headers

Auth
AuthorizationstringRequired
Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

This endpoint expects an object.
fallbackDestinationobjectOptional

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.

namestringOptional<=40 characters

This is the name of the phone number. This is just for your own reference.

assistantIdstringOptional

This is the assistant that will be used for incoming calls to this phone number.

If neither assistantId nor squadId 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.

squadIdstringOptional

This is the squad that will be used for incoming calls to this phone number.

If neither assistantId nor squadId 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.

serverUrlstringOptional

This is the server URL where messages will be sent for calls on this number. This includes the assistant-request message.

You can see the shape of the messages sent in ServerMessage.

This overrides the org.serverUrl. Order of precedence: tool.server.url > assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl.

serverUrlSecretstringOptional

This is the secret Vapi will send with every message to your server. It’s sent as a header called x-vapi-secret.

Same precedence logic as serverUrl.

Response

Byo Phone Number
OR
Twilio
OR
Vonage
OR
Vapi