Skip to content

Overview

Categories, pages, versioned content and semantic search for the Optiwork suite.

The Optiwork Papers API covers the knowledge base of the Optiwork suite: the categories that group documents (shown as spaces in the Papers app), the pages inside them, the versioned content of each page and its publication, plus a semantic search that answers a question with the most relevant passages of published pages.

Base URL

All endpoints are served under the fixed Papers host: https://flow.work.optidata.cloud/api.

Authentication

Every endpoint requires a Bearer JWT passport. Your personal passport is available in Optiwork at https://work.optidata.cloud/user/settings/security (My account > Profile > Security), where it is shown as the authentication key. Send it on every request:

Authorization: Bearer opk_xxxxxxxxxxxxxxxxxxxxxxxx
Accept: application/json

A request without a key returns 401. A key that is expired or not recognised returns 419; get a fresh authentication key from the same settings page and retry.

Writing a page, end to end

  1. POST /categories creates a category (or pick one from GET /categories).
  2. POST /categories/{category}/pages creates a page. The response carries page_content_id: the page’s first, empty draft.
  3. POST /categories/{category}/pages/{page}/contents/{pageContent} saves the document into that draft. Repeat as often as you like.
  4. POST /categories/{category}/pages/{page}/contents/{pageContent}/publish turns the draft into the page’s published version. Members of the category are notified and the text becomes searchable.
  5. To revise a published page, save new content with draft: true: that creates a new draft (with a new id) from the published version, which you then save and publish the same way.

Conventions

  • Visibility. A category is restricted (only the people it is shared with), internal (everyone in the company) or public (anyone with the link, signed in or not). A page inherits its category’s visibility unless it is made public on its own; effective_visibility tells you the result.
  • Every category has one special Overview page (is_cover: true), created with it. It cannot be deleted and cannot have child pages.
  • Pages nest: a page created under another page records it as parent_id. Path parameters are checked as a chain — a page must belong to the category in the path, and a content entry to the page — otherwise the answer is 404.
  • Page content is a document in the Papers editor format: a JSON array of block nodes ({"type": "p", "children": [{"text": "…"}]}), sent and returned as a JSON-encoded string in data.
  • Deleting a category or a page moves it to the trash; it can still be read by id, with deleted_at set.
  • Timestamps are ISO-8601 in UTC (e.g. 2026-10-19T13:51:39.000000Z).
  • Validation failures return 422 with a per-field errors map. Rules the application enforces itself — a draft that is no longer editable, a version published twice — answer with an { "error", "status", "help" } envelope. Messages are written in the caller’s language.

The authentication key (JWT passport) from My account > Profile > Security at work.optidata.cloud/user/settings/security.

Security scheme type: http

Bearer format: JWT