Skip to content

MailerAddSendWindow

POST mailer/sendWindow

Defines the hours when recipients in a country may be emailed, in their local time.

For email this is a marketing tool rather than a legal one: a promotion that lands at 3 a.m. gets deleted, and a campaign that arrives at 10 a.m. local time gets read. Windows are off by default for this module — a mailer is normally allowed to send around the clock.

Access Control

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

Request

POST https://{broker_domain}/mailer/sendWindow
{
  "countryIso": "DE",
  "allowedFrom": "09:00",
  "allowedTo": "20:00",
  "weekdays": [
    1,
    2,
    3,
    4,
    5
  ]
}
{
  "command": "MailerAddSendWindow",
  "extID": "1",
  "data": {
    "countryIso": "DE",
    "allowedFrom": "09:00",
    "allowedTo": "20:00",
    "weekdays": [
      1,
      2,
      3,
      4,
      5
    ]
  }
}
const res = await platform.MailerAddSendWindow({
  countryIso: "DE",
  allowedFrom: "09:00",
  allowedTo: "20:00",
  weekdays: [
    1,
    2,
    3,
    4,
    5
  ]
});

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 email, false rejects it
description string No Free-form note
status enum No ENABLED (default) or DISABLED

Behavior

  • Deferring is the useful default: the email is queued with scheduleReason: "SEND_WINDOW" and goes out when the window opens, instead of being lost.
  • TRANSACTIONAL emails ignore windows entirely — a password reset at 3 a.m. was requested by the person receiving it.
  • The recipient country comes from the CRM card or the countryIso parameter of the send call; when it is unknown, the * window applies.

Response Data

{
  "id": 5,
  "brand": "default",
  "countryIso": "DE",
  "timezone": null,
  "allowedFrom": "09:00",
  "allowedTo": "20: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