Every non-2xx response from the API uses the same envelope. Branch on the HTTP status code and theDocumentation Index
Fetch the complete documentation index at: https://docs.replyful.com/llms.txt
Use this file to discover all available pages before exploring further.
error.type enum — never on error.message, which is human-readable and may change.
Envelope
| Field | Type | Description |
|---|---|---|
type | string | High-level category. Stable enum — branch on this. |
code | string | Specific machine-readable reason. Stable — branch on this for fine-grained handling. |
message | string | Human-readable explanation. May change between releases. Do not parse. |
param | string | undefined | Dotted path to the offending field, when applicable. |
docUrl | string | Deep link to the docs page for this code. |
requestId | string | Echoes the response Request-Id header. Quote this in support tickets. |
Status code is the source of truth. The API will never return
200 OK with an error body. If your status check passes, the response is success.Error types
Theerror.type enum:
| Type | Status | When it fires |
|---|---|---|
authentication_error | 401 | Missing or invalid API key. |
validation_error | 422 | Request was well-formed but failed validation. |
rate_limit_error | 429 | Too many requests. See Rate limits. |
api_error | 5xx | Server-side fault. Safe to retry idempotent calls with backoff. |
type values (invalid_request_error, permission_error, not_found, idempotency_error) are reserved for endpoints that are not yet shipped.
Error codes shipped today
| Code | Type | Meaning |
|---|---|---|
missing_api_key | authentication_error | The Authorization header is absent or does not start with Bearer . |
invalid_api_key | authentication_error | The key is malformed, unknown, or archived. |
invalid_query_parameter | validation_error | A query parameter failed validation. The param field names the offender. |
invalid_cursor | validation_error | The startingAfter cursor could not be decoded. |
conflicting_date_range | validation_error | A request mixed createdAt[...] and updatedAt[...] filters. Pick one. |
too_many_requests | rate_limit_error | Rate limit exceeded. Honor Retry-After. |
internal_server_error | api_error | Unexpected server-side fault. Retry with backoff. |
Examples
401 missing_api_key
422 invalid_query_parameter
422 conflicting_date_range
429 too_many_requests
Handling errors
A pragmatic client:Request IDs
Every response carries aRequest-Id header (e.g. req_01HK7GD3H6ZSQ0Y2A5B3C4DEFG). The same value appears in the error body’s requestId field. We retain request traces for 90 days — quote the ID in support emails to get the exact context of a failing call.