{"errors":[{"code":"ERR_STORE_NOT_FOUND","status":404,"meaning":"Mermaid Chart could not find the project or diagram, or the key owner cannot read it. Not charged."},{"code":"ERR_STORE_FORBIDDEN","status":403,"meaning":"Stored diagrams require a personal key, or Mermaid Chart refused the operation for its owner. Not charged."},{"code":"ERR_STORE_LIMIT_REACHED","status":402,"meaning":"The Mermaid Chart Basic-tier stored-diagram cap was reached. Upgrade or remove diagrams. Not charged."},{"code":"ERR_STORE_UNAVAILABLE","status":503,"meaning":"Mermaid Chart is unavailable or the service credentials or scopes are misconfigured. Retry later; contact support if it persists. Not charged."},{"code":"ERR_REQUEST_NOT_FOUND","status":404,"meaning":"No endpoint at that path. Check the path against the OpenAPI document."},{"code":"ERR_REQUEST_METHOD_NOT_ALLOWED","status":405,"meaning":"The path exists but not for that method; the message names the methods it allows."},{"code":"ERR_REQUEST_MALFORMED","status":422,"meaning":"The request body is empty or not JSON. Send a JSON object."},{"code":"ERR_REQUEST_INVALID","status":422,"meaning":"The request body does not match the schema of the endpoint. Fix the fields the details name.","details":"An array of schema issues, each with a `path` (the field) and a `message`."},{"code":"ERR_REQUEST_TOO_LARGE","status":413,"meaning":"The request body exceeds the size limit. Send less diagram code or config."},{"code":"ERR_REQUEST_FORBIDDEN_CONFIG","status":422,"meaning":"The Mermaid config sets keys the service forbids. Remove every key the details name.","details":"`{ keys: string[] }`: the forbidden keys the config set."},{"code":"ERR_KEY_MISSING","status":401,"meaning":"No API key was presented. Send `Authorization: Bearer <key>`."},{"code":"ERR_KEY_UNKNOWN","status":401,"meaning":"No key with that prefix exists, or the secret is wrong. Check the key was copied whole."},{"code":"ERR_KEY_REVOKED","status":401,"meaning":"The key was revoked by its owner or a super admin. A super admin, or an admin of the organisation owning it, can restore it; otherwise create a new key in the console."},{"code":"ERR_KEY_EXPIRED","status":401,"meaning":"The key is past its expiry. Create a new key in the console."},{"code":"ERR_KEY_OWNER_DELETED","status":401,"meaning":"Mermaid Chart no longer knows the account or organisation owning the key. Nothing is charged and the key is kept: it works again, within 5 minutes, once Mermaid Chart knows its owner again."},{"code":"ERR_IDENTITY_MISSING","status":401,"meaning":"Console endpoints only: no Mermaid Chart token was forwarded. Not returned under `/v1`."},{"code":"ERR_IDENTITY_INVALID","status":401,"meaning":"Console endpoints only: Mermaid Chart rejected the forwarded token. Not returned under `/v1`."},{"code":"ERR_IDENTITY_UNAVAILABLE","status":503,"meaning":"Console endpoints only: Mermaid Chart could not be asked about the token; retry later."},{"code":"ERR_OWNER_UNKNOWN","status":404,"meaning":"Console endpoints only: the signed-in user has not registered as a key owner yet, is not a member of the organisation whose context was asked for, or a super admin named an owner that does not exist."},{"code":"ERR_OWNER_KEY_UNKNOWN","status":404,"meaning":"Console endpoints only: no key of the signed-in owner, or for a super admin no key at all, has that id."},{"code":"ERR_OWNER_FORBIDDEN","status":403,"meaning":"Console endpoints only: in an organisation's context, the signed-in user's organisation role does not allow the action: a viewer changes nothing, a member changes only the organisation keys they created, only an admin restores a revoked key, and only the billing admin buys API credits or changes auto top-up; outside an organisation context a key is not restored."},{"code":"ERR_CALL_CLASS_UNKNOWN","status":404,"meaning":"Console endpoints only: a super admin named a call class that does not exist."},{"code":"ERR_CALL_CLASS_EXISTS","status":409,"meaning":"Console endpoints only: a super admin created a call class under a name already taken."},{"code":"ERR_CALL_CLASS_IN_USE","status":409,"meaning":"Console endpoints only: a super admin deleted a call class an endpoint belongs to, or a route declares; it would leave that endpoint unpriced."},{"code":"ERR_CALL_CLASS_ENDPOINT_UNKNOWN","status":404,"meaning":"Console endpoints only: a super admin moved or reset an endpoint that is not a keyed endpoint."},{"code":"ERR_LIMIT_BURST","status":429,"meaning":"The key made more calls this minute than its burst limit. Wait `retry-after` seconds, then retry."},{"code":"ERR_LIMIT_BALANCE","status":402,"meaning":"The call costs more API credits than the key owner's balance holds across all their keys, the user's own on a personal key, the organisation's on an organisation key: what remains of the monthly allowance and of their purchased credits together, or of those purchased credits the owner's monthly spend limit still lets their keys spend. `retry-after`, when present, is the seconds until the allowance and the spend limit reset at the start of next month, UTC: always at the spend limit, and at the balance only when no purchased credits are left and the refilled allowance covers the call.","details":"`{ cause: \"balance\" | \"spend_limit\", ownerType: \"user\" | \"organisation\", remaining: number, purchasedRemaining: number, resetAt: string }`: `balance` when the balance cannot pay, `spend_limit` when purchased credits could but the spend limit forbids it; whose balance, the API credits left of this month's allowance, those left of unexpired purchases, and when the allowance resets."},{"code":"ERR_PAYMENT_SIGNATURE","status":400,"meaning":"Stripe's webhook only: the event's Stripe signature does not verify, so nothing was credited."},{"code":"ERR_PAYMENT_UNAVAILABLE","status":503,"meaning":"Payments are not configured on this service, or Stripe or Mermaid Chart could not be asked for a purchase; nothing was done. Try again later."},{"code":"ERR_PAYMENT_NO_BILLING_ADMIN","status":409,"meaning":"Console only: the organisation has no billing admin, nobody paying its Mermaid Chart subscription, so there is no Stripe customer to charge a purchase or an auto top-up to; nothing was done. Subscribe the organisation in Mermaid Chart first."},{"code":"ERR_PAYMENT_NO_PAYMENT_METHOD","status":409,"meaning":"Console only: auto top-up cannot be turned on because the owner's Stripe customer has no saved card to charge; auto top-up stays off. Save a card first."},{"code":"ERR_SERVICE_INTERNAL","status":500,"meaning":"The service failed. Retry; if it keeps happening, report the `x-request-id`."},{"code":"ERR_DIAGRAM_INVALID","status":400,"meaning":"Mermaid's parser rejected the diagram code; `message` is the parser's text. On render this is the status; on validate the same object is `error` inside a 200 with `valid: false`. Fix the code.","details":"`{ name: string, line?: number, column?: number }`: the error name and the 1-based position, when known."},{"code":"ERR_RENDER_TIMEOUT","status":504,"meaning":"The render exceeded the deadline. A retry may succeed; a simpler diagram will."},{"code":"ERR_RENDER_FORMAT_UNSUPPORTED","status":422,"meaning":"The diagram code is valid, but Mermaid cannot draw its diagram type in the asked format (ascii, where Mermaid 13's support grows with each alpha); nothing was charged. Render it as svg instead.","details":"`{ diagramType: string }`: the detected diagram type."},{"code":"ERR_RENDER_FAILED","status":500,"meaning":"The renderer failed on code the parser accepted, or could not be reached. Retry; if it keeps happening, report the `x-request-id`."},{"code":"ERR_AI_TIMEOUT","status":504,"meaning":"Mermaid AI did not answer within the deadline; nothing was charged. A retry may succeed."},{"code":"ERR_AI_FAILED","status":502,"meaning":"Mermaid AI failed, answered no usable diagram, or could not be reached; nothing was charged. Retry; if it keeps happening, report the `x-request-id`."}]}