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
The error name from the list below.
The HTTP status.
What went wrong.
For a validation error, one entry for each problem. Empty for other errors.
The request id, also in the X-Request-Id header.
Error Names
A field is missing or invalid, or the body is not valid JSON.
The Idempotency-Key header is not 1 to 256 printable ASCII characters.
The API key is missing, revoked or expired.
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.
The workspace reached a limit, such as 100 topics.
The object does not exist in this workspace.
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.
A request with the same Idempotency-Key is still running.
The body is larger than 45 MB for Send Email, 10 MB for Send Batch or 2 MB for other routes.
The body is not sent as application/json.
The Idempotency-Key was used with a different request.
Too many requests for this key, or the workspace reached its daily sending limit. See Rate Limits.
Something failed on our side. Retry later.
A service we depend on did not answer. Wait for the seconds in Retry-After and try again.