Skip to main content

Errors

Errors use a single shape, with the HTTP status mapped from the error code:

{ "error": "Task not found.", "code": "NOT_FOUND" }

An optional details field carries extra context (for example which argument failed validation).

HTTP statusCodeMeaning
400AI_TOOL_INVALID_ARGUMENTS, VALIDATION_ERRORThe request body or query failed validation
401—Missing, expired, or revoked API key, or the key's creator lost workspace access
403AI_TOOL_FORBIDDEN, SCOPE_INSUFFICIENTThe key lacks the scope, or the creator lacks the underlying permission
404AI_TOOL_NOT_FOUND, NOT_FOUNDUnknown endpoint or record
409REVISION_CONFLICTThe record changed since it was read; re-read and retry
429RATE_LIMITEDRate limit exceeded — see Rate limits; honor Retry-After

Troubleshooting​

  • 401 — create a new key in Settings → Integrations. Check the key has not expired and its creator is still a workspace member.
  • 403 — add the missing scope to the key, or grant the creator the underlying Kalaaf permission, and retry.
  • 400 — read details: it names the invalid argument and the rule it broke. List endpoints reject limit outside 1–20 and offset outside 0–500.
  • 409 — fetch the current record and retry with fresh data.
  • 429 — back off for the Retry-After seconds, then resume at a lower rate.

Successful responses use an envelope with ok, data, and meta (which carries tool and requestId). Include the requestId from meta when reporting a problem — it identifies the exact request server-side.