create
Import a phone number from an external provider.
Request
number
The phone number to import in E.164 format. Number must be between 5 and 30 characters with no special characters besides a leading +.
number_type
The type of phone number being imported.
Allowed values:
capabilities
The capabilities to enable for this phone number. Can include any combination of SMS, Voice, Fax, and MMS. If not provided, defaults to all capabilities.
Allowed values:
Response
id
The unique identifier of the phone number.
number
The phone number in E.164 format.
name
The name given to the phone number. Helps to distinguish different phone numbers within your project.
capabilities
A list of communication methods this phone number supports.
Allowed values:
number_type
The type of number this is defined as.
Allowed values:
e911_address_id
The E911 address ID associated with this phone number.
created_at
The date the number was added to your project.
updated_at
The date the number was last updated.
next_billed_at
The next date the number will be billed for.
call_handler
What type of handler you want to run on inbound calls.
calling_handler_resource_id
The unique identifier of the calling handler resource.
call_receive_mode
How do you want to receive the incoming call.
Allowed values:
call_request_url
The URL to make a request to when using the laml_webhooks call handler.
call_request_method
The HTTP method to use when making a request to the call_request_url.
Allowed values:
call_fallback_url
The fallback URL to make a request to when using the laml_webhooks call handler and the call_request_url fails.
call_fallback_method
The HTTP method to use when making a request to the call_fallback_url.
Allowed values:
call_status_callback_url
The URL to make status callbacks to when using the laml_webhooks call handler.
call_status_callback_method
The HTTP method to use when making a request to the call_status_callback_url.
Allowed values:
call_laml_application_id
The ID of the LaML Application to use when using the laml_application call handler.
call_dialogflow_agent_id
The ID of the Dialogflow Agent to start when using the dialogflow call handler.
call_relay_topic
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_url
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_url
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_context
The name of the Relay Context to send this call to when using the relay_context call handler.
call_relay_context_status_callback_url
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_application
The name of the Relay Application to send this call to when using the relay_application call handler.
call_relay_connector_id
The ID of the Relay Connector to send this call to when using the relay_connector call handler.
call_sip_endpoint_id
The ID of the Relay SIP Endpoint to send this call to when using the relay_sip_endpoint call handler.
call_verto_resource
The name of the Verto Relay Endpoint to send this call to when using the relay_verto_endpoint call handler.
call_video_room_id
The ID of the Video Room to send this call to when using the video_room call handler.
message_handler
What type of handler you want to run on inbound messages.
Allowed values:
messaging_handler_resource_id
The unique identifier of the messaging handler resource.
message_request_url
The URL to make a request to when using the laml_webhooks message handler.
message_request_method
The HTTP method to use when making a request to the message_request_url.
Allowed values:
message_fallback_url
The fallback URL to make a request to when using the laml_webhooks message handler and the message_request_url fails.
message_fallback_method
The HTTP method to use when making a request to the message_fallback_url.
Allowed values:
message_laml_application_id
The ID of the LaML Application to use when using the laml_application message handler.
message_relay_topic
The name of the Relay Topic to send this message to when using the relay_topic message handler.
message_relay_context
The name of the Relay Context to send this message to when using the relay_context message handler.
country_code
The ISO 3166-1 alpha-2 country code of the phone number.
Response Example
Response