Errors

All error responses follow a consistent JSON format:

1{
2 "error": "not_found",
3 "detail": "Session not found.",
4 "status_code": 404
5}
FieldTypeDescription
errorstringMachine-readable error code.
detailstringHuman-readable description of the error.
status_codeintegerHTTP status code.

Status codes

CodeMeaningWhen it occurs
400Bad RequestMalformed JSON, missing required fields, or invalid parameter values.
401UnauthorizedMissing or invalid API key.
403ForbiddenAPI key lacks the required scope, or IP not in allowlist.
404Not FoundThe requested resource does not exist or belongs to a different organization.
409ConflictResource state conflict (e.g. approving an already-approved session).
422Unprocessable EntityRequest body is valid JSON but fails semantic or field-level validation (e.g. string longer than its maxLength, list longer than its maxItems, or an idempotency key reused with different parameters).
429Too Many RequestsRate limit or product quota exceeded. See Rate Limiting.
500Internal Server ErrorAn unexpected error on our side. These are automatically reported and investigated.

Common error codes

error valueStatusDescription
bad_request400Invalid request parameters.
unauthorized401Missing or invalid API key.
forbidden403Insufficient permissions.
not_found404Resource not found.
conflict409State conflict.
validation_error422Semantic validation failure.
idempotency_mismatch422Same idempotency key used with different parameters.
rate_limited429Rate limit exceeded.
quota_exceeded429Product quota exceeded.
internal_error500Unexpected server error.

Field-level validation (422)

Request bodies for sessions, cases, identities, and screening enforce strict field bounds. Violations return 422 Validation Error with a detail array naming each offending field. Common triggers:

  • String fields exceeding their maxLength (typically 100, 500, or 5000 characters depending on the field).
  • Lists exceeding their maxItems (typically 50 tags or 100 items).
  • The metadata object exceeding 16 KB serialized.

Fix the request body before retrying — these errors are not transient.

Retry guidance

Status codeRetry?Notes
400, 401, 403, 404NoFix the request before retrying.
409NoResolve the conflict (e.g. check current resource state).
422NoFix the request body or use a new idempotency key.
429YesWait for the Retry-After duration, then retry.
500YesRetry with exponential backoff (max 3 attempts).