Skip to main content

Errors

Every error has the same shape, a stable code and a request ID for support.

The error envelope

Errors use standard HTTP status codes and a JSON body with a machine-readable code, a human-readable message and the requestId (also in the X-Request-Id header). Branch on code, never on the message text, which may change.

409 Conflict: STALE_LEAD (JSON)
{  "error": {    "code": "STALE_LEAD",    "message": "The lead changed since it was loaded.",    "requestId": "7d0c2f4e-3b1a-4f5e-9c8d-2a1b0c9d8e7f"  }}

What to do about this one is under STALE_LEAD in Error codes; every code there has its own link, so you can jump to it from a log line.

Validation errors

A request that fails validation returns 400 VALIDATION_ERROR. The message says which part of the request failed (body, query, path parameters or headers), for people reading logs; it does not name the field, and there is no machine-readable field list. To find the field, compare the request with the operation's fields and constraints in the reference, or validate requests before you send them against the OpenAPI document.

Some other errors add a details object with extra context, for example currentRevision on STALE_REVISION, the conflicting record IDs on a rule conflict, or sourceField and targetField on a mapping error. Its keys depend on the error: log it, and only rely on keys this guide or the operation names.

400 Bad Request (JSON)
{  "error": {    "code": "VALIDATION_ERROR",    "message": "The JSON request body is invalid.",    "requestId": "3b9e1c4d-7a2f-4e8b-9c1d-5f6a7b8c9d0e"  }}

Status codes

Client errors (4xx): change the request, never retry it unchanged

  • 400 Bad RequestThe request is invalid: a field, parameter or header failed validation.Fix the request; retrying it unchanged fails again.
  • 401 UnauthorizedThe API key is missing, malformed, revoked or expired.Check the Authorization header and the key's status; rotate it if it may have leaked.
  • 403 ForbiddenThe key lacks the scope, or its acting member lacks the permission or data access.Add the scope to the key, or adjust the acting member's role or teams.
  • 404 Not FoundThe resource does not exist or is not visible to this key.Check the ID, and the sources or campaigns the key may use.
  • 409 ConflictConflict with the current state: a stale expectedUpdatedAt or expectedRevision, a workflow rule, or a reused Idempotency-Key.Act on the code: see Error codes. Never retry a 409 unchanged.
  • 410 GoneThe change-feed cursor is older than the 30-day retention.Take a fresh cursor and reconcile: Retention and recovery.
  • 415 Unsupported Media TypeA QUERY request was sent without a JSON body.Send Content-Type: application/json with the body.
  • 422 Unprocessable ContentA QUERY body is valid JSON but does not match the operation's schema.Compare the body with the operation's request fields.

Rate limit and server errors: retry with backoff

  • 429 Too Many RequestsThe key's per-minute request budget is spent.Wait Retry-After seconds, then continue.
  • 500 Internal Server ErrorAn unexpected error on our side.Retry reads with backoff; retry writes only as described under When to retry. Quote requestId to support.
  • 502 Bad GatewayA downstream service, such as telephony, returned an error.Retry reads with backoff; retry writes only as described under When to retry.
  • 503 Service UnavailableA downstream service is temporarily unavailable.Retry reads with backoff; retry writes only as described under When to retry.

Error codes

Every error.code the API documents, 52 in all, by status. Each operation in the reference lists the ones it can return.

  • IDEMPOTENCY_KEY_REQUIRED400 Bad RequestThis operation needs an Idempotency-Key header.Generate a key, save it with the job and send it.Returned by Lead submission, Leads
  • VALIDATION_ERROR400 Bad RequestThe body or parameters failed validation.Compare the request with the operation's fields; message names the part (body, query, path or headers), not the field.Returned by Change feed, Lead submission, Leads, Lead intake and 8 more
  • INVALID_PARTNER_CREDENTIAL401 UnauthorizedThe bearer token is not a valid, active API key.Check the token; create or rotate a key.Returned by Every operation
  • PARTNER_OPERATION_FORBIDDEN403 ForbiddenThe operation is outside the key's scopes.Add the scope shown on the operation to the key.Returned by Leads, Lead intake, Ownership, Calling and 6 more
  • PARTNER_SCOPE_FORBIDDEN403 ForbiddenA partner endpoint needs a scope the key lacks (for example events.read).Add the scope to the key.Returned by Change feed, Lead submission, Recordings
  • PERMISSION_DENIED403 ForbiddenThe key's acting member lacks the permission or data access.Returned by Leads, Lead intake, Ownership, Calling and 6 more
  • ACTIVITY_NOT_FOUND404 Not FoundThe activity does not exist or the key cannot see it.Returned by Leads
  • BATCH_NOT_FOUND404 Not FoundThe batch does not exist or the key cannot see it.Returned by Lead intake, Voicebot
  • CALL_ATTEMPT_NOT_FOUND404 Not FoundThe call attempt does not exist or the key cannot see it.Returned by Voicebot
  • CALL_NOT_FOUND404 Not FoundThe call does not exist or the key cannot see it.Returned by Calling, Reports
  • CAMPAIGN_NOT_FOUND404 Not FoundThe campaign does not exist or the key cannot see it.Returned by Calling, Reports, Campaigns, Quality and 1 more
  • CDR_EXPORT_NOT_FOUND404 Not FoundThe export does not exist or the key cannot see it.Returned by Reports
  • CONTACT_NOT_FOUND404 Not FoundThe contact does not exist or the key cannot see it.Returned by Leads, Calling
  • LEAD_NOT_FOUND404 Not FoundThe lead does not exist or the key cannot see it.Returned by Leads, Calling
  • MAPPING_NOT_FOUND404 Not FoundThe field mapping does not exist or the key cannot see it.Returned by Lead intake
  • MEDIA_OBJECT_NOT_FOUND404 Not FoundThe media file does not exist or the key cannot see it.Returned by Administration
  • MEMBER_NOT_FOUND404 Not FoundThe member does not exist or the key cannot see it.Returned by Team
  • PROCESS_NOT_FOUND404 Not FoundThe process does not exist or the key cannot see it.Returned by Campaigns
  • RECEIPT_NOT_FOUND404 Not FoundThe receipt does not exist or the key cannot see it.Returned by Lead submission
  • RECORDING_NOT_FOUND404 Not FoundThe call or recording does not exist or the key cannot see it.Returned by Recordings, Quality
  • SEGMENT_NOT_FOUND404 Not FoundThe segment does not exist or the key cannot see it.Returned by Ownership
  • SOURCE_CONNECTION_NOT_FOUND404 Not FoundThe source connection does not exist or the key cannot see it.Returned by Lead intake
  • SOURCE_NOT_FOUND404 Not FoundThe source does not exist or is not granted to the key.Check SOURCE_ID, and add the source to the key.Returned by Lead submission
  • SOURCE_RECORD_NOT_FOUND404 Not FoundThe source record does not exist or the key cannot see it.Returned by Lead intake
  • STAGE_NOT_FOUND404 Not FoundThe stage does not exist or the key cannot see it.Returned by Ownership
  • TEAM_NOT_FOUND404 Not FoundThe team does not exist or the key cannot see it.Returned by Team
  • TEMPLATE_NOT_FOUND404 Not FoundThe report template does not exist or the key cannot see it.Returned by Reports
  • CALL_BATCH_ELIGIBILITY_STALE409 ConflictLead eligibility changed since the preview; preview again.Returned by Voicebot
  • CALL_SETTINGS_STALE409 ConflictThe settings changed after you read them; read them again and resend.Returned by Calling
  • CAMPAIGN_NAME_CONFLICT409 ConflictAnother campaign already has this name.Returned by Campaigns
  • CDR_TEMPLATE_CONFLICT409 ConflictThe template changed after you read it, or its name is taken.Returned by Reports
  • CUSTOMER_FORM_STALE409 ConflictThe form changed after you read it; read it again and resend.Returned by Campaigns
  • IDEMPOTENCY_CONFLICT409 ConflictThe key was already used with a different body.Use a new key for a new request; reuse a key only for the identical request.Returned by Lead submission, Leads
  • INITIAL_STAGE_CONFLICT409 ConflictThe process already has an initial stage; clear it or send replaceInitial.Returned by Ownership
  • OUTCOME_CONFLICT409 ConflictA different outcome was already saved for this call.Returned by Calling
  • PROCESS_ARCHIVED409 ConflictArchived processes cannot be changed.Returned by Campaigns
  • PROCESS_LIMIT_REACHED409 ConflictThe workspace has reached its plan's process limit.Returned by Campaigns
  • PROCESS_NAME_CONFLICT409 ConflictAnother process already has this name.Returned by Campaigns
  • SEGMENT_NAME_CONFLICT409 ConflictAnother segment already has this name.Returned by Ownership
  • SOURCE_CONNECTION_NAME_CONFLICT409 ConflictAnother source connection already has this name.Returned by Lead intake
  • SOURCE_INACTIVE409 ConflictThe source is paused; submissions are refused until it is resumed.Resume the source in LMS, then resend with the same key.Returned by Lead submission
  • STAGE_NAME_CONFLICT409 ConflictAnother stage already has this name.Returned by Ownership
  • STALE_LEAD409 ConflictThe lead changed after you read it (expectedUpdatedAt no longer matches).Re-read the lead, reapply your change, and send its latest updatedAt as expectedUpdatedAt.Returned by Leads
  • STALE_REVISION409 ConflictThe record changed after you read it (expectedRevision no longer matches).Read it again; details.currentRevision has the current revision.Returned by Leads, Lead intake, Ownership, Calling
  • TEAM_NAME_CONFLICT409 ConflictAnother team already has this name.Returned by Team
  • VOICEBOT_CONFIGURATION_STALE409 ConflictThe draft changed after you read it; read it again and resend.Returned by Voicebot
  • CURSOR_EXPIRED410 GoneThe change-feed cursor is past the 30-day retention.Take a fresh cursor and reconcile: Retention and recovery.Returned by Change feed, Reports
  • REQUEST_BODY_TOO_LARGE413 Content Too LargeThe upload is too large.Returned by Lead intake
  • QUERY_CONTENT_TYPE_UNSUPPORTED415 Unsupported Media TypeThe QUERY request has no Content-Type: application/json body.Returned by Leads, Ownership, Team
  • QUERY_VALIDATION_FAILED422 Unprocessable ContentThe QUERY body is JSON but does not match the request fields.Returned by Leads, Ownership, Team
  • RATE_LIMITED429 Too Many RequestsToo many requests this minute.Wait Retry-After seconds.Returned by Every operation
  • UNEXPECTED_ERROR500 Internal Server ErrorSomething went wrong on our side.Retry as described below; quote requestId to support.Returned by Every operation

When to retry

  • Reads (GET and QUERY) are always safe to retry after a timeout, 429 or 5xx, with exponential backoff and jitter.
  • Creates that take an Idempotency-Key (Create a lead, Submit a lead) are safe to retry with the same saved key. See Retrying safely.
  • Updates that send expectedUpdatedAt or expectedRevision are safe to retry: if the first attempt did apply, the retry fails with 409 instead of applying twice. Read the record to check.
  • Other writes (for example hanging up a call): read the resource first to see whether the first attempt took effect, then decide.

Honour Retry-After on 429; see Rate limits.