Kenso

Errors

Errors from the endpoints use one shape with a matching HTTP status. Branch on code, which is stable.

Ken-Version: 2026-11-02

The error object

JSON
{
  "success": false,
  "error": {
    "code": "validation_failed",
    "message": "Campaign name is required.",
    "details": [ { "field": "name", "code": "required", "message": "Name is required." } ],
    "requestId": "0HN7Q2..."
  }
}
  • code is stable: branch on it.
  • message is for people and can change.
  • details lists field-level problems when a request fails validation.
  • requestId identifies the request. Quote it when you contact support.

Codes

Status
Code
400
validation_failed, workspace_required, unsupported_version, version_retired
401
unauthenticated
402
plan_limit_reached
403
forbidden
404
not_found
409
conflict, invalid_state
429
rate_limited, quota_exceeded
500
internal_error
503
service_unavailable

401 and 429 from the gateway

Some 401 and 429 responses come from the authentication and rate-limit layers in front of the endpoints. They do not use the error object, so branch on the HTTP status for them:

  • 401: the API key is missing, invalid or revoked. The body is { "error": "Invalid or revoked API key" } or empty.
  • 429: your key or your IP sent too many requests. Wait and retry, and honor Retry-After when the response carries it.

More guides