create
Create a new SWML webhook resource.
Request
primary_request_url
Primary URL SignalWire fetches the SWML document from when the webhook fires. The webhook payload depends on `used_for`: for `calling`, see the [SWML inbound call webhook](/docs/apis/rest/swml-webhook/webhooks/inbound-call-webhook); for `messaging`, see the [SWML inbound message webhook](/docs/apis/rest/swml-webhook/webhooks/inbound-message-webhook).
name
Name of the SWML Webhook.
used_for
Indicates whether this SWML Webhook handles inbound calls or inbound messages. Determines the payload SignalWire POSTs to `primary_request_url`.
Allowed values:
primary_request_method
Primary request method of the SWML Webhook.
Allowed values:
fallback_request_url
Fallback URL SignalWire fetches the SWML document from if the primary URL fails. Receives the same payload as `primary_request_url` — see the [SWML inbound call webhook](/docs/apis/rest/swml-webhook/webhooks/inbound-call-webhook) or [SWML inbound message webhook](/docs/apis/rest/swml-webhook/webhooks/inbound-message-webhook) depending on `used_for`.
fallback_request_method
Fallback request method of the SWML Webhook.
Allowed values:
status_callback_url
URL to receive message status callback events for outbound messages sent by this webhook (`reply` or `send_sms`). See the [Message status callback](/docs/apis/rest/messages/webhooks/message-status-callback) webhook for the payload your URL will receive.
status_callback_method
Status callback method of the SWML Webhook.
Allowed values:
Response
id
Unique ID of the SWML Webhook.
project_id
Unique ID of the Project.
display_name
Display name of the SWML Webhook Fabric Resource
type
Type of the Fabric Resource
Allowed values:
created_at
Date and time when the resource was created.
updated_at
Date and time when the resource was updated.
swml_webhook
SWML Webhook data.
Response Example
Response