API Reference/

Reference

Error Handling

All error responses follow a consistent JSON structure with an error code and a human-readable message. Use the error code for programmatic handling and the message for display purposes.

StatusMeaning
400Bad request
401Unauthorized
403Forbidden
404Not found
409Conflict
410Gone
429Rate limited
503Service unavailable

Error response format

JSON
{
  "error": "invalid_word",
  "message": "Word is not in the dictionary or does not use the correct letters."
}
The CLI API uses a flat error format with top-level error and message fields. The Word API uses a nested format: { error: { code, message } }. Game-specific codes use snake_case (e.g. invalid_word), while infrastructure codes use SCREAMING_SNAKE_CASE (e.g. RATE_LIMIT_EXCEEDED).

Common error codes

Error codeEndpoint
invalid_wordPOST guess
puzzle_in_progressGET reveal
no_hints_remainingPOST hint
puzzle_completePOST guess
expired_codePOST auth/poll
consumedPOST auth/poll
already_claimedPOST auth/complete
Always check the error field for programmatic handling. The message is human-readable and safe to show to users, but may change between API versions — don't match on it.
Was this page helpful?
Anagrama API Docs | Developer Reference