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:

TypeUse casesDefault TTL
CriticalOTPs, alerts2 Minutes
Standardnotifications1 Hour
Bulkmarketing24 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:

  1. Ingestion: When you submit a request, Emess securely ingests your message and queues it for delivery.
  2. Expiration Guard: Right before delivery, Emess checks if the current time has surpassed the message's sendBefore limit. If it has, the delivery is aborted and the message is marked as EXPIRED. A refund is automatically credited back to your balance.
  3. 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.