Skip to main content

Error response format

Every error response is JSON, carries the HTTP status code, and includes a request_id you can quote to support. The same value is returned in the X-Request-ID response header. The human-readable message is a complete sentence written for a person, and it sits in one of two fields depending on where the error was raised. Most errors use a detail field:
Errors raised by the application’s own service layer use an error field with the same shape:
Read the message from detail when it is present, otherwise from error. Some endpoints return an object in detail with a message field and extra context.
Match on the HTTP status code, never on the message text. Message wording is written for people and can change without notice. Treat it as display text.
Validation errors (422) keep a structured array in detail, one entry per invalid field, and do not wrap it in a sentence:

Status codes

The generated API reference declares applicable error codes on each operation. An endpoint does not necessarily return every status in this table; use the endpoint page as the source of truth for its error surface.

Retrying requests

Safe to retry: GET requests and a DELETE after confirming the resource state. Treat PUT, PATCH, and POST as endpoint-specific: retry them only when the endpoint page documents idempotency or you have verified that the first request did not complete. Use exponential backoff when retrying on 429 or 5xx:

Idempotency

Do not assume every write is idempotent. Use the documented idempotency field or header where available. For campaign enrollment, inspect the response before retrying; duplicate enrollment is reported as skipped rather than creating a second enrollment.