Documentation

Errors

Standard HTTP status codes and consistent error response shapes to help you identify and resolve issues quickly.

HTTP status codes

StatusLabelWhen it happens
400Bad RequestThe request was malformed or missing required parameters.
401UnauthorizedMissing or invalid API key.
403ForbiddenValid API key, but insufficient permissions for the requested resource.
404Not FoundThe requested resource could not be found.
429Too Many RequestsRate limit exceeded. Slow down your requests.
500Server ErrorAn unexpected error occurred on the server.

Error response shape

Errors include an error message and a machine-readable code.

json — error.json
error.json
{
  "error": "Invalid game parameter. Must be one of: magic-the-gathering, mtg, pokemon, yugioh, age-of-sigmar, warhammer-40000, union-arena, flesh-and-blood-tcg, disney-lorcana, digimon-card-game, one-piece-card-game",
  "code": "INVALID_REQUEST"
}

Error codes

CodeDescription
MISSING_API_KEYThe API key is missing from the request.
INVALID_API_KEYThe API key provided is invalid or has been revoked.
INVALID_REQUESTA required parameter is missing or invalid. Check the error message for details.
RATE_LIMIT_EXCEEDEDYou have exceeded your per-minute rate limit. Slow down or upgrade your plan.
DAILY_LIMIT_EXCEEDEDYou have exceeded your daily usage limit. Wait until reset (00:00 UTC) or upgrade.
REQUEST_LIMIT_EXCEEDEDYou have exceeded your monthly usage limit. Wait for the next billing cycle or upgrade.
Pro tip:Implement retry logic with exponential backoff for transient server errors (500) and rate limiting (429).