SWML Webhook
SWML inbound message webhook
Payload sent by SignalWire to a SWML messaging webhook URL when an inbound SMS or MMS message arrives on a phone number configured with a SWML message handler. The same payload shape is also used when the SWML messaging transfer method targets an external URL — in that case, params carries the values supplied to the transfer step and vars carries the propagated runtime variables from the originating document.
The webhook URL is expected to respond with the SWML document to execute for the inbound message.
postWebhookinboundMessageWebhook
Payload
Example payload
{
"message": {
"message_id": "c2d3e4f5-a6b7-8901-cdef-234567890abc",
"project_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"space_id": "d3e4f5a6-b7c8-9012-defa-345678901bcd",
"direction": "inbound",
"type": "sms",
"from": "+15551231234",
"to": "+15553214321",
"body": "Hello, I need help",
"media": [],
"segments": 1,
"timestamp": "2024-01-15T10:30:00Z"
},
"vars": {
"request_result": "success",
"reply_result": "queued"
},
"params": {}
}Response
Webhook received