SWML Webhook
Create SWML webhook
Creates a resource that requests calling or messaging SWML from your server when the handler runs. Use it when instructions must be generated from current application state; use Create SWML Script when the SWML can be stored in SignalWire, or Create cXML webhook when the server returns cXML.
Permissions
The API token used to authenticate must have the following scope(s) enabled to make a successful request: Voice, Messaging, Fax, or Video.
Learn more about API scopes.
post/api/fabric/resources/swml_webhooks
Request body
Example request
{
"name": "My SWML Webhook",
"used_for": "calling",
"primary_request_url": "https://primary.com",
"fallback_request_url": "https://fallback.com",
"status_callback_url": "https://callback.com"
}Response
The request has succeeded and a new resource has been created as a result.
Example response
{
"display_name": "Booking Assistant",
"type": "swml_webhook",
"created_at": "2024-05-06T12:20:00Z",
"updated_at": "2024-05-06T12:20:00Z",
"swml_webhook": {
"name": "My SWML Webhook",
"used_for": "calling",
"primary_request_url": "https://primary.com",
"fallback_request_url": "https://fallback.com",
"status_callback_url": "https://callback.com"
}
}Changes
No changes found, but 3 of the 137 revisions have a changelog that could not be searched — this endpoint may have changed in one of them.