Skip to content

Commit 7084c0f

Browse files
committed
[features] apply rate limit to expedited messages too
1 parent df488b2 commit 7084c0f

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

docs/features/sending-messages.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,14 +108,14 @@ The **Sending Messages** feature provides a comprehensive API for delivering bot
108108
!!! info "Additional Notes"
109109
- Phone numbers must be **E.164-compatible**—except when **the message is encrypted** or `skipPhoneValidation=true`
110110
- `ttl` and `validUntil` are mutually exclusive
111-
- Priorities ≥100 bypass all limits/delays
111+
- Priorities ≥100 are expedited but may still be subject to delay
112112
- Data messages require app v1.40.0+ and server v1.24.0+
113113

114114
## 💻 Code Examples
115115

116116
### Text Message
117117

118-
Send `Your OTP is 1234` to `+1234567890` without phone number validation via device with ID `yVULogr4Y1ksRfnos1Dsw` if it was active within the last 12 hours. Skip phone number validation and expire the message after 1 hour. Use SIM card slot #1 and set priority to 100 to bypass all limits/delays.
118+
Send `Your OTP is 1234` to `+1234567890` without phone number validation via device with ID `yVULogr4Y1ksRfnos1Dsw` if it was active within the last 12 hours. Skip phone number validation and expire the message after 1 hour. Use SIM card slot #1 and set priority to 100 to expedite processing.
119119

120120
=== "cURL"
121121
```bash title="Send Text Message using cURL"
@@ -355,6 +355,16 @@ Control message processing order using the `priority` field. Higher priority mes
355355
| Normal | 0 to 99 | Standard processing (default) |
356356
| Low | -128 to -1 | Low priority |
357357

358+
!!! note Priority-Aware Throttling
359+
High-priority messages use intelligent throttling that prevents message bursts while maintaining urgency for truly high-priority messages.
360+
361+
Standard rate limits and delays apply based on priority comparison with the previously sent message:
362+
363+
- **Skip delays**: High-priority messages skip delays ONLY when they have higher priority than the last sent message
364+
- **Apply delays**: Standard rate limits apply when:
365+
- Message is not expedited (priority < 100)
366+
- Message is expedited but previous message had equal or higher priority
367+
358368
!!! note "Equal Priority Handling"
359369
When messages share the same `priority` value, the processing order can be configured. By default, messages are processed in **LIFO order** (Last-In-First-Out), but **FIFO order** (First-In-First-Out) can be chosen in the application settings.
360370

0 commit comments

Comments
 (0)