You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: fern/apis/signalwire-rest/openapi.yaml
+10Lines changed: 10 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -36532,6 +36532,11 @@ components:
36532
36532
examples:
36533
36533
- - notification
36534
36534
- order-confirmation
36535
+
status_callback:
36536
+
type: string
36537
+
description: URL to receive delivery status callbacks for the outbound message (e.g., `queued`, `sent`, `delivered`, `failed`). Not set if not specified. The callback uses the [message status callback payload](/docs/apis/rest/messages/webhooks/message-status-callback).
36538
+
examples:
36539
+
- https://example.com/message_status
36535
36540
body:
36536
36541
type: string
36537
36542
description: Required if `media` is not present. The body of the SMS message.
@@ -36570,6 +36575,11 @@ components:
36570
36575
examples:
36571
36576
- - notification
36572
36577
- order-confirmation
36578
+
status_callback:
36579
+
type: string
36580
+
description: URL to receive delivery status callbacks for the outbound message (e.g., `queued`, `sent`, `delivered`, `failed`). Not set if not specified. The callback uses the [message status callback payload](/docs/apis/rest/messages/webhooks/message-status-callback).
URL to receive delivery status callbacks for the outbound message (e.g., `queued`, `sent`, `delivered`, `failed`). Default is not set. See [Status callbacks](#status-callbacks) below.
51
+
</ParamField>
52
+
53
+
49
54
</Tab>
50
55
<Tabtitle="MMS">
51
56
@@ -79,6 +84,11 @@ The `send_sms` object accepts the following properties depending on the message
URL to receive delivery status callbacks for the outbound message (e.g., `queued`, `sent`, `delivered`, `failed`). Default is not set. See [Status callbacks](#status-callbacks) below.
89
+
</ParamField>
90
+
91
+
82
92
</Tab>
83
93
</Tabs>
84
94
@@ -88,6 +98,19 @@ Set by the method:
88
98
89
99
-**send_sms_result:** (out) `success` | `failed`.
90
100
101
+
## **Status callbacks**
102
+
103
+
When `status_callback` is set, SignalWire sends an HTTP `POST` to that URL each time the outbound
104
+
message transitions to a new state. Callback delivery is independent of SWML execution: the document
105
+
continues as soon as the message is accepted, and delivery-state callbacks fire afterwards.
106
+
107
+
The callback uses the same payload as other outbound messages sent through SignalWire:
Copy file name to clipboardExpand all lines: specs/swml/calling/Methods/send_sms/main.tsp
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,10 @@ model SMSBase {
21
21
@doc("Array of tags to associate with the message to facilitate log searches.")
22
22
@example(#["notification", "order-confirmation"])
23
23
tags?:string[];
24
+
25
+
@doc("URL to receive delivery status callbacks for the outbound message (e.g., `queued`, `sent`, `delivered`, `failed`). Not set if not specified. The callback uses the [message status callback payload](/docs/apis/rest/messages/webhooks/message-status-callback).")
Copy file name to clipboardExpand all lines: specs/swml/calling/tsp-output/@typespec/json-schema/SWMLObject.json
+14Lines changed: 14 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -4363,6 +4363,13 @@
4363
4363
],
4364
4364
"description": "Array of tags to associate with the message to facilitate log searches."
4365
4365
},
4366
+
"status_callback": {
4367
+
"type": "string",
4368
+
"examples": [
4369
+
"https://example.com/message_status"
4370
+
],
4371
+
"description": "URL to receive delivery status callbacks for the outbound message (e.g., `queued`, `sent`, `delivered`, `failed`). Not set if not specified. The callback uses the [message status callback payload](/docs/apis/rest/messages/webhooks/message-status-callback)."
4372
+
},
4366
4373
"body": {
4367
4374
"type": "string",
4368
4375
"examples": [
@@ -4418,6 +4425,13 @@
4418
4425
],
4419
4426
"description": "Array of tags to associate with the message to facilitate log searches."
4420
4427
},
4428
+
"status_callback": {
4429
+
"type": "string",
4430
+
"examples": [
4431
+
"https://example.com/message_status"
4432
+
],
4433
+
"description": "URL to receive delivery status callbacks for the outbound message (e.g., `queued`, `sent`, `delivered`, `failed`). Not set if not specified. The callback uses the [message status callback payload](/docs/apis/rest/messages/webhooks/message-status-callback)."
0 commit comments