Skip to content

Errors

Errors are RFC 9457 problem details, sent as application/problem+json:

{
"type": "https://docs.rhinorelay.com/api/errors/validation-failed/",
"title": "Validation failed",
"status": 422,
"code": "validation_failed",
"detail": "The request body is invalid. See errors.",
"requestId": "req_01J9Z8X7W6V5T4S3R2Q1P0N9M8",
"errors": [
{
"path": "email",
"message": "invalid email address"
}
]
}
  • code is stable: branch on it, not on title or detail.
  • type links to the error’s page below.
  • detail explains the error in words and never repeats the values you sent, so errors are safe to log.
  • errors, on validation errors, lists each problem by path, again without your values.
  • requestId is also in every response’s x-request-id header. Quote it if you contact support.

The API returns these 33 codes and no others.

StatusCodeMeaning
400bad_requestMalformed JSON or headers.
401unauthenticatedThe credential is missing or invalid.
402entitlement_inactiveThe subscription ended and the grace period is over. Unsubscribe, erasure, export and reads keep working.
403forbiddenThe credential doesn't carry the scope this endpoint needs.
404not_foundNo such resource in this tenant, or an invalid token.
409tenant_disconnectedThe tenant's role or stack is unavailable. Check /health.
409contact_suppressedThe address is unsubscribed, bounced, complained, cleaned or erased.
409email_takenAnother contact already has this address.
409cannot_resubscribeBounced, complained and cleaned contacts can't be resubscribed.
409segment_in_useA draft, scheduled or sending campaign uses this segment.
409not_draftOnly draft campaigns can change or be deleted.
409invalid_stateThe campaign's state doesn't allow this action.
409quota_reserve_exhaustedTest sends would exceed the daily quota reserve.
409not_readyThe import isn't ready to commit yet.
409already_committedThe import has already been committed.
409idempotency_conflictThe Idempotency-Key was used with a different request.
412version_conflictIf-Match doesn't match the resource's current version.
413batch_too_largeOver 1,000 items or 1 MB.
422validation_failedThe request body or parameters are invalid. See errors[].
422consent_requiredSubscribed contacts need a consent record.
422segment_invalidThe segment definition is invalid (over 3 levels, over 50 conditions, or an unknown operator).
422template_invalidThe template is missing {{ unsubscribe_url }} or {{ footer_address }}, doesn't parse, or is over 380 KB.
422from_domain_unverifiedfromEmail must be on the tenant's verified sending domain.
422render_failedThe template failed to render with the given contact or sample.
422schedule_checks_failedOne or more pre-send checks failed. See errors[] for each check and its fix.
422acknowledge_mismatchResume needs acknowledge equal to the campaign's pauseReason.
422mailchimp_auth_failedMailchimp rejected the API key or OAuth grant.
422stack_not_foundThe tenant template stack wasn't found in the registered account and Region.
422role_assume_failedOur service couldn't assume the tenant role with the issued external ID.
421wrong_regionThis tenant's data lives in another Region. Call https://api.<region>.rhinorelay.com (the console's Setup page shows your API host).
429rate_limitedToo many requests. Retry after the Retry-After header.
500internalSomething went wrong on our side. Quote requestId to support.
503dependency_unavailableAn AWS dependency is unavailable. Retry with the same Idempotency-Key.

Any authenticated endpoint can return 400, 401, 403, 409 tenant_disconnected, 421 wrong_region, 429, 500 and 503. The API reference lists the other codes each endpoint can return.

  • Retry 429 after the Retry-After seconds, and 500 and 503 with the same Idempotency-Key.
  • Fix the request for 400, 404, 412, 413 and 422.
  • Fix your setup for 401, 402, 403, 409 tenant_disconnected and 421: the key, the subscription, the scope, the connection to your stack or your Region’s API host.
  • Read the state for the other 409s: the resource isn’t in a state that allows what you asked.