Skip to main content

Schedule an email

Send an email through the API at a time you set, up to 72 hours ahead, and cancel it before it goes out.

Pro or Max plan Updated 5 November 2026

At the end of this guide, an email waits in your logs and goes out at the time you set.

You'll need

  1. Add send_at to the request#

    Add send_at to the body of your send request.

    curl -X POST https://api.mailyoto.com/v1/domains/lunavera.com/outbound \
      -H "Authorization: Bearer $MYO_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "from": { "email": "hello@lunavera.com", "name": "Luna Vera" },
        "to": [{ "email": "diego.r.santos@outlook.com", "name": "Diego Santos" }],
        "subject": "Your booking starts tomorrow",
        "text_body": "Hello Diego, we expect you at 10:00.",
        "send_at": "2026-11-09T09:00:00+02:00"
      }'

    The time can be up to 72 hours ahead. Write it in ISO 8601 with its offset, as above, or end it with Z for UTC.

    On the command line, use mailyoto send --send-at "2026-11-09 09:00", which reads the time in your computer’s time zone. An AI assistant can also schedule an email for you.

  2. Read the response#

    Mailyoto returns 202 with "status": "scheduled" and the send time in UTC:

    {
      "logs": [
        { "recipient": "diego.r.santos@outlook.com", "log_id": "log_01m5pmb2zr7k4w9e6t3x8q1v0d" }
      ],
      "message_id": "<176248359512.42.9182734650@lunavera.com>",
      "status": "scheduled",
      "send_at": "2026-11-09T07:00:00Z",
      "recipients": ["diego.r.santos@outlook.com"]
    }

    Keep the log_id to cancel the email from your code.

Confirm that it’s scheduled#

Open Logs and set Type to Sent by API. The entry shows Scheduled and the time it sends, in your own time zone.

The email counts against your sending allowance when it goes out.

Cancel an email#

Each recipient has a log entry of its own. Cancelling one leaves the others scheduled, and their copies still show that address in To.

In Logs, select Show details on the entry, then select Cancel email twice.

From your code, call DELETE /v1/domains/scheduled-sends/<log_id>. On the command line, run mailyoto scheduled cancel <log_id>.

The API reference shows how to list the emails still waiting.

If an email doesn’t go out#

At the send time, Mailyoto checks your plan, your domain’s sending records, your monthly allowance and your daily limit again. If a check fails, the email doesn’t go out, and its entry shows Cancelled with the reason.

Removing a domain also cancels the emails it has waiting.