Scheduling Emails

Scheduling emails for future delivery requires just one additional field — scheduledAt — added to both the standard Transactional or Marketing Email request body. No client-side timers or queues needed.

How it works

Pass a scheduledAt value in ISO 8601 format (e.g. 2026-06-10T15:30:00+02:00) in your send request

Emails can be scheduled up to 72 hours in advance

The API responds immediately with 202 Accepted confirming the request was received

The email is then held in the sending infrastructure and delivered automatically at the scheduled time

Request Parameters

Scheduling uses the same request body as the standard Transactional Email and Marketing Email APIs with one additional field: scheduledAt.

Query Parameters

ParameterTypeRequiredDescription
prioritystringYes (transactional only)"low" or "high"

Body Parameters

FieldTypeRequiredDescription
fromAddressYesSender's email address and name
toAddress[]YesList of primary recipients
subjectstringYesEmail subject line
htmlstringYes (html or text)HTML email content
textstringYes (html or text)Plain text email content
replyToAddressNoReply-to email address and name
ccAddress[]NoList of CC recipients
bccAddress[]NoList of BCC recipients
attachmentsAttachment[]NoList of file attachments
customerReferencestringNoYour reference for tracking
scheduledAtstringNoISO 8601 datetime. Must be in the future and within 72 hours.

scheduledAt Field

RuleDetail
FormatISO 8601 — e.g. 2026-06-10T18:14:00+02:00 or 2026-06-10T16:14:00Z
Must beIn the future at time of request
Maximum72 hours from time of request
TimezoneAny valid UTC offset is accepted and stored as UTC internally.
If omittedEmail sends immediately (standard behaviour)

Edge cases:

  • If scheduledAt is in the past, the API returns 400 — the email is not sent.
  • If scheduledAt exceeds the 72-hour window, the API returns 400 — the email is not queued.
  • In both cases the response body includes a descriptive message field. See Response Codes below.

Example

Transactional

POST https://api.cm.com/email/gateway/v1/transactional?priority=high
Content-Type: application/json
X-CM-PRODUCTTOKEN: {your-product-token}

{
  "from": { "email": "[email protected]", "name": "Sender Name" },
  "to": [{ "email": "[email protected]", "name": "Recipient Name" }],
  "scheduledAt": "2026-06-10T18:14:00+02:00",
  "subject": "Email Subject",
  "html": "<p>HTML content</p>",
  "text": "Plain text content",
  "customerReference": "your-reference"
}

Marketing

POST https://api.cm.com/email/gateway/v1/marketing
Content-Type: application/json
X-CM-PRODUCTTOKEN: {your-product-token}

{
  "from": { "email": "[email protected]", "name": "Sender Name" },
  "to": [{ "email": "[email protected]", "name": "Recipient Name" }],
  "scheduledAt": "2026-06-10T18:14:00+02:00",
  "subject": "Email Subject",
  "html": "<p>HTML content</p>",
  "text": "Plain text content"
}

Response

{
  "status": 202,
  "message": "Accepted",
  "success": true,
  "messageId": "7526bb32-c174-4bad-9c35-dba08f8667aa",
  "batchId": "cd288015-0080-450f-98dd-60eafcfa3df6"
}

Response Codes

Status CodeDescription
202Accepted — scheduled email request is accepted
200OK — Sandbox mode (accepted, not sent)
400Bad Request — invalid request data or scheduledAt value
401Unauthorized — invalid product token
403Forbidden — email rejected (size/content)
500Internal Server Error

Common 400 errors

scheduledAt in the past:

{
  "status": 400,
  "message": "ScheduledAt must be in the future.",
  "success": false,
  "messageId": ""
}

scheduledAt exceeds 72-hour limit:

{
  "status": 400,
  "message": "ScheduledAt cannot be more than 72 hours in the future.",
  "success": false,
  "messageId": ""
}

Webhook events

New webhook event type is available for scheduled emails:

  • Scheduled — fired once the email is confirmed as queued for delivery at the scheduled time

Scheduled event payload:

{
  "type": "scheduled",
  "createdAt": "2026-06-12T10:44:17+00:00",
  "messageId": "d2d6f36f-122f-4d70-bfef-2b1522c87cec",
  "data": {
    "to": "[email protected]",
    "from": "[email protected]",
    "id": "bff72c14-4c5b-4c81-938f-a344ed278372",
    "customerReference": "",
    "scheduled": {
      "scheduledAt": "2026-06-12T10:45:00+00:00",
      "message": "Email is scheduled to be sent at June 12, 2026 at 10:45 UTC."
    }
  }
}

📌

Note: Cancellation of scheduled emails is not yet supported via the API. The cancelled webhook event will become available in an upcoming release.

Message Logs

In the Email Logs page, scheduled emails will appear with a Scheduled status. Once the email is delivered at the scheduled time, the status will automatically update to Delivered.