Skip to main content
SmsManager gives you two complementary tools for controlling when your messages reach recipients. You can schedule a message for a specific point in the future using the datetime field, and you can restrict delivery to certain hours or days of the week using delivery_time. Both fields are optional, they work independently, and you can combine them for precise control over your send timing.

Scheduled send (datetime)

The datetime field lets you queue a message now and have SmsManager send it at a specific future time. You provide a UTC timestamp in ISO 8601 format:
SmsManager stores the message and dispatches it at the specified time. The API responds immediately with a message_id you can use for tracking or cancellation. Important: the datetime value must always be in UTC. If your application works in a local timezone, convert to UTC before constructing the request. For example, 10:00 AM Prague time (UTC+2 in summer) is 08:00:00Z.
Scheduling is available on all channels — SMS, Viber, and WhatsApp. The datetime field sits at the root of the message object, not inside the flow.

Delivery time windows (delivery_time)

The delivery_time object lets you define the hours and days during which SmsManager is allowed to send your message. If a message arrives outside your allowed window — either because it was submitted late or because datetime lands outside the window — SmsManager holds it and delivers it as soon as the next window opens. The delivery_time object accepts the following fields:

Example: weekdays, 08:00–21:00 Prague time

If you send this request at 23:00 on a Friday evening Prague time, SmsManager holds the message and delivers it at 08:00 on Monday morning — the next moment the delivery window is open.

Combining datetime and delivery_time

You can use both fields together to schedule a message for a future date and ensure it only lands during business hours. This is useful when you’re generating messages in advance but want to avoid recipients receiving them on weekends or in the middle of the night.
In this example, the message is scheduled for 2025-06-20T06:00:00Z (08:00 Prague time on a Friday). Because that time falls within the delivery window, it sends immediately at the scheduled time. If the date happened to be a Saturday, SmsManager would hold it until 08:00 on Monday.

Time zones

The tz field accepts any valid IANA Time Zone Database name. If you omit tz, SmsManager defaults to UTC. Some commonly used values:
For transactional messages — one-time passwords, login codes, payment alerts, and other time-sensitive notifications — do not use delivery_time. A recipient waiting for an OTP that’s held for six hours is a broken user experience. Reserve delivery_time for marketing and informational messages where a short delay is acceptable.