For the complete list of HTTP statuses, see Errors.
If an API request returns HTML instead of JSON, check the following:
https://api.kanka.io/1.0.Accept: application/json.Authorization: Bearer YOUR_TOKEN.Content-Type: application/json.The browser address bar cannot send the required bearer header. Use an API client such as curl, Postman, or application code.
If the token is missing, invalid, expired, or malformed, the API returns 401:
{
"message": "Unauthenticated."
}
Generate a new token from Profile > API. Check that the token is copied completely and that the request uses Authorization: Bearer YOUR_TOKEN.
Tokens expire after 365 days. Revoke a token from the same page if it has been exposed.
POST, PUT, and PATCH requests return 422 when required fields are missing or invalid. The response identifies the fields that need attention:
{
"message": "The given data was invalid.",
"errors": {
"name": [
"The name field is required."
]
}
}
Rate limits are applied per authenticated user. All tokens belonging to the same user share the limit. The current limit is returned by /profile as rate_limit.
The default is 30 requests per minute and subscribers receive 90. When the limit is exceeded, the API returns 429. Wait and retry with backoff rather than sending requests in a tight loop.
For other issues, join Discord and ask in #development-talk. Include the HTTP method, endpoint, status code, request body with secrets removed, and response body. Never include your API token.