Time to live (TTL) is the expiry window for your message. If the recipient’s phone can’t be reached, for example because it is switched off or has no data connection, delivery keeps being attempted until the TTL runs out. After that, the message expires and is not delivered.
Available TTL values #
1, 2, 3, 5, 10, 15 or 30 minutes, and 1 to 24 hours. The default is 24 hours.
Choosing the right TTL #
- OTPs and login codes: use a short TTL (a few minutes). A code that arrives after it has expired is useless and confuses users.
- Time-bound alerts (flash sales, appointment reminders): set the TTL to end before the offer or event does.
- General notifications and promotions: the 24-hour default gives the best chance of delivery.
When sending through the API, pass the TTL in seconds, for example "ttl": "3600s" for one hour.