Update a Phone Number

View as Markdown

Updates a phone number.

Permissions

The API token used to authenticate must have the following scope(s) enabled to make a successful request: Numbers.

Learn more about API scopes.

Authentication

AuthorizationBasic
SignalWire Basic Authentication using Project ID and API Token. The client sends HTTP requests with the Authorization header containing the word Basic followed by a space and a base64-encoded string of project_id:token. The project ID will be used as the username and the API token as the password. Example: ``` Authorization: Basic base64(project_id:token) ```

Path parameters

idstringRequiredformat: "uuid"
Unique ID of the phone number.

Request

This endpoint expects an object.
namestringOptional
The friendly name for the phone number.
call_handlerenumOptional
The call handler for the phone number.
call_receive_modestringOptional
The call receive mode for the phone number.
call_request_urlstringOptional
The call request URL for the phone number.
call_request_methodenumOptional
The call request method for the phone number.
Allowed values:
call_fallback_urlstringOptional
The call fallback URL for the phone number.
call_fallback_methodenumOptional
The call fallback method for the phone number.
Allowed values:
call_status_callback_urlstringOptional
The call status callback URL for the phone number.
call_status_callback_methodenumOptional
The call status callback method for the phone number.
Allowed values:
call_laml_application_idstringOptional

The ID of the LaML Application to use when using the laml_application call handler.

call_dialogflow_agent_idstringOptional
The ID of the Dialogflow Agent to start when using the dialogflow call handler.
call_relay_topicstringOptional
A string representing the Relay topic to forward incoming calls to.
call_relay_topic_status_callback_urlstringOptional

A string representing a URL to send status change messages to when call_handler is set to relay_topic.

call_relay_script_urlstringOptional

The URL to make a request to when using the relay_script call handler.

call_relay_applicationstringOptional
A string representing the Relay Application to forward incoming calls to.
call_relay_connector_idstringOptional

The ID of the Relay Connector to use when using the relay_connector call handler.

call_sip_endpoint_idstringOptional

The ID of the SIP Endpoint to use when using the relay_sip_endpoint call handler.

call_verto_resourcestringOptional

The Verto resource to use when using the relay_verto_endpoint call handler.

call_video_room_idstringOptionalformat: "uuid"

The ID of the Video Room to forward incoming calls to when using the video_room call handler.

message_handlerenumOptional
The message handler for the phone number.
Allowed values:
message_request_urlstringOptional
The message request URL for the phone number.
message_request_methodenumOptional
The message request method for the phone number.
Allowed values:
message_fallback_urlstringOptional
The message fallback URL for the phone number.
message_fallback_methodenumOptional
The message fallback method for the phone number.
Allowed values:
message_laml_application_idstringOptional
The ID of the LaML Application to use for messages.
message_relay_topicstringOptional
A string representing the Relay topic to forward incoming messages to.
message_relay_applicationstringOptional
A string representing the Relay Application to forward incoming messages to.
call_relay_contextstringOptionalDeprecated

This handler type is deprecated. Please use call_relay_application or call_relay_topic instead.

call_relay_context_status_callback_urlstringOptionalDeprecated

This property is deprecated. Please use call_relay_topic_status_callback_url instead.

message_relay_contextstringOptionalDeprecated

This handler type is deprecated. Please use message_relay_application or message_relay_topic instead.

Response

The request has succeeded.
idstringformat: "uuid"
The unique identifier of the phone number.
numberstring
The phone number in E.164 format.
namestring or null
The name given to the phone number. Helps to distinguish different phone numbers within your project.
capabilitieslist of enums
A list of communication methods this phone number supports.
Allowed values:
number_typeenum
The type of number this is defined as.
Allowed values:
e911_address_idstring or nullformat: "uuid"
The E911 address ID associated with this phone number.
created_atdatetime
The date the number was added to your project.
updated_atdatetime
The date the number was last updated.
next_billed_atdatetime or null
The next date the number will be billed for.
call_handlerenum or null
What type of handler you want to run on inbound calls.
calling_handler_resource_idstring or nullformat: "uuid"
The unique identifier of the calling handler resource.
call_receive_modeenum
How do you want to receive the incoming call.
Allowed values:
call_request_urlstring or null

The URL to make a request to when using the laml_webhooks call handler.

call_request_methodenum or null

The HTTP method to use when making a request to the call_request_url.

Allowed values:
call_fallback_urlstring or null

The fallback URL to make a request to when using the laml_webhooks call handler and the call_request_url fails.

call_fallback_methodenum or null

The HTTP method to use when making a request to the call_fallback_url.

Allowed values:
call_status_callback_urlstring or null

The URL to make status callbacks to when using the laml_webhooks call handler.

call_status_callback_methodenum or null

The HTTP method to use when making a request to the call_status_callback_url.

Allowed values:
call_laml_application_idstring or null

The ID of the LaML Application to use when using the laml_application call handler.

call_dialogflow_agent_idstring or null
The ID of the Dialogflow Agent to start when using the dialogflow call handler.
call_relay_topicstring or null

A string representing the Relay topic to forward incoming calls to. This is only used (and required) when call_handler is set to relay_topic.

call_relay_topic_status_callback_urlstring or null

A string representing a URL to send status change messages to. This is only used (and required) when call_handler is set to relay_topic.

call_relay_script_urlstring or null

The URL to make a request to when using the relay_script call handler. The URL must respond with a valid SWML script.

call_relay_contextstring or null

The name of the Relay Context to send this call to when using the relay_context call handler.

call_relay_context_status_callback_urlstring or null

A string representing a URL to send status change messages to. This is only used (and required) when call_handler is set to relay_context.

call_relay_applicationstring or null

The name of the Relay Application to send this call to when using the relay_application call handler.

call_relay_connector_idstring or null

The ID of the Relay Connector to send this call to when using the relay_connector call handler.

call_sip_endpoint_idstring or nullformat: "uuid"

The ID of the Relay SIP Endpoint to send this call to when using the relay_sip_endpoint call handler.

call_verto_resourcestring or null

The name of the Verto Relay Endpoint to send this call to when using the relay_verto_endpoint call handler.

call_video_room_idstring or nullformat: "uuid"

The ID of the Video Room to send this call to when using the video_room call handler.

message_handlerenum or null
What type of handler you want to run on inbound messages.
Allowed values:
messaging_handler_resource_idstring or nullformat: "uuid"
The unique identifier of the messaging handler resource.
message_request_urlstring or null

The URL to make a request to when using the laml_webhooks message handler.

message_request_methodenum or null

The HTTP method to use when making a request to the message_request_url.

Allowed values:
message_fallback_urlstring or null

The fallback URL to make a request to when using the laml_webhooks message handler and the message_request_url fails.

message_fallback_methodenum or null

The HTTP method to use when making a request to the message_fallback_url.

Allowed values:
message_laml_application_idstring or null

The ID of the LaML Application to use when using the laml_application message handler.

message_relay_topicstring or null

The name of the Relay Topic to send this message to when using the relay_topic message handler.

message_relay_contextstring or null

The name of the Relay Context to send this message to when using the relay_context message handler.

country_codestring or null

The ISO 3166-1 alpha-2 country code of the phone number.

Errors