Skip to main content
Errors use the same envelope as successful responses, with an optional details object.
Always branch on the HTTP status code, not the message text. Messages may change.

Status codes

Recovering from each

Check the key is sent in one of the accepted headers and copied in full. If it was revoked in the dashboard, create a new one under Settings > API Keys.
Your key is bound to one guild. Make sure the :guildId in the path (or the X-Guild-ID header) matches the guild the key was created for.
For lookups, the user is not verified in that guild. For unban or unmute, there is no active punishment to lift. Neither is necessarily an error in your code.
Wait for the number of seconds in the Retry-After header, then retry. Cache and batch to avoid hitting the limit again.
Retry with exponential backoff. If it persists, report it in the support server.

Validation errors

A 400 from a write endpoint usually names the missing or invalid field in message, for example: