Reference

Errors and limits

Error format, status codes, rate limits and pagination.

Error format

Failed requests return a non-2xx status and a JSON body.

json
{
  "statusCode": 422,
  "name": "validation_error",
  "message": "The `to` field must contain at least one valid email address."
}

Status codes

StatusMeaning
200, 201, 202Success. 202 means the work was accepted and will finish in the background.
400The request could not be parsed.
401Missing, invalid or revoked API key.
403The key does not have permission, or the team is paused.
404The resource does not exist or belongs to another team.
409The idempotency key was reused with a different body.
422Validation failed, for example an unverified from domain.
429Rate limit or daily quota exceeded.
500, 503Something went wrong on our side. Retry with backoff.

Rate limits

Each API key can make 10 requests per second by default. Every response includes the current state, and a 429 response includes retry-after.

HeaderMeaning
ratelimit-limitRequests allowed in the window.
ratelimit-remainingRequests left in the window.
ratelimit-resetSeconds until the window resets.
retry-afterSeconds to wait before retrying, on 429.

Pagination

List endpoints use cursors. Pass limit (up to 100) and after or before with a cursor from a previous response.

json
{
  "data": [ /* items */ ],
  "has_more": true,
  "next_cursor": "eyJpZCI6Im1zZ18xZzlvbCJ9"
}

Retrying safely

  • Retry 429 and 5xx responses with exponential backoff and jitter.
  • Always send an Idempotency-Key when retrying POST /emails so nothing sends twice.
  • Do not retry 4xx errors other than 429. Fix the request first.