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
| Parameter | Type | Required | Description |
|---|---|---|---|
priority | string | Yes (transactional only) | "low" or "high" |
Body Parameters
| Field | Type | Required | Description |
|---|---|---|---|
from | Address | Yes | Sender's email address and name |
to | Address[] | Yes | List of primary recipients |
subject | string | Yes | Email subject line |
html | string | Yes (html or text) | HTML email content |
text | string | Yes (html or text) | Plain text email content |
replyTo | Address | No | Reply-to email address and name |
cc | Address[] | No | List of CC recipients |
bcc | Address[] | No | List of BCC recipients |
attachments | Attachment[] | No | List of file attachments |
customerReference | string | No | Your reference for tracking |
scheduledAt | string | No | ISO 8601 datetime. Must be in the future and within 72 hours. |
scheduledAt Field
| Rule | Detail |
|---|---|
| Format | ISO 8601 — e.g. 2026-06-10T18:14:00+02:00 or 2026-06-10T16:14:00Z |
| Must be | In the future at time of request |
| Maximum | 72 hours from time of request |
| Timezone | Any valid UTC offset is accepted and stored as UTC internally. |
| If omitted | Email sends immediately (standard behaviour) |
Edge cases:
- If
scheduledAtis in the past, the API returns400— the email is not sent. - If
scheduledAtexceeds the 72-hour window, the API returns400— the email is not queued. - In both cases the response body includes a descriptive
messagefield. 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 Code | Description |
|---|---|
202 | Accepted — scheduled email request is accepted |
200 | OK — Sandbox mode (accepted, not sent) |
400 | Bad Request — invalid request data or scheduledAt value |
401 | Unauthorized — invalid product token |
403 | Forbidden — email rejected (size/content) |
500 | Internal 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
cancelledwebhook 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.