Errors

Errors use standard HTTP status codes and a consistent JSON body.

Error body
Every non-2xx response includes an error string. Some include details with per-field validation.
{
  "error": "Invalid API key"
}
{
  "error": "Invalid body",
  "details": {
    "country": ["country must be a 2-letter ISO code"]
  }
}
Status codes
Common HTTP statuses you might see.
CodeNameWhat to do
200OKRequest succeeded.
201CreatedResource was created.
400Bad RequestThe request body or query is malformed. Inspect `details` for the offending fields.
401UnauthorizedThe API key is missing, invalid, revoked, or expired. Generate a new key from the dashboard.
403ForbiddenThe key is valid but lacks permission for this resource (e.g. attempting to access another customer's data).
404Not FoundThe resource does not exist or has been deleted.
409ConflictThe resource already exists (e.g. duplicate email).
429Too Many RequestsYou exceeded the rate limit. Back off and retry — see the Rate limits page.
500Internal Server ErrorSomething went wrong on our side. Retry with exponential backoff; if it persists, contact support.
Handle API errors
axios
try {
  const { data } = await api.get("/fx-rates");
  return data.data;
} catch (err) {
  if (axios.isAxiosError(err) && err.response) {
    const { status, data } = err.response;
    console.error(`API error ${status}:`, data.error);
    if (data.details) console.error("Fields:", data.details);
  }
  throw err;
}