Skip to content

Commit b58e644

Browse files
committed
[webhooks] add partsCount field to the sms:sent payload
1 parent 05abd92 commit b58e644

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

docs/features/webhooks.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ Webhooks offer a powerful mechanism to receive real-time notifications of events
3434
- `messageId`: Unique ID
3535
- `phoneNumber`: Recipient
3636
- `simNumber`: SIM index (nullable)
37+
- `partsCount`: Number of message parts
3738
- `sentAt`: Local timestamp
3839

3940
- :white_check_mark: **sms:delivered**
@@ -253,12 +254,12 @@ For webhooks within private networks:
253254

254255
When sending SMS messages longer than the standard limits (160 characters for GSM‑7 or 70 characters for UCS‑2/Unicode), the app automatically splits the message into multiple parts before transmission. This multipart behavior affects webhook delivery in specific ways:
255256

256-
| Event | Behavior |
257-
| --------------- | ------------------------------------------------------------------------------------------------- |
258-
| `sms:received` | Triggered once after all parts of an incoming multipart message are received and assembled |
259-
| `sms:sent` | Triggered once when all parts of the outgoing message are successfully sent |
260-
| `sms:delivered` | Triggered once **for each individual part** of the message |
261-
| `sms:failed` | Triggered once if any part of the message fails to send or deliver; other parts may still succeed |
257+
| Event | Behavior |
258+
| --------------- | --------------------------------------------------------------------------------------------------------------------------------- |
259+
| `sms:received` | Triggered once after all parts of an incoming multipart message are received and assembled |
260+
| `sms:sent` | Triggered once when all parts of the outgoing message are successfully sent, the `partsCount` field is set to the number of parts |
261+
| `sms:delivered` | Triggered once **for each individual part** of the message |
262+
| `sms:failed` | Triggered once if any part of the message fails to send or deliver; other parts may still succeed |
262263

263264
!!! tip "Handling Multipart Delivery Reports"
264265
To avoid processing duplicate deliveries in your webhook handler:

0 commit comments

Comments
 (0)