Error Response Format
All API errors follow a consistent structure. Every error response includes a machine-readable error code, a human-readable message, and a unique request ID for debugging.
{
"success": false,
"error": "ERROR_CODE",
"message": "Human-readable description of what went wrong",
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}| Field | Description |
|---|---|
success | Always false for error responses. |
error | Machine-readable error code. Use this for programmatic error handling. |
message | Human-readable message describing the error. Suitable for logging but not for display to end users. |
requestId | Unique identifier for the request. Include this when contacting support. |
HTTP Status Codes
| Status | Meaning |
|---|---|
| 200 | Success |
| 201 | Created |
| 202 | Accepted (async processing) |
| 304 | Not Modified (ETag match) |
| 400 | Validation Error |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
| 409 | Conflict |
| 429 | Rate Limited |
| 500 | Internal Server Error |
Retry Guidance
Not all errors should be retried. Follow these rules:
Never retry 4xx errors — they indicate a problem with your request that must be fixed before resending.
- 429 (Rate Limited) — Retry after the number of seconds in the
Retry-Afterheader. Use exponential backoff for subsequent retries. - 5xx (Server Errors) — Retry with exponential backoff. These are transient errors on the server side.
- 4xx (Client Errors) — Do not retry. The request itself is invalid and must be fixed before resending.
Decision flow:
Is the status code 429?
Yes -> Wait for Retry-After seconds, then retry
No -> Is the status code 5xx?
Yes -> Retry with exponential backoff (max 3 attempts)
No -> Is the status code 4xx?
Yes -> Do not retry. Fix the request.
No -> Success. Process the response.Request ID
Every API response — both successful and failed — includes a request ID in two places:
- The
X-Request-Idresponse header - The
requestIdfield in the response body
HTTP/1.1 400 Bad Request
X-Request-Id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
Content-Type: application/json
{
"success": false,
"error": "VALIDATION_ERROR",
"message": "...",
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}When contacting Celper AI support about an API issue, always include the request ID. It enables the team to trace your request through the system.
Common Errors
Unauthorized (401) — The API key is missing or invalid.
Insufficient scope (403) — The API key does not have the required scope for this endpoint.
Validation error (400) — The request body or query parameters are invalid.
Not found (404) — The requested resource does not exist.
Duplicate candidate (409) — A candidate with the same email already exists in the job position.