Kuma for developers Early access API reference Manage keys

Limits & errors

Rate limits

LimitRequests
Per key120 a minute
Per server, all its keys together300 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

LimitDefaultHighest a server can set
Coins per day100,00010,000,000
XP per day50,0001,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
{
  "error": {
    "code": "missing_scope",
    "message": "This key doesn't have the \"cases:read\" scope.",
    "request_id": "req_6d1f0a2b9c3e4f51",
    "scope": "cases:read"
  }
}
CodeMeaning
unauthorizedNo key, or a key Kuma doesn't recognise (401).
key_revokedThe key was revoked (401).
wrong_serverThe server in the path isn't the key's server (403).
api_unavailableThe developer API isn't available on this server yet (403).
missing_scopeThe key wasn't given the scope this endpoint needs (403).
scope_unavailableThe key's creator no longer has the permission behind the scope (403).
key_creator_lost_accessThe key's creator can no longer use the developer API on the server, so the key is paused (403).
feature_disabledThe server has the Kuma feature behind this data switched off (403).
not_foundNo such endpoint or object (404).
invalid_parameterA path or query parameter is malformed or out of range (400).
invalid_cursorThe cursor wasn't a next_cursor from this list (400).
invalid_bodyThe JSON body is missing, malformed, too large or has a bad field (400, or 413 for size).
idempotency_key_requiredA write was sent without an Idempotency-Key header (400).
idempotency_conflictThat Idempotency-Key was already used for a different request (409).
daily_limit_reachedThe key has used today's limit for this kind of write; see retry_after (429).
user_not_allowedKuma doesn't act for that user (403).
rate_limitedToo many requests; wait Retry-After seconds (429).
temporarily_unavailableKuma couldn't check the key's permissions just now; retry shortly (503).
internal_errorSomething 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).