Rolyx API openapi.json

Errors

Every error is JSON with the same shape:

{
  "error": {
    "code": "bad_request",
    "message": "Unknown field: `colour`."
  }
}

code is stable: branch on it. message is for people and may change. Errors never carry database text or stack traces.

An unknown path, a wrong method, a missing resource and a resource the token can't see all answer the same 404 not_found, so the API never confirms that something you can't read exists.

Codes

StatusCodeWhen
400bad_requestBad input: unknown field, wrong type, too long.
401unauthorizedMissing, malformed, expired or revoked token.
403insufficient_scopeThe token lacks the scope this endpoint needs.
404not_foundNo such resource, or the token cannot see it.
413payload_too_largeBody over 16 KB.
415unsupported_media_typeBody is not application/json.
429rate_limitedRate limited; see retry-after.
500internalInternal error.
502upstream_errorThe database failed.
503unavailableThe API is not set up on this server.
507storage_fullStorage limit reached: the account is over its sync quota.

Retrying

Retry 429 after the retry-after seconds, and 502 / 503 with backoff. Don't retry 4xx otherwise: the same request will fail the same way.