API errors are returned as JSON when the request includes Accept: application/json. The exact error fields can vary by failure type, but the HTTP status is the most reliable way to classify the result.
| Status | Meaning | Typical cause |
|---|---|---|
401 |
Unauthenticated | Missing, expired, malformed, or revoked token |
403 |
Forbidden | The authenticated user lacks the required permission |
404 |
Not found | The resource does not exist or is not visible to the user |
405 |
Method not allowed | The URL exists but does not support the HTTP method used |
422 |
Unprocessable entity | A request field is missing or invalid |
429 |
Too many requests | The authenticated user's rate limit was exceeded |
500 |
Server error | An unexpected server-side failure |
{
"message": "Unauthenticated."
}
Generate a new token from Profile > API, check that the Authorization header uses the Bearer scheme, and ensure the request uses https://.
Validation responses include the invalid fields. For example:
{
"message": "The given data was invalid.",
"errors": {
"name": [
"The name field is required."
]
}
}
The required fields and accepted values are listed on each endpoint page.
When a user exceeds the per-minute limit, the API returns 429. Stop sending requests, wait, and retry with backoff. Do not retry immediately in a tight loop.
If an API request returns an HTML page, check all of the following:
https://api.kanka.io/1.0.Accept: application/json.Authorization: Bearer YOUR_TOKEN.Content-Type: application/json.Browser address-bar navigation is not a substitute for an authenticated API request because it cannot send the required bearer header.
For further help, join Discord and include the endpoint, HTTP method, status code, and a redacted response. Never include your token.