Errors

Errors

Error format, status codes and the codes you should handle.

Every failed request returns a JSON body with one error object:

{
  "error": {
    "type": "invalid_request_error",
    "code": "parameter_invalid",
    "message": "email must be an email",
    "param": "candidate.email",
    "request_id": "req_…"
  }
}

Branch on code, not on message. Messages are written for people and may change. param names the offending field when there is one.

Types

typeStatusMeaning
invalid_request_error400, 404, 409, 413, 422Something about the request is wrong. Fix it before retrying.
authentication_error401The key is missing, malformed or revoked.
permission_error403The key lacks a scope, or your organisation is out of credits.
idempotency_error409An idempotency key clash.
rate_limit_error429Too many requests. Wait Retry-After seconds.
api_error500Our fault. Safe to retry with the same idempotency key.

Codes

StatuscodeWhat to do
400parameter_invalidFix the field named in param.
400invalid_requestRead the message; the request is not valid in this state (for example, extending a completed invitation).
400export_too_largeNarrow the export's filters below 50,000 rows.
401invalid_api_keyCheck the key and its prefix.
403missing_scopeAdd the scope to the key, or use another key.
403credits_exhaustedLive mode only. Buy or request more credits.
404resource_missingThe id does not exist in this mode.
404recording_not_availableThe session has no recording yet, or never will.
404error_file_not_availableThe import had no skipped rows.
409candidate_has_sessionsA candidate who was ever invited cannot be deleted.
409candidate_exists_in_other_modeThe email already belongs to a candidate in the other mode.
409import_already_committedThe import has already started.
409conflictThe request clashes with the current state.
409idempotency_key_in_useThe first request with this key is still running. Retry shortly.
409idempotency_key_reusedThe key was used for a different request. Use a new key.
413file_too_largeFiles are capped at 10 MB.
422unprocessableThe file could not be read.
429rate_limitedBack off.
500internal_errorRetry with backoff. If it persists, contact support with the request_id.

Retrying safely

Retry 429, 500 and network errors with exponential backoff, and send the same Idempotency-Key on every attempt so a POST never runs twice. Do not retry other 4xx errors unchanged. The TypeScript SDK does all of this for you.