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 status | Code | Meaning |
|---|---|---|
| 400 | AI_TOOL_INVALID_ARGUMENTS, VALIDATION_ERROR | The request body or query failed validation |
| 401 | — | Missing, expired, or revoked API key, or the key's creator lost workspace access |
| 403 | AI_TOOL_FORBIDDEN, SCOPE_INSUFFICIENT | The key lacks the scope, or the creator lacks the underlying permission |
| 404 | AI_TOOL_NOT_FOUND, NOT_FOUND | Unknown endpoint or record |
| 409 | REVISION_CONFLICT | The record changed since it was read; re-read and retry |
| 429 | RATE_LIMITED | Rate 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— readdetails: it names the invalid argument and the rule it broke. List endpoints rejectlimitoutside 1–20 andoffsetoutside 0–500.409— fetch the current record and retry with fresh data.429— back off for theRetry-Afterseconds, 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.