---
agent:
  instructions: "Use this search API to find relevant content across this site with keywords or natural-language queries, instead of crawling individual pages. Results are returned in Markdown."
  endpoint: "https://docs.sendcorex.com/.well-known/search?q={query}"
  method: "GET"
  documentation: "https://docs.sendcorex.com/llms.txt"
---

Source: https://docs.sendcorex.com/api-reference/logs/reading/list-scheduled

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.

POST `https://g.sendcorex.com/v1/logs` command: list_scheduled

Needs 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

- `limit` number optional
How many emails per page, 1 to 50. Default 50.
e.g. `50`
- `cursor` string optional
The `next_cursor` from 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

- `scheduled`
The scheduled emails of this page, the next to go out first.
- `count`
How many emails are in this page.
- `has_more / next_cursor`
While `has_more` is `true`, send `next_cursor` as `cursor` to get the next page. There is no total count.
- `scheduled[].id`
The email ID, the same `id` you got back when you sent it.
- `scheduled[].from / scheduled[].to`
Sender and recipient addresses.
- `scheduled[].subject`
The subject of the email.
- `scheduled[].scheduled_at`
When the email goes out (ISO 8601, UTC).
- `scheduled[].source / scheduled[].campaign_id`
`api` for the Email API, `campaign` for a campaign. With `campaign`, `campaign_id` is filled in.
- `scheduled[].created_at`
When 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_KEY`
The API key does not exist, was revoked or was disabled in the dashboard.
- 429`RATE_LIMITED`
More than 15 requests/s or 15 in flight for the same IP + API key. Wait the number of seconds in Retry-After.
- CMD`MISSING_SCOPE`
The API key does not have `logs:read`.
- CMD`INVALID_ARGS`
An 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_CURSOR`
The cursor is malformed, or it came from a different search or account. Start again without a cursor.
- CMD`INTERNAL`
Server error. The detail is only written to the server log.
