Skip to main content

Errors

Every failure on the KnoxCall Management API (/v1) returns one canonical shape. There is a single error object with a machine-readable type, a human-readable message, and a request_id. You branch on type; you show message to a human; you quote request_id to support.

The error envelope

The error object is the only top-level key on a failure response — there is no data or meta on an error. Success responses use { "data": ..., "meta": ... }; failures use { "error": ... }. Check for the presence of error first.

Type → status table

The HTTP status is derived from error.type. The mapping is stable — code against it.

Idempotency error types

Sent only on mutating requests that carry an idempotency key. See Idempotency for the full flow.
422 is used only for idempotency_key_reuse. Ordinary input-validation failures are always 400 validation_error — never 422.

Branching on error.type

Match on error.type, not on HTTP status codes and not on the human message. Statuses are shared across several types (three different types map to 403), and message wording is not part of the contract.
The first-party SDKs already map these types to typed exceptions (NotFoundError, RateLimitError, AuthenticationError, and so on) so you can catch them directly instead of inspecting raw responses.

Correlating a request — request_id and X-Request-Id

Every response carries the same request ID in two places:
  • error.request_id in the JSON body (on failures) and meta.request_id (on successes).
  • The X-Request-Id response header — present on every response, success or error.
The header lets you record the ID from your HTTP client even when you never parsed the body (for example on a 500 you logged and moved past). The two values are always identical.
When you contact support about a failed request, quote the request_id. It lets us trace the exact request through our systems — the upstream call, the tenant, the timing — without you having to reconstruct what happened.

What’s Next?

Rate limits

Headers, Retry-After, and backoff guidance for 429 responses.

Idempotency

Safe retries for mutating requests, replay semantics, and 409 / 422 behavior.

API Overview

Base URLs, response envelope, pagination, and quick examples.

Authentication

OAuth 2.1 + DPoP, CLI login, and API key types.