Status codes the API returns and the shape every error response follows.
| Code | Meaning | When it happens |
|---|---|---|
| 200 | OK | Successful GET request. |
| 401 | Unauthorized | Missing, malformed, or invalid Authorization header. Token not found in the database. |
| 403 | Forbidden | Token is valid but the server's Mokito Premium subscription is expired or inactive. |
| 404 | Not Found | The requested resource was not found in this server. |
| 415 | Unsupported Media Type | Request body has a Content-Type other than application/json. |
| 422 | Unprocessable Entity | Validation failed (e.g. mutually exclusive parameters both provided, or a required parameter missing). |
| 429 | Too Many Requests | Rate limit exceeded. The token is temporarily banned (15–30 minutes). |
| 500 | Internal Server Error | Unexpected server error. Retry with exponential backoff. |
All error responses use a consistent JSON envelope with a top-level message field:
{
"message": "A human-readable description of the error."
}
Validation errors (422) include an errors object with field-specific messages:
{
"message": "The given data was invalid.",
"errors": {
"discord_id": [
"Provide either discord_id or steam_id, not both."
]
}
}