Publish a draft
const url = 'https://flow.work.optidata.cloud/api/categories/993/pages/2927/contents/4508/publish';const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://flow.work.optidata.cloud/api/categories/993/pages/2927/contents/4508/publish \ --header 'Authorization: Bearer <token>'Makes the draft {pageContent} the page’s published version: the page’s
status becomes published, page_content_id points to this version and
last_content_published_at is set. The caller must be able to edit the
page.
Publishing also notifies the members of the category, records the people mentioned in the text, and indexes the text for search; semantic search picks it up shortly after. A version can only be published once.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”Id of the category. Read it from GET /categories.
Id of a page of that category.
Id of a version of that page — a page’s page_content_id, or the id returned when saving a new draft.
Responses
Section titled “ Responses ”The page, now pointing to the published version.
A page right after one of its versions is published.
object
Id of the page this one is nested under, or null for a top-level page.
Id of the page’s author.
Short public identifier of the page.
The page’s current version — its published version once it has one.
published once a version has been published.
When a version was last published.
true for the category’s Overview page.
Sort position among its siblings.
The page’s own visibility as stored — null when it inherits the category’s.
A page’s own visibility. inherit follows the category; public shares
the page with anyone who has its link, whatever the category’s visibility.
Who can see a category. restricted: only the people and groups it is
shared with. internal: everyone in the company. public: anyone with the
link, including people who are not signed in.
Whether the page is reachable by anyone with its link.
Reserved. Always null for pages created through the API.
Not used — read last_content_published_at.
Set when the page is in the trash.
object
URL-friendly form of the name.
Who can see a category. restricted: only the people and groups it is
shared with. internal: everyone in the company. public: anyone with the
link, including people who are not signed in.
Shortcut for visibility == public.
Short public identifier of the category.
Id of the user who owns the category, when it has one.
Set when the category mirrors a group: it is shared with the group’s members, and its name and description follow the group’s.
Identifier of the company the category belongs to.
Set when the category is in the trash.
The author of a page.
object
Display preferences of the author.
Internal. Not meaningful to API clients.
A grant on the page to one user or group.
object
What the member may do with the page.
Kind of member — a user or a group.
The member, when loaded.
object
Examples
{ "id": 2927, "category_id": 993, "user_id": 20, "title": "Onboarding checklist", "type": "text", "meta": null, "created_at": "2026-10-19T13:50:45.000000Z", "updated_at": "2026-10-19T13:51:39.000000Z", "deleted_at": null, "parent_id": null, "position": 1451, "page_content_id": 4508, "status": "published", "published_at": null, "identifier": "dDbBQQtcKr", "is_cover": false, "visibility": null, "last_content_published_at": "2026-10-19T13:51:39.000000Z", "effective_visibility": "restricted", "display_visibility": "inherit", "is_public": false, "category": { "id": 993, "cuid": "7f3c2a10-5b8e-4d21-9c6a-0e4f1b2d3c4a", "name": "Onboarding", "slug": "onboarding", "description": "Everything a new hire needs in the first month.", "created_at": "2026-10-19T13:50:38.000000Z", "updated_at": "2026-10-19T13:50:38.000000Z", "deleted_at": null, "visibility": "restricted", "user_id": 20, "identifier": "jYpV3A", "group_id": null, "is_public": false }, "user": { "id": 20, "uuid": "2d9e8f70-1a3b-4c5d-8e9f-a0b1c2d3e4f5", "cuid": "7f3c2a10-5b8e-4d21-9c6a-0e4f1b2d3c4a", "username": "ana.souza@example.com", "email": "ana.souza@example.com", "name": "Ana Souza", "company_name": "Acme", "role": "user", "status": "active", "created_at": "2024-03-25T19:47:41.000000Z", "updated_at": "2026-09-16T17:25:41.000000Z", "deleted_at": null, "remember_token": null, "avatar_url": null, "settings": { "language": "en", "language_source": "company", "theme": "light", "timezone": null, "user_id": 214 } }, "permissions": [ { "id": 2045, "page_id": 2927, "actions": "manage", "created_at": "2026-10-19T13:50:45.000000Z", "updated_at": "2026-10-19T13:50:45.000000Z", "member_type": "App\\Models\\User", "member_id": 20 } ]}No authentication key was sent.
Authentication failures use an error key rather than message.
object
Examples
No bearer token sent
{ "error": "JWT passport exception: Missing bearer token in request"}The caller lacks the access this operation needs.
Generic error envelope used by permission, lookup and framework failures.
object
Examples
{ "message": "This action is unauthorized."}No such resource — or it does not belong to the category or page in the path.
Generic error envelope used by permission, lookup and framework failures.
object
Examples
{ "message": "No query results for model [App\\Models\\Page] 999999"}The version is already published.
A rule enforced by Papers itself — a version that can no longer change,
a special page. status repeats the HTTP status; help is a hint for
the end user and is often empty.
object
Examples
{ "error": "Page has been published already, unable to publish it again.", "status": 409, "help": ""}The authentication key is expired or not recognised. Get a fresh one and retry.
Authentication failures use an error key rather than message.
object
Examples
{ "error": "JWT passport expired: Passport expired"}