Receive Emails: Schedule
Schedule Send
Write the email now and send it later. It waits in the Scheduled folder until the time you pick.
https://g.sendcorex.com/v1command: schedule_sendEverything that can be checked is checked now (recipient, subject, original email, attachments), so you find out before the time comes. Credits and the daily limit are checked when it sends.
If the send is refused at that time (no credits, daily limit, spam), nothing is lost: the email goes back to Drafts with the reason.
Recipients who refused tracking on the preferences page are never tracked, even with true.
Emails sent from the mailbox carry no List-Unsubscribe header or unsubscribe link unless you send unsubscribe: true, because they are personal emails.
Everyone who receives an email from the mailbox becomes a contact in the account’s “Webmail” list and is trusted in this mailbox: their replies go to the Inbox and the address shows up in autocomplete. Senders the mailbox blocked stay blocked.
With unsubscribe: true, recipients who already unsubscribed from this mailbox are refused with RECIPIENT_UNSUBSCRIBED, and recipients lists them. Replies are never blocked.
Arguments
send_atstringrequiredRFC 3339,
YYYY-MM-DDor epoch ms. At least 1 minute from now and up to 1 year.modestringoptionalnew(default),replyorforward.idstringoptionalThe original message, for
replyandforward.tostring | string[]optionalRecipient. Required for
newandforward. Fornewit can be an array of up to 30 (paid plans).ccstring[]optionalVisible copies.
bccstring[]optionalHidden copies.
subjectstringoptionalRequired for
new. Reply and forward default to Re: / Fwd: original.htmlstringoptionalHTML body. Or
text, ortemplate_id.template_idstringoptionalFill the body (and the subject of a new email) from a template.
followup_after_hoursnumberoptionalRemind you if nobody replies this many hours after it is sent.
scheduled_idstringoptionalReschedule: the old scheduled email is replaced.
attachmentsobject[]optionalFiles to attach:
[{ file_name, content, content_type }],contentin base64. Up to 20 files and 25 MB in total. Every file is scanned; a dangerous one fails withFILE_BLOCKED.compose_uidstringoptionalAttachments you uploaded before with
upload_attachment.attachment_idsstring[]optionalWhich of the uploaded attachments to send. Without it, all of them.
track_opensbooleanoptionalTrack when each recipient opens the email (invisible pixel). Default
true.track_clicksbooleanoptionalTrack clicks on the links (each link goes through a redirect). Default
true.unsubscribebooleanoptionalAdd an unsubscribe link. Put
[unsubscribe]in the body (as a linkhrefor as plain text) where the link should go; without it, a default line is added at the end. Defaultfalse.audiencestringoptionalSend to an audience instead of addresses:
subscribed,opened,clicked,both,seg:<segment_id>ormsg:<message_uid>:opened|clicked|not_opened.tobecomes optional. Up to 5,000 people. The unsubscribe link is turned on and the email goes out as marketing. Paid plans.best_timebooleanoptionalSend each person at the hour they usually open or click, during the day of
send_at. Needsaudienceandmode: new.send_atis 00:00 of that day in your timezone, as UTC.best_fallback_atstring | numberoptionalTime for people with no history (RFC 3339 or epoch ms). Must be on the same day as
send_at.
Quick start
import axios from 'axios';
const response = await axios.post(
'https://g.sendcorex.com/v1',
{
commands: [
{
command: "schedule_send",
args: {
to: "ana@client.com",
subject: "Proposal",
html: "<p>Hi Ana, here is the proposal.</p>",
send_at: "2026-10-27T09:00:00+08:00"
}
}
]
},
{ headers: { Authorization: process.env.SENDCOREX_TOKEN } },
);
const [result] = response.data.results;
if (result.type !== 'SUCCESS') throw new Error(`${result.code}: ${result.message}`);
console.log(result.data);Response
{
"type": "SUCCESS",
"results": [
{
"command": "schedule_send",
"id": "0",
"type": "SUCCESS",
"data": {
"scheduled_id": "Vj0xQUJDMTIz",
"thread_id": "thr_9a1c4e72",
"send_at": "2026-10-27T01:00:00Z"
}
}
]
}Response fields
scheduled_idThe message in Scheduled. Use it to cancel, reschedule or send now.
List what is scheduled
The scheduled emails are in the Scheduled folder, ordered by send time.
Request body
{
"commands": [
{
"command": "list_messages",
"args": {
"folder": "Scheduled"
}
}
]
}Errors
HTTP-level errors return type, code and message. Errors marked CMD come back inside the command result, with HTTP 200.
- 401
TOKEN_EXPIREDThe access token has expired. Call Refresh Token and repeat the request.
- 401
INVALID_TOKENThe token is malformed, unknown or revoked.
- 429
RATE_LIMITEDMore than 15 requests/s or 15 in flight for the same IP + mailbox. Wait the number of seconds in Retry-After.
- CMD
INVALID_AUDIENCEThe audience is not valid: unknown group, a segment of another mailbox or a message this mailbox didn’t send.
- CMD
AUDIENCE_OVER_LIMITThe audience has more people than you can send to (up to 5,000 per email and your daily limit). `total` and `allowed` say how many.
- CMD
EMPTY_AUDIENCENobody in this audience right now.
- CMD
BEST_TIME_NEEDS_AUDIENCE`best_time` needs an `audience` and `mode: new`.
- CMD
RECIPIENT_UNSUBSCRIBEDOne or more recipients unsubscribed from this mailbox. `recipients` lists them: remove them or send again with `unsubscribe: false`.
- CMD
PAID_PLAN_REQUIREDMore than one address in `to` needs a paid plan.
- CMD
TOO_MANY_RECIPIENTS`to` has more than 30 addresses.
- CMD
INVALID_ARGSA required argument is missing or invalid.
- CMD
INVALID_TIMEsend_at is missing, less than 1 minute away or more than 1 year away.
- CMD
INVALID_RECIPIENTThe recipient is missing or not a valid email.
- CMD
MISSING_SUBJECTA new email needs a subject.
- CMD
MISSING_TARGETReply and forward need the original email, and it must still exist.
- CMD
RECIPIENT_LIMIT_EXCEEDEDto, cc and bcc together have more than 50 addresses.
- CMD
FILE_BLOCKEDA file was blocked by the security scan.
- CMD
ATTACHMENTS_TOO_LARGEThe attachments of the email add up to more than 25 MB, or the mailbox already has 500 MB of uploads waiting to be sent.
- CMD
INTERNALServer error. The detail is only written to the server log.