Get a page
Returns the rendered HTML, table of contents and metadata of a published page.
GET
/api/public/{project}/pages/{slug}Retrieve a published page
Authentication: bearer – Only required for private or password-protected projects.
Path parameters
| Name | Type | Description |
|---|---|---|
project required | string | Project slug |
slug required | string | Page slug |
Query parameters
| Name | Type | Description |
|---|---|---|
format | string | "json" (default) or "html" |
Responses
200 The page
{
"slug": "welcome",
"title": "Welcome to Docubara",
"toc": [{ "id": "what-you-can-build", "text": "What you can build", "level": 2 }],
"html": "<p>…</p>",
"next": { "slug": "installation", "title": "Installation" }
}404 Page not found or not published
No response body.
Examples
curl -X GET "https://api.example.com/api/public/{project}/pages/{slug}" \
-H "Authorization: Bearer $TOKEN"const res = await fetch("https://api.example.com/api/public/{project}/pages/{slug}", {
method: "GET",
headers: {
Authorization: `Bearer ${token}`,
},
});
const data = await res.json();Add ?format=html to receive only the rendered HTML fragment.