# Validity period

> The validity period is how long a carrier keeps trying to deliver an SMS to an unreachable phone before giving up and marking it expired; a gateway lets you set it per message.

When a phone is off or out of coverage, the carrier's message centre ([SMSC](https://smsmeteor.io/glossary/smsc)) stores the message and retries. The validity period caps that effort: once it has elapsed, the message is discarded and reported as [expired](https://smsmeteor.io/glossary/expired-message). Carriers accept values from minutes to days, and some apply their own maximum whatever the sender asks for.

The right value depends on the content. A [one-time code](https://smsmeteor.io/glossary/otp) has no value after ten minutes; a delivery notice is fine for a day; an appointment reminder is pointless once the appointment has passed. Setting validity short on codes avoids delivering a stale code that confuses the user and turns into a support ticket. Setting it long on content that stays useful lets more phones that were briefly off receive it.

For example, a hypothetical login code that stops working after 10 minutes should be sent with a validity of 10 minutes. If the phone reconnects after 15, the network has already discarded the message, the user never sees a dead code, and your system shows expired and can offer a new one. Sent with a two-day validity instead, the same code would arrive after it had stopped working.

Three mistakes are worth checking for:

- Giving the value in the wrong unit. When the field is in minutes, 48 means 48 minutes; 48 hours is 2,880.

- Leaving a long validity on codes and short-lived offers.

- Confusing validity with scheduling. A send window decides when the message leaves; validity limits how long the network keeps trying after that.

At SMSMeteor: the default validity is 48 hours, or 2,880 minutes, and it can be set per message with the `validity` parameter in minutes, up to 4,320 (72 hours). A message not delivered within it is marked expired. The parameter is listed with the other message fields in the [API reference](https://smsmeteor.io/docs/api).

Related terms: [Expired message](https://smsmeteor.io/glossary/expired-message), [SMSC](https://smsmeteor.io/glossary/smsc), [OTP (one-time password)](https://smsmeteor.io/glossary/otp), [Absent subscriber](https://smsmeteor.io/glossary/absent-subscriber)

---
Source: https://smsmeteor.io/glossary/validity-period (HTML). Generated by SMSMeteor from the same data as the page. Summary of the whole site: https://smsmeteor.io/llms.txt
