disburse / docs

Errors

Every error, on the REST API and the MCP server alike, uses one JSON envelope with a stable, machine-readable code:

json
{ "error": { "code": "invalid_request", "message": "Malformed JSON body" } }

Branch on code, not on the human-readable message (which may change — though validation messages include a corrected example call where one helps).

Every response also carries an X-Request-ID header. Quote it when asking "what happened with this search?" — we keep a per-request record of how the query was interpreted, what was relaxed, what was excluded and why retrieval stopped, so support can answer from the log rather than guesswork.

Seeing 5xx responses or timeouts across the board rather than on one query? Check status.disburse.dev before digging into your own code — it reports the API, MCP, dashboard and website independently of our infrastructure, so it answers even during an outage.

Codes

CodeHTTPMeaning
invalid_request400Malformed body or invalid parameters
unauthorized401Missing, unknown, disabled, or exhausted key
unparseable_query422The natural-language query couldn't be understood
insufficient_credits402Your organization is out of credits
rate_limited429Too many requests, see Rate limits
no_data404The request was valid but matched nothing
not_found404Unknown route
method_not_allowed405Wrong HTTP method for the route
timeout504An upstream lookup exceeded its deadline
unavailable503A dependency was temporarily unreachable
internal500Unexpected server error

Retrying

  • rate_limited and timeout are transient; retry after a short backoff. rate_limited responses include a Retry-After header.
  • unavailable is also transient; back off and retry.
  • invalid_request, unauthorized, and unparseable_query are your side, fix the request rather than retrying it.
  • insufficient_credits clears the moment credits do: top up or upgrade on the dashboard's billing page, then retry. Verification endpoints are never gated.
  • no_data isn't a failure: the query was fine, there just wasn't a match.