Create a Domain Application
POST/domain_applications
To create a new domain application, you send a POST
request to the
domain application resource.
Permissions
The API token must include the following scopes: Voice.
Request
- application/json
Body
required
- Relay Topic
- Relay Application
- LaML Webhooks
- LaML Application
- Video Room
- Relay Script
- Dialogflow
- AI Agent
- Call Flow
- Relay Context (Deprecated)
oneOf
Specifies that this domain application uses a Relay topic handler
Possible values: [relay_topic
]
A string representing the Relay topic to forward incoming calls to.
office
A string representing a URL to send status change messages to.
https://myapplication/handle_relay_callbacks
Specifies that this domain application uses a Relay application handler
Possible values: [relay_application
]
A string representing the Relay Application to forward incoming calls to.
my-relay-app
Specifies that this domain application uses LaML webhooks
Possible values: [laml_webhooks
]
A string representing the LaML URL to access when a call is received.
https://example.com/laml
A string representing the HTTP method to use with call_request_url
.
Possible values: [GET
, POST
]
POST
A string representing the LaML URL to access when the call to call_request_url
fails.
https://example.com/fallback
A string representing the HTTP method to use with call_fallback_url
.
Possible values: [GET
, POST
]
POST
A string representing a URL to send status change messages to.
https://example.com/status
A string representing the HTTP method to use with call_status_callback_url
.
Possible values: [GET
, POST
]
POST
Specifies that this domain application uses a LaML application
Possible values: [laml_application
]
A string representing the ID of the LaML application to forward incoming calls to.
app-123456
Specifies that this domain application uses a Video Room
Possible values: [video_room
]
A string representing the ID of the Video Room to forward incoming calls to.
fe4093d9-58c2-4931-b4b9-5679f82652c6
Specifies that this domain application uses a Relay script
Possible values: [relay_script
]
A string representing the URL of the Relay script to execute when a call is received.
https://example.com/relay-script
Specifies that this domain application uses a Dialogflow agent
Possible values: [dialogflow
]
A string representing the ID of the Dialogflow Agent to forward incoming calls to.
fe4093d9-58c2-4931-b4b9-5679f82652c6
Specifies that this domain application uses an AI agent
Possible values: [ai_agent
]
A string representing the ID of the AI Agent to forward incoming calls to.
fe4093d9-58c2-4931-b4b9-5679f82652c6
Specifies that this domain application uses a Call Flow
Possible values: [call_flow
]
A string representing the ID of the Call Flow to forward incoming calls to.
fe4093d9-58c2-4931-b4b9-5679f82652c6
A string representing the version of your Call Flow you'd like to use.
Possible values: [working_copy
, current_deployed
]
working_copy
This handler type is deprecated. Please use call_relay_application
or call_relay_topic
instead.
Possible values: [relay_context
]
This handler type is deprecated. Please use call_relay_application
or call_relay_topic
instead.
office
This property is deprecated. Please use call_relay_topic_status_callback_url
instead.
https://myapplication/handle_relay_callbacks
A string representing the friendly name for this domain application.
Test App
A string representing the identifier portion of the domain application. Must be unique across your project. Must be letters, numbers, and dash only.
test-id
Whether the domain application will enforce IP authentication for incoming requests.
true
A list containing whitelisted IP addresses and IP blocks used if ip_auth_enabled
is true
.
["8.8.8.8","4.4.4.4"]
A string representing whether connections to this domain application require encryption or if encryption is optional. Encryption will always be used if possible. Valid values are optional
and required
.
required
A list of codecs this domain application will support. Currently supported values are OPUS
, G722
, PCMU
, PCMA
, VP8
, and H264
. At least one value must be supplied.
["PCMU","PCMA"]
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
. At least one value must be supplied.
["AEAD_AES_256_GCM_8"]
Responses
- 201
CREATED
- application/json
- Schema
- Example (from schema)
Schema
The unique identifier of the domain application on SignalWire. This can be used to update or delete the application programmatically.
A string representation of the type of object this record is.
domain_application
A string representation of the subdomain for this application.
your-space-test_id
A string representing the friendly name for this domain application.
Test App
A string representing the identifier portion of the domain application. Must be unique across your project. Must be letters, numbers, and dash only.
test-id
Whether the domain application will enforce IP authentication for incoming requests.
true
A list containing whitelisted IP addresses and IP blocks used if ip_auth_enabled
is true
.
["8.8.8.8","4.4.4.4"]
A string representing how this domain application handles calls. Valid values are relay_context
, relay_topic
, relay_application
, laml_webhooks
, laml_application
, video_room
, relay_script
, dialogflow
, ai_agent
, and call_flow
.
relay_application
A string representing the LaML URL to access when a call is received. This is only used (and required) when call_handler
is set to laml_webhooks
.
null
A string representing the HTTP method to use with call_request_url
. Valid values are GET
and POST
. This is only used (and required) when call_handler
is set to laml_webhooks
.
POST
A string representing the LaML URL to access when the call to call_request_url
fails. This is only used (and required) when call_handler
is set to laml_webhooks
.
null
A string representing the HTTP method to use with call_fallback_url
. Valid values are GET
and POST
. This is only used (and required) when call_handler
is set to laml_webhooks
.
POST
A string representing a URL to send status change messages to. This is only used (and required) when call_handler
is set to laml_webhooks
.
null
A string representing the HTTP method to use with call_status_callback_url
. Valid values are GET
and POST
. This is only used (and required) when call_handler
is set to laml_webhooks
.
POST
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
. Alias of call_relay_application
. If both are sent, call_relay_application
takes precedence.
office
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
.
https://myapplication/handle_relay_callbacks
A string representing the Relay context to forward incoming calls to. This is only used (and required) when call_handler
is set to relay_context
. Alias of call_relay_application
. If both are sent, call_relay_application
takes precedence.
office
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
.
https://myapplication/handle_relay_callbacks
A string representing the Relay Application to forward incoming calls to. This is only used (and required) when call_handler
is set to relay_application
. Alias of call_relay_context
. If both are sent, call_relay_application
takes precedence.
null
A string representing the URL of the Relay script to execute when a call is received. This is only used (and required) when call_handler
is set to relay_script
.
null
A string representing the ID of the LaML application to forward incoming calls to. This is only used (and required) when call_handler
is set to laml_application
.
null
A string representing the ID of the Video Room to forward incoming calls to. This is only used (and required) when call_handler
is set to video_room
.
fe4093d9-58c2-4931-b4b9-5679f82652c6
A string representing the ID of the Dialogflow Agent to forward incoming calls to. This is only used (and required) when call_handler
is set to dialogflow
.
fe4093d9-58c2-4931-b4b9-5679f82652c6
A string representing the ID of the AI Agent to forward incoming calls to. This is only used (and required) when call_handler
is set to ai_agent
.
fe4093d9-58c2-4931-b4b9-5679f82652c6
A string representing the ID of the Call Flow to forward incoming calls to. This is only used (and required) when call_handler
is set to call_flow
.
fe4093d9-58c2-4931-b4b9-5679f82652c6
A string representing the version of your Call Flow you'd like to use. Valid options are working_copy
or current_deployed
. This is only used when call_handler
is set to call_flow
.
working_copy
A string representing whether connections to this domain application require encryption or if encryption is optional. Encryption will always be used if possible. Valid values are optional
and required
.
required
A list of codecs this domain application will support. Currently supported values are: OPUS
, G722
, PCMU
, PCMA
, VP8
, and H264
. At least one value must be supplied.
["PCMU","PCMA"]
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
. At least one value must be supplied.
["AEAD_AES_256_GCM_8"]
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"type": "domain_application",
"domain": "your-space-test_id",
"name": "Test App",
"identifier": "test-id",
"ip_auth_enabled": true,
"ip_auth": [
"8.8.8.8",
"4.4.4.4"
],
"call_handler": "relay_application",
"call_request_url": null,
"call_request_method": "POST",
"call_fallback_url": null,
"call_fallback_method": "POST",
"call_status_callback_url": null,
"call_status_callback_method": "POST",
"call_relay_topic": "office",
"call_relay_topic_status_callback_url": "https://myapplication/handle_relay_callbacks",
"call_relay_application": null,
"call_relay_script_url": null,
"call_laml_application_id": null,
"call_video_room_id": "fe4093d9-58c2-4931-b4b9-5679f82652c6",
"call_dialogflow_agent_id": "fe4093d9-58c2-4931-b4b9-5679f82652c6",
"call_ai_agent_id": "fe4093d9-58c2-4931-b4b9-5679f82652c6",
"call_flow_id": "fe4093d9-58c2-4931-b4b9-5679f82652c6",
"call_flow_version": "working_copy",
"encryption": "required",
"codecs": [
"PCMU",
"PCMA"
],
"ciphers": [
"AEAD_AES_256_GCM_8"
]
}