Reference
Error Code Reference
This reference covers common Chatofy API error codes and how to resolve them. All errors use a standardized envelope: { success: false, error: { code, message, field?, request_id } }.
Authentication Errors
- 401 unauthorized — Invalid or missing API key. Check your request headers.
- 403 forbidden — The API key does not have permission for this action.
Validation Errors
- 400 bad_request — Invalid request parameters. Check the
detailsfield for specifics. - 422 unprocessable — Request is syntactically valid but semantically incorrect (e.g., invalid phone number).
Resource Errors
- 404 not_found — The requested resource does not exist.
- 409 conflict — Resource already exists (e.g., duplicate contact).
Rate Limit Errors
- 429 too_many_requests — Rate limit exceeded. Respect the
Retry-Afterheader.
Server Errors
- 500 internal_error — Unexpected server error. Retry with backoff.
- 503 service_unavailable — Temporary maintenance or overload. Retry later.