Skip to content

SmsAddSendWindow

POST sms/sendWindow

Defines the hours when recipients in a country may be messaged. The window is evaluated in the local time of the recipient, not of the sender: quiet hours are regulated by the jurisdiction of the person receiving the message.

deferOutsideWindow decides what happens outside the window — the message waits in the queue until the window opens (default), or it is refused right away.

Access Control

Allowed role: admin, within the brand of the caller.

Request

POST https://{broker_domain}/sms/sendWindow
{
  "countryIso": "US",
  "allowedFrom": "08:00",
  "allowedTo": "21:00",
  "weekdays": [
    1,
    2,
    3,
    4,
    5
  ],
  "deferOutsideWindow": true
}
{
  "command": "SmsAddSendWindow",
  "extID": "1",
  "data": {
    "countryIso": "US",
    "allowedFrom": "08:00",
    "allowedTo": "21:00",
    "weekdays": [
      1,
      2,
      3,
      4,
      5
    ],
    "deferOutsideWindow": true
  }
}
const res = await platform.SmsAddSendWindow({
  countryIso: "US",
  allowedFrom: "08:00",
  allowedTo: "21:00",
  weekdays: [
    1,
    2,
    3,
    4,
    5
  ],
  deferOutsideWindow: true
});

Request Data

Field Type Required Description
countryIso string No ISO country code, or * for every other destination. Default *
timezone string No IANA timezone that overrides the one derived from the country
allowedFrom string Yes Window start as HH:mm
allowedTo string Yes Window end as HH:mm
weekdays array No Allowed weekdays [1..7], 1 = Monday. Empty means every day
deferOutsideWindow bool No true (default) defers the message, false rejects it
description string No Free-form note
status enum No ENABLED (default) or DISABLED

Behavior

  • Deferring is the useful default for marketing: the message is queued with scheduleReason: "SEND_WINDOW" and goes out when the window opens, instead of being lost.
  • TRANSACTIONAL messages ignore windows entirely — a confirmation code at 3 a.m. is expected by the person who asked for it.
  • A country-specific window wins over the * window.

Response Data

{
  "id": 5,
  "brand": "default",
  "countryIso": "US",
  "timezone": null,
  "allowedFrom": "08:00",
  "allowedTo": "21:00",
  "weekdays": [1, 2, 3, 4, 5],
  "deferOutsideWindow": true,
  "description": null,
  "status": "ENABLED",
  "createdAt": "2026-08-24 13:50:12"
}

Errors

Code Error Description
400 VALIDATION_ERROR allowedFrom or allowedTo is not HH:mm, or a weekday is outside 1..7
500 INTERNAL_ERROR Storage error