Limits & errors
Rate limits
| Limit | Requests |
|---|---|
| Per key | 120 a minute |
| Per server, all its keys together | 300 a minute |
Every answer carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset (seconds until the window resets). Over the limit you get 429 with Retry-After: wait that long, then carry on.
Reading never slows Kuma down in your server: the API answers from Kuma's own records, never from Stoat, Discord or Fluxer.
Daily write limits
| Limit | Default | Highest a server can set |
|---|---|---|
| Coins per day | 100,000 | 10,000,000 |
| XP per day | 50,000 | 1,000,000 |
Per key, per UTC day; removals count. Going over answers 429 daily_limit_reached with retry_after (seconds until midnight UTC).
Pagination
Lists answer { "data": [...], "next_cursor": "…" }. Pass next_cursor as cursor for the next page; it's null on the last. limit is 1 to 100 (25 by default). Treat cursors as opaque. Case lists never repeat or skip a case. Leaderboards follow the live board, so a member whose score changes while you page through can appear twice (they dropped below where you are) or not at all (they rose above it): de-duplicate by user id, and for an exact once-each pass (a reward run, say), read the board quickly or re-read the members you need with the single-member endpoints.
Errors
Every error has the same shape. Match on code, never on message (that's for people and may change).
{
"error": {
"code": "missing_scope",
"message": "This key doesn't have the \"cases:read\" scope.",
"request_id": "req_6d1f0a2b9c3e4f51",
"scope": "cases:read"
}
}| Code | Meaning |
|---|---|
unauthorized | No key, or a key Kuma doesn't recognise (401). |
key_revoked | The key was revoked (401). |
wrong_server | The server in the path isn't the key's server (403). |
api_unavailable | The developer API isn't available on this server yet (403). |
missing_scope | The key wasn't given the scope this endpoint needs (403). |
scope_unavailable | The key's creator no longer has the permission behind the scope (403). |
key_creator_lost_access | The key's creator can no longer use the developer API on the server, so the key is paused (403). |
feature_disabled | The server has the Kuma feature behind this data switched off (403). |
not_found | No such endpoint or object (404). |
invalid_parameter | A path or query parameter is malformed or out of range (400). |
invalid_cursor | The cursor wasn't a next_cursor from this list (400). |
invalid_body | The JSON body is missing, malformed, too large or has a bad field (400, or 413 for size). |
idempotency_key_required | A write was sent without an Idempotency-Key header (400). |
idempotency_conflict | That Idempotency-Key was already used for a different request (409). |
daily_limit_reached | The key has used today's limit for this kind of write; see retry_after (429). |
user_not_allowed | Kuma doesn't act for that user (403). |
rate_limited | Too many requests; wait Retry-After seconds (429). |
temporarily_unavailable | Kuma couldn't check the key's permissions just now; retry shortly (503). |
internal_error | Something failed on Kuma's side; quote request_id if you report it (500). |
If you report a problem, include the request_id (also sent as the X-Request-Id header).