DocumentationAPI v1
Documentation/Guides/Errors
GuideFree

Errors

Every refusal says what went wrong and what to do.

A refusal is JSON with an error object: a code to branch on, a message written for a person, and a request_id. Some add detail, such as the parameters an endpoint accepts or the plan that reaches it.

{
  "error": {
    "code": "upgrade_required",
    "message": "/v1/ratings is on every paid plan, from Live at $39 a month. You are on Free key.",
    "needs": "Live",
    "your_plan": "Free key",
    "pricing": "https://dartsapi.com/pricing",
    "request_id": "req_2c81f0a94e7b1d63"
  }
}
StatusCodeWhat it means
400bad_idAn id of the wrong type, such as a match id given as a player.
401no_key, bad_key, unknown_keyThe key is missing, malformed or not ours. See Authentication.
402upgrade_requiredYour plan does not reach this endpoint. The message names the plan that does.
402outside_windowThe endpoint is yours, but the date asked for is outside your plan's window.
404not_found, no_such_endpointNo such record, or no such path. A path close to a real one gets suggestions.
405wrong_methodA GET endpoint called with POST, or the other way round.
422bad_parameter, unknown_parameter, missing_parameterA parameter is malformed, not one the endpoint takes, or required and absent. The message names it.
429rate_limited, allowance_usedOver the minute, or the day's or month's allowance is used. Retry-After says when. See Rate limits.
503archive_unavailable, ratings_buildingSomething at our end is briefly unavailable. Retry shortly; it never counts against you.