Errors
Non-2xx responses carry machine-readable error codes. This page maps those responses to the caller behaviors you should implement in a production integration.
3 min read
Rely on the error envelope
Non-2xx responses use a stable error envelope with type, code, and message fields.
Validation failures return 400, authentication failures return 401, missing resources return 404, and duplicate/conflict cases return 409.
Every non-2xx response includes a machine-readable code and a human-readable message. Build your retry and alerting behavior around the code, not the prose.
Map status codes to caller behavior
-
400means the request shape or values are invalid. -
401means the key is missing or invalid. -
404means the target job or resource does not exist in the authenticated workspace. -
409means the request conflicts with existing state and should be corrected before retrying.
{
"error": {
"type": "invalid_request",
"code": "invalid_body",
"message": "Request body is invalid."
}
} Need help shipping an integration?
Reach the Mailrith team if you need help planning a sync, validating a webhook flow, or troubleshooting a request.
Related guides
Use workspace-scoped Bearer keys and understand how protected requests are authorized.
Retry async job creation safely with the `Idempotency-Key` header.
Create async subscriber import and export jobs and poll them to completion.