# Every /api/public operation lists its error codes in the OpenAPI document

- Date: 2026-10-25
- Type: New
- Surface: /api/public, Developer portal and CLI
- What you need to do: Nothing.
- Address: https://developers.rivr.io/changelog/2026-10-25-api-public-spec-error-codes

The OpenAPI document of /api/public, at /openapi/api-public.json and from the MCP tool get_openapi, now has `x-rivr-error-codes` on every operation that has error codes: an object from error code to HTTP status, in alphabetical order. A client generator, a linter or an AI agent can read from the document alone which codes an operation can answer with, and each code has a page under Error codes. The lists are read from the error catalog, the same source as the codes under each response in the reference, so the two cannot disagree. They include the codes that only the sandbox has for now (see Every error answer in /api/public carries code and type), and not the codes the organisation-key check in front of /api/public answers with, such as key_invalid, because the error catalog does not tie those to an operation. Two open probes, getHealth and getClientIp, have none. The document the API itself publishes has no such lists: the portal adds them when it reads the document in, and the copy that is compared with the sandbox is not changed.

