Error format
API endpoint errors follow this envelope:Error codes
This table also includes OAuth token endpoint errors. Those happen before you have a bearer token and are returned by/oauth/token.
Validation errors
A422 validation_failed response includes a details array with specific field errors. For example, creating a contact without an email or phone number returns:
Conflict errors
A409 conflict is returned when you try to create a contact with an email or phone number that already belongs to an existing contact. The response includes the id of the existing contact, nested inside the error object, so you can update it directly.
error.id.
Event ingest errors
The Ingest an event endpoint is an exception: a payload that fails validation returns400 with a top-level errors array
rather than the standard error envelope, and a status of rejected.
401, 403, 413,
429) still use the standard error envelope above.
Handling errors
- Check the HTTP status code first. The status code tells you the category of error.
- Parse the error body. Use the
codefield for programmatic handling and themessagefor logging. - Only retry on
429. Rate limit errors are temporary — wait forRetry-Afterseconds, then retry. Other errors require fixing the request.