Create domain application

View as MarkdownOpen in Claude
Creates a SIP Domain Application that accepts inbound SIP traffic on its generated domain and routes calls to the configured handler. Use it for inbound bring-your-own-carrier or other custom SIP-domain routing. If the handler is an already-created Fabric resource, create the Domain Application first, then use [Assign domain application handler](/docs/apis/rest/domain-applications/assign-resource-domain-application). #### Permissions The API token used to authenticate must have the following scope(s) enabled to make a successful request: _Voice_, _Messaging_, or _Fax_. [Learn more about API scopes](/docs/platform/your-signalwire-api-space).

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) ```

Request

This endpoint expects an object.
namestringRequired
A string representing the friendly name for this domain application.
identifierstringRequired
A string representing the identifier portion of the domain application.
userstringOptionalDefaults to *
The user portion of the domain application.
ip_auth_enabledbooleanOptional
Whether the domain application will enforce IP authentication for incoming requests.
ip_authlist of stringsOptionalDefaults to []

A list containing whitelisted IP addresses and IP blocks used if ip_auth_enabled is true.

encryptionenumOptionalDefaults to optional
Whether connections to this domain application require encryption or if encryption is optional.
codecslist of stringsOptionalDefaults to ["PCMU","PCMA"]
A list of codecs this domain application will support.
cipherslist of stringsOptionalDefaults to ["AEAD_AES_256_GCM_8","AES_256_CM_HMAC_SHA1_80","AES_CM_128_HMAC_SHA1_80","AES_256_CM_HMAC_SHA1_32","AES_CM_128_HMAC_SHA1_32"]
A list of encryption ciphers this domain application will support.
call_handlerenumOptional
Specify how the domain application will handle calls.
call_relay_topicstringOptional

A string representing the Relay topic to forward incoming calls to. Required when call_handler is relay_topic.

call_relay_topic_status_callback_urlstringOptional
A string representing a URL to send status change messages to.
call_relay_applicationstringOptional

A string representing the Relay Application to forward incoming calls to. Required when call_handler is relay_application.

call_request_urlstringOptional

A string representing the LaML URL to access when a call is received. Required when call_handler is laml_webhooks.

call_request_methodenumOptionalDefaults to POST

A string representing the HTTP method to use with call_request_url.

call_fallback_urlstringOptional

A string representing the LaML URL to access when the call to call_request_url fails.

call_fallback_methodenumOptionalDefaults to POST

A string representing the HTTP method to use with call_fallback_url.

call_status_callback_urlstringOptional
A string representing a URL to send status change messages to.
call_status_callback_methodenumOptionalDefaults to POST

A string representing the HTTP method to use with call_status_callback_url.

call_laml_application_idstringOptional

A string representing the ID of the LaML application to forward incoming calls to. Required when call_handler is laml_application.

call_video_room_idstringOptionalformat: "uuid"

A string representing the ID of the Video Room to forward incoming calls to. Required when call_handler is video_room.

call_relay_script_urlstringOptional

A string representing the URL of the Relay script to execute when a call is received. Required when call_handler is relay_script.

call_dialogflow_agent_idstringOptionalformat: "uuid"

A string representing the ID of the Dialogflow Agent to forward incoming calls to. Required when call_handler is dialogflow.

call_ai_agent_idstringOptionalformat: "uuid"

A string representing the ID of the AI Agent to forward incoming calls to. Required when call_handler is ai_agent.

call_flow_idstringOptionalformat: "uuid"

A string representing the ID of the Call Flow to forward incoming calls to. Required when call_handler is call_flow.

call_flow_versionenumOptional
A string representing the version of your Call Flow you'd like to use.
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.

Response

The request has succeeded and a new resource has been created as a result.
idstringformat: "uuid"
The unique identifier of the domain application on SignalWire.
typestring
A string representation of the type of object this record is.
domainstring
The unique domain for this application, combining your space subdomain and identifier.
namestring or null
A string representing the friendly name for this domain application.
identifierstring
A string representing the identifier portion of the domain application.
userstring
A string representing the user portion of the domain application.
ip_auth_enabledboolean
Whether the domain application will enforce IP authentication for incoming requests.
ip_authlist of strings

A list containing whitelisted IP addresses and IP blocks used if ip_auth_enabled is true.

call_handlerenum or null
Specify how the domain application will handle calls.
calling_handler_resource_idstring or nullformat: "uuid"
The unique identifier of the calling handler resource.
call_relay_topicstring or null
A string representing the Relay topic to forward incoming calls to.
call_relay_topic_status_callback_urlstring or null
A string representing a URL to send status change messages to.
call_request_urlstring or null
A string representing the LaML URL to access when a call is received.
call_request_methodenum or null

A string representing the HTTP method to use with call_request_url.

call_fallback_urlstring or null

A string representing the LaML URL to access when the call to call_request_url fails.

call_fallback_methodenum or null

A string representing the HTTP method to use with call_fallback_url.

call_status_callback_urlstring or null
A string representing a URL to send status change messages to.
call_status_callback_methodenum or null

A string representing the HTTP method to use with call_status_callback_url.

call_laml_application_idstring or null
A string representing the ID of the LaML application to forward incoming calls to.
call_video_room_idstring or nullformat: "uuid"
A string representing the ID of the Video Room to forward incoming calls to.
call_relay_script_urlstring or null
A string representing the URL of the Relay script to execute when a call is received.
encryptionenum
A string representing whether connections to this domain application require encryption or if encryption is optional. Valid values are optional, required, and forbidden.
codecslist of strings

A list of codecs this domain application will support. Currently supported values are: OPUS, G722, PCMU, PCMA, G729, VP8, and H264.

cipherslist of strings

A list of encryption ciphers this domain application will support. Currently supported values are: AEAD_AES_256_GCM_8, AES_256_CM_HMAC_SHA1_80, AES_CM_128_HMAC_SHA1_80, AES_256_CM_HMAC_SHA1_32, and AES_CM_128_HMAC_SHA1_32.

call_relay_contextstring or nullDeprecated

Deprecated. Use call_relay_application instead.

call_relay_context_status_callback_urlstring or nullDeprecated

Deprecated. Use call_relay_topic_status_callback_url instead.

Errors

401
Unauthorized Error
422
Unprocessable Entity Error
500
Internal Server Error