SHADE is young: 0.1.0-next.2 is a pre-release, and 0.1.0 isn't out yet.

SHADE
Developers

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>.

MethodPathWhat
GET/api/v1/content/siteThe site: name, languages, settings, and what plugins add (navigation, footer, theme)
GET/api/v1/content/mediaMedia 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-sitesThe site parts of server packages (their site and shared sources), for the site build
GET/api/v1/content/searchFull-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/previewWhat a preview link shows: an entry's draft or a version set, in the published shapes

GET /api/v1/content/site

ParameterInRequiredValue
localequerynostring, at most 10 characters

GET /api/v1/content/media

ParameterInRequiredValue
localequerynostring, at most 10 characters
idsqueryyesstring

GET /api/v1/content/data/{name}

ParameterInRequiredValue
namepathyesstring
localequerynostring, at most 10 characters
pagequerynostring, at most 2000 characters
parametersquerynostring, at most 4000 characters, default "{}"

GET /api/v1/content/search

ParameterInRequiredValue
qqueryyesstring, at most 200 characters
langquerynostring, at most 10 characters
collectionsquerynostring, at most 500 characters
limitquerynointeger, 1–50, default 20
cursorquerynostring, at most 40 characters

GET /api/v1/content/collections/{slug}

ParameterInRequiredValue
slugpathyesstring
pagequerynointeger, default 1
perPagequerynointeger, 1–100, default 20
searchquerynostring, at most 200 characters
sortquerynostring, at most 50 characters
wherequerynostring, at most 4000 characters
depthquerynointeger, 0–2, default 0
localequerynostring, at most 10 characters

GET /api/v1/content/collections/{slug}/{idOrSlug}

ParameterInRequiredValue
slugpathyesstring
idOrSlugpathyesstring
localequerynostring, at most 10 characters

GET /api/v1/content/preview

ParameterInRequiredValue
tokenqueryyesstring, at most 4000 characters

Account

Called by visitors' browsers on the site; CORS allows the site's origin.

MethodPathWhat
GET/api/v1/account/sessionWho is signed in: a confirmed account's name and address, or null
POST/api/v1/account/sign-inSigns an account in with their address and password, and sets the session cookie
POST/api/v1/account/sign-upSigns an account up and sends the confirmation email; the same answer whether the address has an account or not
POST/api/v1/account/sign-outEnds the account's session
POST/api/v1/account/password-resetSends a link to choose a password; the same answer whether the address has an account or not
POST/api/v1/account/password-reset/confirmChooses a new password with the token from the reset email; confirms the address and ends every session
POST/api/v1/account/deleteDeletes 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/errorsReports a browser error from the site (no body, cookie or address is kept)
POST/api/v1/account/confirmConfirms an account's address with the token from the email and the account's password, and signs in
POST/api/v1/account/consent-receiptKeeps a consent choice as a receipt (a random id, the categories and whether each was allowed; no address or browser)
GET/api/v1/account/dataAn account's own data, as JSON
GET/api/v1/account/organisationsThe organisations the signed-in account belongs to, with their Membership in each
POST/api/v1/account/organisationsStarts 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}/keptWhat deleting the organisation takes with it, by kind (owners)
POST/api/v1/account/organisations/{id}/invitesInvites 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}/rolesThe roles per organisation an owner or manager may give there, and which members have them
POST/api/v1/account/organisations/{id}/rolesGives or takes a role per organisation to a member, as far as the Membership reaches (decision 0009)
GET/api/v1/account/linksThe page SHADE shows for a signed link: what it is for, with a button while it works (text/html)
POST/api/v1/account/linksUses a signed link from the page SHADE shows (its form), and shows the outcome (text/html)
POST/api/v1/account/links/peekWhat a signed link shows, without using it, for a page of a frontend
POST/api/v1/account/links/redeemUses 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}

ParameterInRequiredValue
tokenpathyesstring

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}

ParameterInRequiredValue
idpathyesstring

PATCH /api/v1/account/organisations/{id}

ParameterInRequiredValue
idpathyesstring

A JSON body is required: its schema is in the OpenAPI document.

DELETE /api/v1/account/organisations/{id}

ParameterInRequiredValue
idpathyesstring

GET /api/v1/account/organisations/{id}/kept

ParameterInRequiredValue
idpathyesstring

POST /api/v1/account/organisations/{id}/invites

ParameterInRequiredValue
idpathyesstring

A JSON body is required: its schema is in the OpenAPI document.

DELETE /api/v1/account/organisations/{id}/invites/{invite}

ParameterInRequiredValue
idpathyesstring
invitepathyesstring

PATCH /api/v1/account/organisations/{id}/members/{account}

ParameterInRequiredValue
idpathyesstring
accountpathyesstring

A JSON body is required: its schema is in the OpenAPI document.

DELETE /api/v1/account/organisations/{id}/members/{account}

ParameterInRequiredValue
idpathyesstring
accountpathyesstring

GET /api/v1/account/organisations/{id}/roles

ParameterInRequiredValue
idpathyesstring

POST /api/v1/account/organisations/{id}/roles

ParameterInRequiredValue
idpathyesstring

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.

MethodPathWhat
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}/publishPublishes an entry (write)
POST/api/v1/data/collections/{slug}/{id}/unpublishUnpublishes an entry (write)

GET /api/v1/data/collections/{slug}

ParameterInRequiredValue
slugpathyesstring
pagequerynointeger, default 1
perPagequerynointeger, 1–100, default 20
searchquerynostring, at most 200 characters
sortquerynostring, at most 50 characters
wherequerynostring, at most 4000 characters
statusquerynodraft, published, any, default "any"
depthquerynointeger, 0–2, default 0
idsquerynostring, at most 40000 characters

POST /api/v1/data/collections/{slug}

ParameterInRequiredValue
slugpathyesstring

A JSON body is required: its schema is in the OpenAPI document.

GET /api/v1/data/collections/{slug}/{id}

ParameterInRequiredValue
slugpathyesstring
idpathyesstring

PUT /api/v1/data/collections/{slug}/{id}

ParameterInRequiredValue
slugpathyesstring
idpathyesstring

A JSON body is required: its schema is in the OpenAPI document.

DELETE /api/v1/data/collections/{slug}/{id}

ParameterInRequiredValue
slugpathyesstring
idpathyesstring

POST /api/v1/data/collections/{slug}/{id}/publish

ParameterInRequiredValue
slugpathyesstring
idpathyesstring

A JSON body is required: its schema is in the OpenAPI document.

POST /api/v1/data/collections/{slug}/{id}/unpublish

ParameterInRequiredValue
slugpathyesstring
idpathyesstring