Skip to Content
KnowaKYC
Tenant API (KYC)

Errors and limits

Every Tenant API endpoint uses a single error format and standard HTTP status codes. The full list of endpoints and response examples is in the API reference (OpenAPI).

Error format

Error responses are JSON with a single shape:

{
  "success": false,
  "error": {
    "type": "invalid_request_error",
    "code": "validation_error",
    "message": "Request validation failed",
    "param": "flow_id",
    "details": [
      {
        "field": "flow_id",
        "code": "required",
        "message": "flow_id is required"
      }
    ],
    "request_id": "req_abc123",
    "retryable": false
  }
}

Field reference:

FieldDescription
successAlways false on error
error.typeError category, derived from the HTTP status: authentication_error (401), authorization_error (403), not_found_error (404), rate_limit_error (429), service_unavailable (503), api_error (5xx), invalid_request_error (other 4xx)
error.codeError code (for example, validation_error, not_found, unauthorized, conflict)
error.messageShort error description (for developers and logging)
error.paramParameter that caused the error (for validation errors)
error.detailsPer-field error array (for validation errors)
error.request_idRequest identifier (for support enquiries)
error.doc_urlLink to the relevant documentation section (when available)
error.retryableWhether the request is safe to retry (true for some 5xx errors and timeouts)

HTTP status codes

CodeDescription
200Request succeeded
201Resource created
400Bad request (error in body or parameters)
401Authentication failed (HMAC signature / JWT token missing or invalid)
403Forbidden (insufficient scope or attempt to access another tenant's resource)
404Resource not found (session, applicant, link, etc.)
409Conflict (for example, the review task is already assigned or the decision is already made)
410Resource no longer available (for example, session expired)
422Field validation failed
429Rate limit exceeded; the Retry-After header indicates how long to wait
500Internal server error; if error.retryable = true, the request can be retried

Rate limiting

Limits apply per IP address and per API key. Default values:

ScopeRequests/secRequests/min
Per IP address20200
Per API key40400

When the limit is exceeded, the server returns HTTP 429 Too Many Requests. Response headers:

HeaderDescription
X-RateLimit-LimitMaximum requests in the current window
X-RateLimit-RemainingRemaining requests
X-RateLimit-ResetUnix time at which the limit resets
Retry-AfterSeconds until the next allowed attempt

Recommendation: apply exponential backoff on retries and honour the Retry-After header.

Common errors

invalid_signature (401)

Invalid HMAC signature. Recheck the signature construction (see Authentication).

invalid_signature (401) — clock drift

If X-Timestamp deviates from the server time by more than 5 minutes, the server also returns invalid_signature (there is no separate timestamp_expired code). Confirm that the client clock is synchronised (NTP).

unauthorized (403)

The API key does not have sufficient scopes. Review the key scopes in the admin panel.

not_found (404)

The requested resource (applicant, session, link, etc.) does not exist or belongs to another tenant.

The verification link has already been consumed. Create a new link.

The verification link expired. Create a new link with a longer ttl_seconds.

validation_error (422)

Request fields failed validation. Per-field details are in the error.details array.

rate_limit_exceeded (429)

Rate limit exceeded. Honour the Retry-After header and apply exponential backoff.

internal_server_error (500)

Internal server error. Check error.retryable — when true, the request can be retried.

OTP verification: limits and errors

OTP confirms a phone number or email address during a KYC session.

OTP code parameters

ParameterValue
Code length6 digits
Code lifetimePhone: 10 minutes by default. Email: 15 minutes by default. Flow step configuration can override the lifetime within the supported range.
Minimum resend interval15 seconds by default; flow step configuration can override it
Maximum entry attempts10

OTP errors

On failed verification, OTP endpoints return the standard error envelope with an OTP error code and a text message explaining the reason. When available, the remaining attempt count is included in error.details as attempts_remaining.

rate_limit_exceeded (429)

OTP send rate limit exceeded. Wait until the limit resets (see the Retry-After header).

otp_invalid / otp_expired (400/422)

The code expired (older than 10 minutes). Request a new code through POST .../otp/send.

otp_invalid (400/422)

The entered code is wrong. The remaining attempt count is in error.details when the endpoint returns it.

otp_invalid (400/422), max attempts exceeded

All 10 attempts were used. The code is invalidated — request a new one through POST .../otp/send.


See also: Authentication (codes 401, 403), API reference (OpenAPI) (full endpoint and response code specification).

On this page