API reference
Every route of SHADE's versioned API, generated from its OpenAPI document. The document itself is
/openapi.json on this site: load it into any OpenAPI tool to try the routes or generate a client.
It describes core's routes; an instance serves its own at /api/v1/openapi.json, with the routes of the plugins
it has switched on. How tokens, errors and versions work is on the API page.
Content
Read published content. Needs a read token: Authorization: Bearer <token>.
| Method | Path | What |
|---|---|---|
| GET | /api/v1/content/site | The site: name, languages, settings, and what plugins add (navigation, footer, theme) |
| GET | /api/v1/content/media | Media items by id, with their sizes and alt text |
| GET | /api/v1/content/data/{name} | Items of a data source for a loop on a page, and how to show their fields |
| GET | /api/v1/content/module-sites | The site parts of server packages (their site and shared sources), for the site build |
| GET | /api/v1/content/search | Full-text search over published entries of collections with a public API, with highlights |
| GET | /api/v1/content/collections/{slug} | Published entries of a collection with a public API |
| GET | /api/v1/content/collections/{slug}/{idOrSlug} | One published entry by id or slug |
| GET | /api/v1/content/preview | What a preview link shows: an entry's draft or a version set, in the published shapes |
GET /api/v1/content/site
| Parameter | In | Required | Value |
|---|---|---|---|
locale | query | no | string, at most 10 characters |
GET /api/v1/content/media
| Parameter | In | Required | Value |
|---|---|---|---|
locale | query | no | string, at most 10 characters |
ids | query | yes | string |
GET /api/v1/content/data/{name}
| Parameter | In | Required | Value |
|---|---|---|---|
name | path | yes | string |
locale | query | no | string, at most 10 characters |
page | query | no | string, at most 2000 characters |
parameters | query | no | string, at most 4000 characters, default "{}" |
GET /api/v1/content/search
| Parameter | In | Required | Value |
|---|---|---|---|
q | query | yes | string, at most 200 characters |
lang | query | no | string, at most 10 characters |
collections | query | no | string, at most 500 characters |
limit | query | no | integer, 1–50, default 20 |
cursor | query | no | string, at most 40 characters |
GET /api/v1/content/collections/{slug}
| Parameter | In | Required | Value |
|---|---|---|---|
slug | path | yes | string |
page | query | no | integer, default 1 |
perPage | query | no | integer, 1–100, default 20 |
search | query | no | string, at most 200 characters |
sort | query | no | string, at most 50 characters |
where | query | no | string, at most 4000 characters |
depth | query | no | integer, 0–2, default 0 |
locale | query | no | string, at most 10 characters |
GET /api/v1/content/collections/{slug}/{idOrSlug}
| Parameter | In | Required | Value |
|---|---|---|---|
slug | path | yes | string |
idOrSlug | path | yes | string |
locale | query | no | string, at most 10 characters |
GET /api/v1/content/preview
| Parameter | In | Required | Value |
|---|---|---|---|
token | query | yes | string, at most 4000 characters |
Account
Called by visitors' browsers on the site; CORS allows the site's origin.
| Method | Path | What |
|---|---|---|
| GET | /api/v1/account/session | Who is signed in: a confirmed account's name and address, or null |
| POST | /api/v1/account/sign-in | Signs an account in with their address and password, and sets the session cookie |
| POST | /api/v1/account/sign-up | Signs an account up and sends the confirmation email; the same answer whether the address has an account or not |
| POST | /api/v1/account/sign-out | Ends the account's session |
| POST | /api/v1/account/password-reset | Sends a link to choose a password; the same answer whether the address has an account or not |
| POST | /api/v1/account/password-reset/confirm | Chooses a new password with the token from the reset email; confirms the address and ends every session |
| POST | /api/v1/account/delete | Deletes the signed-in account's own account, with the password |
| POST | /api/v1/account/email/events/{token} | Brevo's webhook for bounces and complaints; a hint SHADE confirms with Brevo |
| POST | /api/v1/account/errors | Reports a browser error from the site (no body, cookie or address is kept) |
| POST | /api/v1/account/confirm | Confirms an account's address with the token from the email and the account's password, and signs in |
| POST | /api/v1/account/consent-receipt | Keeps a consent choice as a receipt (a random id, the categories and whether each was allowed; no address or browser) |
| GET | /api/v1/account/data | An account's own data, as JSON |
| GET | /api/v1/account/organisations | The organisations the signed-in account belongs to, with their Membership in each |
| POST | /api/v1/account/organisations | Starts an organisation with the signed-in account as its owner, where the team allows it |
| GET | /api/v1/account/organisations/{id} | One of the signed-in account's organisations: its members, and its invitations for owners and managers |
| PATCH | /api/v1/account/organisations/{id} | Renames the organisation (owners) |
| DELETE | /api/v1/account/organisations/{id} | Deletes the organisation for good, with what it owns (owners) |
| GET | /api/v1/account/organisations/{id}/kept | What deleting the organisation takes with it, by kind (owners) |
| POST | /api/v1/account/organisations/{id}/invites | Invites an address by email for 7 days (owners any Membership, managers members); the same answer whether it has an account or not |
| DELETE | /api/v1/account/organisations/{id}/invites/{invite} | Withdraws an invitation |
| PATCH | /api/v1/account/organisations/{id}/members/{account} | Changes a member's Membership (owners); the last owner keeps theirs |
| DELETE | /api/v1/account/organisations/{id}/members/{account} | Removes a member (owners anyone, managers members), or leaves with one's own id; the last owner can't |
| GET | /api/v1/account/organisations/{id}/roles | The roles per organisation an owner or manager may give there, and which members have them |
| POST | /api/v1/account/organisations/{id}/roles | Gives or takes a role per organisation to a member, as far as the Membership reaches (decision 0009) |
| GET | /api/v1/account/links | The page SHADE shows for a signed link: what it is for, with a button while it works (text/html) |
| POST | /api/v1/account/links | Uses a signed link from the page SHADE shows (its form), and shows the outcome (text/html) |
| POST | /api/v1/account/links/peek | What a signed link shows, without using it, for a page of a frontend |
| POST | /api/v1/account/links/redeem | Uses a signed link from a page of a frontend, with the option chosen, and answers what it shows then |
POST /api/v1/account/sign-in
A JSON body is required: its schema is in the OpenAPI document.
POST /api/v1/account/sign-up
A JSON body is required: its schema is in the OpenAPI document.
POST /api/v1/account/password-reset
A JSON body is required: its schema is in the OpenAPI document.
POST /api/v1/account/password-reset/confirm
A JSON body is required: its schema is in the OpenAPI document.
POST /api/v1/account/delete
A JSON body is required: its schema is in the OpenAPI document.
POST /api/v1/account/email/events/{token}
| Parameter | In | Required | Value |
|---|---|---|---|
token | path | yes | string |
A JSON body is required: its schema is in the OpenAPI document.
POST /api/v1/account/errors
A JSON body is required: its schema is in the OpenAPI document.
POST /api/v1/account/confirm
A JSON body is required: its schema is in the OpenAPI document.
POST /api/v1/account/consent-receipt
A JSON body is required: its schema is in the OpenAPI document.
POST /api/v1/account/organisations
A JSON body is required: its schema is in the OpenAPI document.
GET /api/v1/account/organisations/{id}
| Parameter | In | Required | Value |
|---|---|---|---|
id | path | yes | string |
PATCH /api/v1/account/organisations/{id}
| Parameter | In | Required | Value |
|---|---|---|---|
id | path | yes | string |
A JSON body is required: its schema is in the OpenAPI document.
DELETE /api/v1/account/organisations/{id}
| Parameter | In | Required | Value |
|---|---|---|---|
id | path | yes | string |
GET /api/v1/account/organisations/{id}/kept
| Parameter | In | Required | Value |
|---|---|---|---|
id | path | yes | string |
POST /api/v1/account/organisations/{id}/invites
| Parameter | In | Required | Value |
|---|---|---|---|
id | path | yes | string |
A JSON body is required: its schema is in the OpenAPI document.
DELETE /api/v1/account/organisations/{id}/invites/{invite}
| Parameter | In | Required | Value |
|---|---|---|---|
id | path | yes | string |
invite | path | yes | string |
PATCH /api/v1/account/organisations/{id}/members/{account}
| Parameter | In | Required | Value |
|---|---|---|---|
id | path | yes | string |
account | path | yes | string |
A JSON body is required: its schema is in the OpenAPI document.
DELETE /api/v1/account/organisations/{id}/members/{account}
| Parameter | In | Required | Value |
|---|---|---|---|
id | path | yes | string |
account | path | yes | string |
GET /api/v1/account/organisations/{id}/roles
| Parameter | In | Required | Value |
|---|---|---|---|
id | path | yes | string |
POST /api/v1/account/organisations/{id}/roles
| Parameter | In | Required | Value |
|---|---|---|---|
id | path | yes | string |
A JSON body is required: its schema is in the OpenAPI document.
POST /api/v1/account/links
A JSON body is required: its schema is in the OpenAPI document.
POST /api/v1/account/links/peek
A JSON body is required: its schema is in the OpenAPI document.
POST /api/v1/account/links/redeem
A JSON body is required: its schema is in the OpenAPI document.
Data
Manage collections from other systems (decision 0016). Needs a data token: Authorization: Bearer <token>; it reaches only the collections it was given, read or write.
| Method | Path | What |
|---|---|---|
| GET | /api/v1/data/collections/{slug} | Entries of a collection, drafts included |
| POST | /api/v1/data/collections/{slug} | Creates an entry (write) |
| GET | /api/v1/data/collections/{slug}/{id} | One entry with its latest version |
| PUT | /api/v1/data/collections/{slug}/{id} | Saves an entry (write) |
| DELETE | /api/v1/data/collections/{slug}/{id} | Deletes an entry (write) |
| POST | /api/v1/data/collections/{slug}/{id}/publish | Publishes an entry (write) |
| POST | /api/v1/data/collections/{slug}/{id}/unpublish | Unpublishes an entry (write) |
GET /api/v1/data/collections/{slug}
| Parameter | In | Required | Value |
|---|---|---|---|
slug | path | yes | string |
page | query | no | integer, default 1 |
perPage | query | no | integer, 1–100, default 20 |
search | query | no | string, at most 200 characters |
sort | query | no | string, at most 50 characters |
where | query | no | string, at most 4000 characters |
status | query | no | draft, published, any, default "any" |
depth | query | no | integer, 0–2, default 0 |
ids | query | no | string, at most 40000 characters |
POST /api/v1/data/collections/{slug}
| Parameter | In | Required | Value |
|---|---|---|---|
slug | path | yes | string |
A JSON body is required: its schema is in the OpenAPI document.
GET /api/v1/data/collections/{slug}/{id}
| Parameter | In | Required | Value |
|---|---|---|---|
slug | path | yes | string |
id | path | yes | string |
PUT /api/v1/data/collections/{slug}/{id}
| Parameter | In | Required | Value |
|---|---|---|---|
slug | path | yes | string |
id | path | yes | string |
A JSON body is required: its schema is in the OpenAPI document.
DELETE /api/v1/data/collections/{slug}/{id}
| Parameter | In | Required | Value |
|---|---|---|---|
slug | path | yes | string |
id | path | yes | string |
POST /api/v1/data/collections/{slug}/{id}/publish
| Parameter | In | Required | Value |
|---|---|---|---|
slug | path | yes | string |
id | path | yes | string |
A JSON body is required: its schema is in the OpenAPI document.
POST /api/v1/data/collections/{slug}/{id}/unpublish
| Parameter | In | Required | Value |
|---|---|---|---|
slug | path | yes | string |
id | path | yes | string |