Dashboard

API Reference

Errors

An error answers with a 4xx or 5xx status and a JSON body. name is stable, so branch on it in your code. message is for people and can change.

{
  "name": "validation_error",
  "status": 400,
  "message": "subject is required without a template",
  "errors": [
    {
      "message": "subject is required without a template",
      "location": "subject"
    }
  ],
  "request_id": "5f0c6a2e-8d1b-4c7a-9e3f-2b6d4a1c8e90"
}

subject is required without a template.

Error Body

namestring

The error name from the list below.

statusinteger

The HTTP status.

messagestring

What went wrong.

errorsobject[]

For a validation error, one entry for each problem. Empty for other errors.

request_idstring | null

The request id, also in the X-Request-Id header.

Error Names

validation_error400

A field is missing or invalid, or the body is not valid JSON.

invalid_idempotency_key400

The Idempotency-Key header is not 1 to 256 printable ASCII characters.

unauthorized401

The API key is missing, revoked or expired.

forbidden403

The key cannot do this: a Sending key on a Full route, a key limited to one domain on a workspace route, a request from an address outside the IP allowlist, or a from domain the key is not limited to. A send also answers 403 when the domain is not verified, every recipient is suppressed, or sending is paused.

limit_exceeded403

The workspace reached a limit, such as 100 topics.

not_found404

The object does not exist in this workspace.

conflict409

The object is in a state that does not allow the change, such as deleting a campaign that is sending, or the name is already taken.

concurrent_idempotent_requests409

A request with the same Idempotency-Key is still running.

payload_too_large413

The body is larger than 45 MB for Send Email, 10 MB for Send Batch or 2 MB for other routes.

unsupported_media_type415

The body is not sent as application/json.

invalid_idempotent_request422

The Idempotency-Key was used with a different request.

rate_limit_exceeded429

Too many requests for this key, or the workspace reached its daily sending limit. See Rate Limits.

unknown_error500

Something failed on our side. Retry later.

service_unavailable503

A service we depend on did not answer. Wait for the seconds in Retry-After and try again.

{
  "name": "validation_error",
  "status": 400,
  "message": "subject is required without a template",
  "errors": [
    {
      "message": "subject is required without a template",
      "location": "subject"
    }
  ],
  "request_id": "5f0c6a2e-8d1b-4c7a-9e3f-2b6d4a1c8e90"
}

subject is required without a template.