Skip to content

Get a page version

GET
/categories/{category}/pages/{page}/contents/{pageContent}
curl --request GET \
--url https://flow.work.optidata.cloud/api/categories/993/pages/2927/contents/4508 \
--header 'Authorization: Bearer <token>'

Returns one version of a page — a draft or a published version — with its document in data. The caller must be able to view the page.

Reading the page’s current published version marks the page as read for the caller.

category
required
integer

Id of the category. Read it from GET /categories.

page
required
integer

Id of a page of that category.

pageContent
required
integer

Id of a version of that page — a page’s page_content_id, or the id returned when saving a new draft.

The page version.

Media typeapplication/json

A page version with its document.

object
id
required
integer
page_id
required
integer
user_id

Id of the user who started this version.

integer
name

Optional label of the version.

string | null
status
required
string
Allowed values: draft published
created_at
string format: date-time
updated_at
string format: date-time
deleted_at
string | null format: date-time
data
required

The document, as a JSON-encoded array of editor block nodes. An empty string for a draft nobody has written into yet.

string
Examples
{
"id": 4508,
"page_id": 2927,
"user_id": 20,
"name": null,
"status": "published",
"data": "[{\"type\":\"h1\",\"children\":[{\"text\":\"Onboarding checklist\"}]},{\"type\":\"p\",\"children\":[{\"text\":\"Request a laptop and set up your Optiwork account on day one. Read the security handbook and enable two-factor authentication.\"}]}]",
"created_at": "2026-10-19T13:50:45.000000Z",
"updated_at": "2026-10-19T13:51:39.000000Z",
"deleted_at": null
}

No authentication key was sent.

Media typeapplication/json

Authentication failures use an error key rather than message.

object
error
required
string
Examples
Examplemissing

No bearer token sent

{
"error": "JWT passport exception: Missing bearer token in request"
}

The caller lacks the access this operation needs.

Media typeapplication/json

Generic error envelope used by permission, lookup and framework failures.

object
message
required
string
Examples
Exampledenied
{
"message": "This action is unauthorized."
}

No such resource — or it does not belong to the category or page in the path.

Media typeapplication/json

Generic error envelope used by permission, lookup and framework failures.

object
message
required
string
Examples
Examplemissing
{
"message": "No query results for model [App\\Models\\Page] 999999"
}

The authentication key is expired or not recognised. Get a fresh one and retry.

Media typeapplication/json

Authentication failures use an error key rather than message.

object
error
required
string
Examples
Exampleexpired
{
"error": "JWT passport expired: Passport expired"
}