For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Log inSign up
Support
  • Core
    • Overview
    • Authorization
    • Base URL
    • Data formats
    • Paging
    • Error codes
    • Permissions
  • Calling
  • Datasphere
  • Logs
  • Messaging
  • Phone Number Management
  • Platform
  • Resource Management
        • POSTSWML inbound call webhook
        • POSTSWML inbound message webhook
      • POSTCreate SWML webhook
      • DELDelete SWML webhook
      • GETGet SWML webhook
      • GETList SWML webhook Addresses
      • GETList SWML webhooks
      • PATCHUpdate SWML webhook
LogoLogoSignalWire Docs
Log inSign up
Support
Resource ManagementSWML WebhookWebhooks

SWML inbound message webhook

|View as Markdown|Open in Claude|
Payload
1{
2 "message": {
3 "message_id": "c2d3e4f5-a6b7-8901-cdef-234567890abc",
4 "project_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
5 "space_id": "d3e4f5a6-b7c8-9012-defa-345678901bcd",
6 "direction": "inbound",
7 "type": "sms",
8 "from": "+15551231234",
9 "to": "+15553214321",
10 "body": "Hello, I need help",
11 "media": [],
12 "segments": 1,
13 "timestamp": "2024-01-15T10:30:00Z"
14 },
15 "params": {}
16}
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.
Was this page helpful?
Previous

Create SWML webhook

Next
Built with

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