Skip to content

Commit 727080e

Browse files
committed
[features] add simNumber field to webhooks' payload
1 parent f3b627a commit 727080e

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

docs/features/multi-sim.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,28 +24,32 @@ curl -X POST \
2424

2525
## Webhooks
2626

27-
To receive SMS messages, use the [Webhooks](./webhooks.md) feature. The `sms:received` event payload includes a `simNumber` field to identify which SIM card received the message.
27+
When using the [Webhooks](./webhooks.md) feature all events include a `simNumber` field to identify which SIM card was used.
2828

2929
## SIM Card Rotation
3030

3131
<div align="center">
3232
<img src="/assets/features-sim-rotation.png" alt="SIM rotation option">
3333
</div>
3434

35-
When the `simNumber` is not specified in the request, you can configure which SIM card will be used to send messages on the device. This option is located in the "Settings" tab under the "Messages" section.
35+
When the `simNumber` is not specified in the request, you can configure which SIM card will be used to send the message on the device. This option is located in the "Settings" tab under the "Messages" section.
3636

3737
Available options:
3838

3939
* **OS Default**: The app will not select any SIM card, delegating this to the default messaging app.
4040
* **Round Robin**: The app will rotate between SIM cards in a round-robin fashion.
4141
* **Random**: The app will select a SIM card at random for each message.
4242

43+
When a non-default option is used, you can receive the selected SIM number through the webhooks' `simNumber` field.
44+
4345
## Troubleshooting
4446

4547
If you encounter issues with multi-SIM functionality:
4648

4749
1. Ensure that your device supports multiple SIM cards and that they are properly installed.
4850
2. Verify that the app has the necessary permissions to access and use all SIM cards.
4951
3. Check the app's logs for any error messages related to SIM card access or usage.
52+
4. Make sure your device's SIM cards are active and have sufficient credit or data allowance.
53+
5. Restart the app and/or device if persistent issues occur.
5054

5155
For further assistance, please contact our [support team](mailto:[email protected]).

docs/features/webhooks.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,17 @@ Currently, the following event is supported:
1414
- `sms:sent` - Triggered when an SMS is sent by the device. The payload for this event includes:
1515
* `messageId`: The ID of the SMS message.
1616
* `phoneNumber`: The recipient's phone number.
17+
* `simNumber`: The SIM card number that sent the SMS. May be `null` if default SIM is used.
1718
* `sentAt`: The timestamp when the message was sent.
1819
- `sms:delivered` - Triggered when an SMS is delivered to the recipient. The payload for this event includes:
1920
* `messageId`: The ID of the SMS message.
2021
* `phoneNumber`: The recipient's phone number.
22+
* `simNumber`: The SIM card number that sent the SMS. May be `null` if default SIM is used.
2123
* `deliveredAt`: The timestamp when the message was delivered.
2224
- `sms:failed` - Triggered when an SMS fails to be sent to the recipient. The payload for this event includes:
2325
* `messageId`: The ID of the SMS message.
2426
* `phoneNumber`: The recipient's phone number.
27+
* `simNumber`: The SIM card number that sent the SMS. May be `null` if default SIM is used.
2528
* `failedAt`: The timestamp when the message failed.
2629
* `reason`: The reason for the failure.
2730
- `system:ping` - Triggered when the device pings the server. Has no payload.

0 commit comments

Comments
 (0)