Logs: Reading
List Scheduled
Emails you scheduled through the Email API (`scheduledAt`) or a campaign that have not gone out yet. The next email to go out comes first.
https://g.sendcorex.com/v1/logscommand: list_scheduledNeeds the logs:read scope on your API key.
Once an email is sent it shows up in List Logs; once it is cancelled it leaves this list. Scheduled webmail messages are not listed here: they stay in the mailbox's Scheduled folder.
When scheduled_at is already in the past, the email is being sent right now and will move to List Logs in a few seconds.
Arguments
limitnumberoptionalHow many emails per page, 1 to 50. Default 50.
e.g.
50cursorstringoptionalThe
next_cursorfrom the previous page.
Quick start
import axios from 'axios';
const response = await axios.post(
'https://g.sendcorex.com/v1/logs',
{
commands: [
{
command: "list_scheduled",
args: {
limit: 50
}
}
]
},
{ headers: { Authorization: process.env.SENDCOREX_API_KEY } },
);
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": "list_scheduled",
"id": "0",
"type": "SUCCESS",
"took_ms": 18,
"data": {
"scheduled": [
{
"id": "3f2a1b4c-8e9d-4f7a-b2c3-1a2b3c4d5e6f",
"from": "news@yourdomain.com",
"to": "ana@acme.com",
"subject": "Your order shipped",
"scheduled_at": "2026-12-01T09:00:00.000Z",
"source": "api",
"created_at": "2026-11-28T03:10:00.000Z"
},
{
"id": "9b7e2c1a-4d5f-4e6a-8b9c-0d1e2f3a4b5c",
"from": "hello@yourdomain.com",
"to": "bruno@acme.com",
"subject": "December news",
"scheduled_at": "2026-12-02T14:30:00.000Z",
"source": "campaign",
"campaign_id": "c_4f2a91",
"created_at": "2026-11-27T18:00:00.000Z"
}
],
"count": 2,
"has_more": true,
"next_cursor": "MDAwMDAwMDA4MzowOjgyMzkzMTU5OTg3OTU6M2YyYTFi"
}
}
]
}Response fields
scheduledThe scheduled emails of this page, the next to go out first.
countHow many emails are in this page.
has_more / next_cursorWhile
has_moreistrue, sendnext_cursorascursorto get the next page. There is no total count.scheduled[].idThe email ID, the same
idyou got back when you sent it.scheduled[].from / scheduled[].toSender and recipient addresses.
scheduled[].subjectThe subject of the email.
scheduled[].scheduled_atWhen the email goes out (ISO 8601, UTC).
scheduled[].source / scheduled[].campaign_idapifor the Email API,campaignfor a campaign. Withcampaign,campaign_idis filled in.scheduled[].created_atWhen the email was scheduled (ISO 8601, UTC).
Reading every page
Keep calling with next_cursor until has_more is false.
Node.js
const scheduled = [];
let cursor;
do {
const [result] = await call({
command: 'list_scheduled',
args: { limit: 50, ...(cursor ? { cursor } : {}) },
});
scheduled.push(...result.data.scheduled);
cursor = result.data.has_more ? result.data.next_cursor : null;
} while (cursor);Errors
HTTP-level errors return type, code and message. Errors marked CMD come back inside the command result, with HTTP 200.
- 401
INVALID_API_KEYThe API key does not exist, was revoked or was disabled in the dashboard.
- 429
RATE_LIMITEDMore than 15 requests/s or 15 in flight for the same IP + API key. Wait the number of seconds in Retry-After.
- CMD
MISSING_SCOPEThe API key does not have `logs:read`.
- CMD
INVALID_ARGSAn argument is invalid: unknown status, recipient that is not a full email, limit out of range, id that is not a UUID, after later than before…
- CMD
INVALID_CURSORThe cursor is malformed, or it came from a different search or account. Start again without a cursor.
- CMD
INTERNALServer error. The detail is only written to the server log.