Errors

Error responses, what each one means, and which ones to retry.

Successful requests return 2xx. Errors return a JSON body with the HTTP status, a stable machine-readable name and a human-readable message:

Response 422
{
  "statusCode": 422,
  "name": "validation_error",
  "message": "Invalid `to` field. The email address needs to follow the `email@example.com` or `Name <email@example.com>` format."
}

Branch on name; messages may be reworded over time.

Error names

StatusnameMeaningRetry?
400invalid_idempotency_keyThe Idempotency-Key is not 1 to 256 characters.No
401missing_api_keyNo API key in the request.No
401restricted_api_keyA sending-access key called an endpoint that needs full access.No
403invalid_api_keyThe key is unknown, revoked, or the account is suspended.No
403invalid_from_addressThe from address is not an active sender on a verified domain, or the key is limited to another domain.No
403plan_inactiveYour plan does not allow adding contacts.No
404not_foundThe email, template or endpoint does not exist in your account.No
409invalid_idempotent_requestThe Idempotency-Key was already used with a different body.No
409concurrent_idempotent_requestsA request with the same key is still running.Yes, shortly
422missing_required_fieldA required field is missing.No
422validation_errorA field is invalid, or a template variable is missing.No
413validation_errorThe request body is larger than 10 MB.No
422invalid_attachmentAn attachment is too large, not base64, or of a blocked type.No
429rate_limit_exceededMore requests per second than your plan allows.Yes, after retry-after
429monthly_quota_exceededThe plan’s monthly email allowance is used up, or the plan is not active.No
500application_errorSomething went wrong on Cresca’s side.Yes, with backoff
503service_unavailableSending is temporarily unavailable.Yes, with backoff

Retry strategy

Retry 429, 5xx, timeouts and network errors with exponential backoff and jitter, and send an Idempotency-Key so retries never duplicate an email. Do not retry other 4xx errors: the same request will fail the same way.