send0
Error codes

invalid_scheduled_at

The scheduled_at value is in the past or too far in the future.

Status: 422 · Code: invalid_scheduled_at

Scheduled sends must be at least 1 minute in the future and no more than 30 days out.

Common causes

  • Timezone confusion — scheduled_at must be ISO-8601 UTC (2026-06-01T09:00:00Z). We don't parse local-time strings.
  • Clock skew — your server clock drifted, so "1 minute from now" resolved to the past
  • You sent a Unix timestamp number instead of an ISO string

How to fix

await client.emails.send({
  from: 'hello@yourdomain.com',
  to: 'user@example.com',
  subject: 'Welcome',
  html: '<p>Hi</p>',
  scheduledAt: new Date(Date.now() + 60_000), // SDK handles the ISO conversion
})

If you need to send immediately, omit scheduled_at entirely — don't set it to now().