Errors
Every code the API can return, with its HTTP status and what to do about it.
Errors are application/problem+json documents (RFC 9457). Branch on the code field, never on the title or detail text, which can change. Log request_id and quote it when you ask for help: it finds the exact request without any reader data.
{
"type": "https://api.seemly.com/docs/api/errors/rate_limited",
"title": "Rate limited",
"status": 429,
"detail": "Too many requests. Retry after 12 seconds.",
"code": "rate_limited",
"request_id": "req_4k8m2q9x7v1c5n3b6h0j2d4f",
"retryable": true,
"retry_after_seconds": 12,
"fix": "Wait for Retry-After seconds, then retry the same request.",
"docs_url": "https://api.seemly.com/docs/api/errors/rate_limited"
}A result that cannot be known (for example a send whose outcome is uncertain) is reported as unknown and is never retried for you. Check the resource before you try again.
All error codes
| Status | Code | Meaning | Retry? |
|---|---|---|---|
| 400 | consent_evidence_required | A confirmed add needs evidence of how and when the reader consented. | No |
| 400 | idempotency_key_required | This operation needs an Idempotency-Key header. | No |
| 400 | validation_failed | A path, query, header, cursor or body value failed validation. All problems are reported at once. | No |
| 401 | credential_expired | The API key passed its expiry date. | No |
| 401 | credential_revoked | The API key or OAuth grant was revoked by a workspace owner. | No |
| 401 | unauthenticated | The request has no credential, or the credential is malformed or unknown. | No |
| 403 | api_suspended | API access for this workspace is suspended. | No |
| 403 | approval_required | This action needs a person's approval in the dashboard. | No |
| 403 | consent_required | The OAuth client has no grant for a workspace yet. | No |
| 403 | insufficient_scope | The credential is valid but does not hold every scope the operation requires. | No |
| 403 | plan_does_not_include | The workspace plan does not include API access or the feature this operation needs. | No |
| 403 | sandbox_only | A test key and a live workspace (or the reverse) were mixed. | No |
| 403 | workspace_paused | Sending or API use for this workspace is paused. | No |
| 404 | not_found | The path or the resource does not exist for this workspace. A resource in another workspace looks identical. | No |
| 405 | method_not_allowed | The path exists but not for this HTTP method. | No |
| 409 | cannot_resubscribe | The address unsubscribed, bounced or is suppressed, so the API cannot add it again. | No |
| 409 | conflict | The request conflicts with the current state of the resource. | No |
| 409 | idempotency_key_reused | The Idempotency-Key was already used for a different request. | No |
| 409 | preview_required | A send needs a fresh preview token. | No |
| 409 | preview_stale | The mailing or its audience changed after the preview, or the preview token expired. | No |
| 409 | request_in_progress | The first request with this Idempotency-Key has not finished. | Yes |
| 412 | revision_mismatch | If-Match does not match the current revision. | No |
| 413 | payload_too_large | The request body is over the size limit for this operation. | No |
| 415 | unsupported_media_type | The Content-Type of the request body is not accepted. | No |
| 429 | quota_exceeded | A plan quota for the day or month is used up. | No |
| 429 | rate_limited | The credential or IP address exceeded its request limit. | Yes |
| 500 | internal_error | Something went wrong on the Seemly side. The request id identifies it. | Yes |
| 503 | service_unavailable | The API, a dependency or a safety limit is temporarily unavailable. The API never fails open. | Yes |