Message Expiration
Message Expiration Mechanics
Emess dynamically assigns Time-To-Live (TTL) values to all incoming SMS messages based on their urgency tier. This guarantees that time-sensitive codes (e.g. OTPs) do not arrive hours later if there is a temporary network disruption.
TTL Duration by Type
When Emess receives a message request, an absolute UTC timestamp (sendBefore) is automatically calculated:
| Type | Use cases | Default TTL |
|---|---|---|
| Critical | OTPs, alerts | 2 Minutes |
| Standard | notifications | 1 Hour |
| Bulk | marketing | 24 Hours |
*Note: You can override these defaults by explicitly passing a sendBefore ISO string in your request payload.*
Delivery Workflow
Emess utilizes a deterministic execution pipeline to ensure your messages are processed correctly:
- Ingestion: When you submit a request, Emess securely ingests your message and queues it for delivery.
- Expiration Guard: Right before delivery, Emess checks if the current time has surpassed the message's
sendBeforelimit. If it has, the delivery is aborted and the message is marked asEXPIRED. A refund is automatically credited back to your balance. - Execution: If valid, the message is dispatched. To prevent duplicated deliveries or unexpected behaviors, Emess performs no automatic retries on failed dispatches. Failed messages will simply be marked as such in your dashboard.