Appearance
Project API
Where to start. GET /project is the one call that needs nothing but a token: it answers which project the token belongs to, which languages that project publishes in, where its page tree begins, which publishing workflow a writer has to follow, and what the token itself may do. Everything else in the API takes a uuid, and this is where the first one comes from.
Get the Project
Endpoint: GET /api/v1/project
Requires no ability. The root inside it is a document and needs document.read (or the bare read); without one it is null.
bash
curl -X GET "https://admin.flatnode.net/api/v1/project" \
-H "Authorization: Bearer your-token-here"Response: 200 OK
json
{
"message": "OK",
"data": {
"title": "Nordlys Observatory",
"locales": ["en", "nb", "de"],
"defaultLocale": "en",
"root": {
"_uuid": "550e8400-e29b-41d4-a716-446655440000",
"title": "Nordlys Observatory",
"slug": "nordlys-observatory",
"published": true,
"type": "document",
"parent": null,
"permissions": "664",
"group": "project",
"revealAt": null,
"concealAt": null,
"createdAt": "2026-11-08T09:12:44+00:00",
"updatedAt": "2026-11-08T09:12:44+00:00",
"treeLeft": 1,
"treeRight": 24,
"treeLevel": 0
},
"workflow": {
"requireApproval": false,
"allowSelfApproval": false
},
"token": {
"abilities": ["document.read", "content.create", "content.update", "content.publish"]
}
}
}locales is every language the project publishes in, default first, and defaultLocale is the one content falls back to - the language an untranslated version is in. A project that has never configured languages still has one. Pass any of them as ?locale= to GET /document/{uuid}; anything else is a 422. See Translations for how a render resolves a language block by block.
root is the project's root document, in the shape every document endpoint answers (see Create a Document). Hand its _uuid to GET /tree/{uuid} to walk the page tree down, or to GET /document/{uuid} to render the home page. It is null on a project with no documents yet, and for a caller whose token may not read the root - a hidden node looks absent, here as everywhere.
There is no identifier on the project itself. It has no uuid, and the token already names it: one token belongs to exactly one project.
Before you write
workflow and token are there so an integration that writes content can refuse to start, instead of failing at its first promote after it has created components, a document and a draft.
workflow is the project's publishing policy, named the way the project settings screen names it. With requireApproval on, a draft cannot be promoted: POST /content/{uuid}/promote answers 422 and the version has to go through submit and approve first. With allowSelfApproval off, whoever submitted a version may not approve it. Both together mean a single token can never make anything live on its own, however many abilities it holds.
token.abilities is what the token holds, from the vocabulary under Token Abilities. A bare verb stands for every resource: a token holding publish satisfies an endpoint that asks for content.publish. The browser's own session token answers for the signed-in person's project role.
So a script that intends to publish checks, in this order:
content.publishorpublishis intoken.abilities; otherwise stop and ask for a token that has it.workflow.requireApprovalisfalse; or it istrue,workflow.allowSelfApprovalistrue, and the token also holdscontent.approveorapprove, so it can submit, approve and promote itself.- Otherwise a second identity has to approve. Stop and say so, naming "Require approval before publishing" under Project settings as the switch.
A refusal still names its cause when a script skips the check: the 403 for a missing ability says which one, and the 422 from promote names the setting.
A build step, end to end
A static site needs three things from the API before it renders a page, and this is the order to ask for them:
bash
# 1. The project: languages and the root.
curl "https://admin.flatnode.net/api/v1/project" -H "Authorization: Bearer your-token-here"
# 2. The page tree, from the root's _uuid down. Direct children only;
# recurse where (treeRight - treeLeft) > 1, skip where published is false.
curl "https://admin.flatnode.net/api/v1/tree/550e8400-e29b-41d4-a716-446655440000" \
-H "Authorization: Bearer your-token-here"
# 3. Each page, in each locale.
curl "https://admin.flatnode.net/api/v1/document/660e8400-e29b-41d4-a716-446655440001?locale=nb&richtext=html" \
-H "Authorization: Bearer your-token-here"Or skip the walk: GET /document lists every page with its slug, path, parent and tree position in one response, and the root is the row whose parent is null.
Every row's path is the page's address from the root - about/team - so a static site uses it as the route and never joins slugs itself; the root's is "". The other way round, GET /document/by-path?path=about/team renders the page behind a URL, which is what a server-rendered or preview route calls.