# API reference The full, searchable reference is the Integration page of the running app (`/integration`). It renders `web/src/data/apiCatalogue.ts`, which is the single source for this page. This file is for readers without the UI. ## Base URL The origin that serves the app, for example `https://cms.example`. Every path starts with `/v1`, for example `https://cms.example/v1/article/`. ## Authentication - Public routes need nothing: `GET /v1/article/` and `GET /v1/article/{id}`. They return online articles only. - Everything else needs a signed-in browser session (the `jwt` cookie) or an API key: `Authorization: Bearer rcms_...`. Create keys at `/integration/api-keys`. A key acts as its creator, with that user's role, and shows in full once. - A key cannot call `POST /v1/auth/verify`, `DELETE /v1/auth/register`, `/v1/api-key/*` or `/v1/system/*`. Those answer 403 "This action needs a real session." An invalid, unknown, expired or revoked key answers 401, even on public routes. - Each key can make 120 requests per minute. Beyond that: 429 with a `Retry-After` header. ## Routes a key can call (20) | Group | Routes | | --- | --- | | Articles | GET /v1/article/, GET /v1/article/{id}, POST /v1/article/, PATCH /v1/article/{id}, PATCH /v1/article/{id}/publish, PATCH /v1/article/{id}/unpublish, DELETE /v1/article/{id} | | Media | GET /v1/media/, POST /v1/media/, PATCH /v1/media/{id}, DELETE /v1/media/{id}, POST /v1/media/merge, GET /v1/media/{id}/usage | | Users and invites | GET /v1/user/, PATCH /v1/user/me, POST /v1/user/invite (owner only), DELETE /v1/user/invite/{id} (owner only), POST /v1/user/invite/{id}/renew (owner only), GET /v1/auth/me | | Settings | GET /v1/settings | Article routes accept `?format=markdown|html|json` (default `markdown`). `GET /v1/media/` accepts `q`, `hash`, `cursor`, `filter`, `sort` and `limit`. ## Errors Every error is a plain-text body with one sentence; the status is in the HTTP status line. The statuses are 400, 401, 403, 404, 409, 429 and 500. Messages are listed on the Integration page. ## Notes - Images in `body` use paths like `/static/uploadedImages/.png`. Prefix them with the base URL. - Browsers can call the API only from origins in the server's CORS setting.