Skip to navigation

SWML inbound message webhook

View as MarkdownOpen in Claude

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.

Payload

The payload of this webhook request is an object.
messageobjectRequired
The inbound message that triggered this fetch.
paramsobjectRequired

Parameters passed via a SWML messaging transfer step. An empty object on the initial document fetch.

varsobjectOptional

Script-scope variables propagated from the SWML document that issued a transfer step. Absent on the initial inbound-message fetch; present (possibly empty) on fetches driven by a transfer step inside a full-mode SWML document. Common keys include request_result, request_response, request_response_code, request_response_body, reply_result, and reply_message_id.

Response

200
Webhook received