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 call webhook

|View as Markdown|Open in Claude|
Payload
1{
2 "call": {
3 "call_id": "c2d3e4f5-a6b7-8901-cdef-234567890abc",
4 "node_id": "a1b2c3d4-1111-2222-3333-444455556666",
5 "segment_id": "d3e4f5a6-b7c8-9012-defa-345678901bcd",
6 "call_state": "created",
7 "direction": "inbound",
8 "type": "sip",
9 "from": "sip:user@example.com",
10 "to": "sip:destination@yourdomain.com",
11 "headers": [],
12 "project_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
13 "space_id": "d3e4f5a6-b7c8-9012-defa-345678901bcd"
14 },
15 "vars": {
16 "user_selection": "1"
17 },
18 "envs": {
19 "api_key": "<YOUR_API_KEY>",
20 "webhook_url": "https://example.com/webhook",
21 "id": "12345",
22 "case_number": "54321"
23 },
24 "params": {
25 "department": "sales"
26 }
27}
Payload sent by SignalWire to a SWML calling webhook URL when SWML is fetched for a call. This includes inbound calls arriving on a phone number configured with a SWML calling handler, and outbound REST-initiated calls that point at a SWML URL. The same payload shape is also used when the SWML calling `transfer` or `execute` method targets an external URL — in those cases, the `params` object carries the values supplied to that step. The webhook URL is expected to respond with the SWML document to execute for the call.
Was this page helpful?
Previous

SWML inbound message webhook

Next
Built with

Payload sent by SignalWire to a SWML calling webhook URL when SWML is fetched for a call. This includes inbound calls arriving on a phone number configured with a SWML calling handler, and outbound REST-initiated calls that point at a SWML URL. The same payload shape is also used when the SWML calling transfer or execute method targets an external URL — in those cases, the params object carries the values supplied to that step.

The webhook URL is expected to respond with the SWML document to execute for the call.

Payload

The payload of this webhook request is an object.
callobjectRequired
The call that triggered this fetch.
varsobjectRequired

Script-scope variables for this call session. Empty on the initial document fetch.

envsobjectRequired

Environment variables available to this call’s SWML document, which you can reference as ${envs.<key>}. Combines the variables you’ve configured at the account or project level with any custom_variables you passed on the outbound Call commands request.

Keys are case-sensitive. When a custom_variables key exactly matches an account- or project-level variable, including case, the value from the request wins; if they differ only in case, both are kept as separate variables.

paramsobjectRequired

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

Response

200
Webhook received