Docs
Generated from api/openapi.yaml (OpenAPI 3.1). Base URL: https://api.teemli.com. Auth: Authorization: Bearer <token or tml_ API key>. Errors are application/problem+json; writes accept an Idempotency-Key header.
Docs module (M9, product.md 7.18; Notion parity for everyday use). Every /docs/* route returns 404 while the
organisation’s docs switch is off (PUT /admin/settings {switches: {docs: true}}; data is kept).
Pages live in teamspaces (org / team / restricted) or a person’s private space. Roles view < comment < edit < full
(full = share, restrict, delete for good). A page’s access = the best grant on it and its ancestors up to the first
page that stops inheriting (inherit: false, “restricted”), plus the teamspace’s role when inheritance reaches the
top. Grants name a person (guests included), a team, an AI employee or the whole organisation (never guests).
Org admins get full access to org/team teamspaces, never to private spaces, restricted teamspaces or restricted
pages they aren’t in, and never inside agent turns. AI employees see only what they were invited to; a person’s own
agent sees what its person can. All enforced by RLS (teemli_doc_page_role). Page content is a Yjs document
(TipTap/ProseMirror schema in the XML fragment default) synced over /v1/docs/sync; every stored update needs
edit access (RLS on doc_updates). Agents’ edits are suggestions (/suggestions) unless an AI employee edits a
page that allows it (ai_edit_direct).
Live co-editing WebSocket (y-protocols). First TEXT message {type: auth, access_token, org_id, page_id} (resend {type: auth, access_token} to refresh). Server: TEXT {type: ready, role, user: {id, name, color}}, {type: role, role} when access changes, {type: read_only} when an update was refused; then BINARY sync (0: step1/step2/update) and awareness (1) messages. Access is checked on connect, every 15 s and on every update (stored as the sender under RLS before it is relayed). Presence names are set by the server. Closes 4401 (auth), 4403 (access revoked), 4404 (no access / module off)
Section titled “Live co-editing WebSocket (y-protocols). First TEXT message {type: auth, access_token, org_id, page_id} (resend {type: auth, access_token} to refresh). Server: TEXT {type: ready, role, user: {id, name, color}}, {type: role, role} when access changes, {type: read_only} when an update was refused; then BINARY sync (0: step1/step2/update) and awareness (1) messages. Access is checked on connect, every 15 s and on every update (stored as the sender under RLS before it is relayed). Presence names are set by the server. Closes 4401 (auth), 4403 (access revoked), 4404 (no access / module off)”GET /v1/docs/syncAPI keys: not available (needs a person signed in to the app).
Responses
101Switching protocols
The sidebar: your private space (created on first use), teamspaces you can open (with your role), favourites, recently visited, pages shared with you from spaces you can’t open
Section titled “The sidebar: your private space (created on first use), teamspaces you can open (with your role), favourites, recently visited, pages shared with you from spaces you can’t open”GET /v1/orgs/{org}/docs/homeAPI keys: needs the docs:read scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
Responses
200{private_space_id, spaces: [DocSpace], favorites: [PageSummary], recent: [PageSummary + visited_at], shared: [PageSummary], can_create_spaces}404Not found (also returned for rows the caller may not see, and for disabled features) — Problem
Create a teamspace (people, not guests or agents); you get full access
Section titled “Create a teamspace (people, not guests or agents); you get full access”POST /v1/orgs/{org}/docs/spacesAPI keys: needs the docs:write scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
Request body (JSON)
| Field | Type | Description |
|---|---|---|
name (required) |
string | |
icon |
string | |
description |
string | |
visibility |
org, team, restricted |
|
team_id |
string (uuid) | |
default_role |
view, comment, edit, full |
Responses
201DocSpace {id, kind, name, icon, description, visibility, team_id, default_role, position, role}422Invalid input — Problem
Change a teamspace (full access): name, icon, description, visibility, team_id, default_role, position, archived
Section titled “Change a teamspace (full access): name, icon, description, visibility, team_id, default_role, position, archived”PATCH /v1/orgs/{org}/docs/spaces/{id}API keys: needs the docs:write scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
id (required) |
path | string (uuid) | A Tasks object (project, section, field, item, comment, rule, form, view, attachment, notification or import). |
Responses
200DocSpace403Authenticated but not allowed (e.g. unverified email, not the agent’s controller, card routed to someone else) — Problem
Archive a teamspace (full access)
Section titled “Archive a teamspace (full access)”DELETE /v1/orgs/{org}/docs/spaces/{id}API keys: needs the docs:write scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
id (required) |
path | string (uuid) | A Tasks object (project, section, field, item, comment, rule, form, view, attachment, notification or import). |
Responses
200{archived: true}
The whole page tree of a space, flat (not database rows, templates or trashed pages), with your role per page
Section titled “The whole page tree of a space, flat (not database rows, templates or trashed pages), with your role per page”GET /v1/orgs/{org}/docs/spaces/{id}/pagesAPI keys: needs the docs:read scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
id (required) |
path | string (uuid) | A Tasks object (project, section, field, item, comment, rule, form, view, attachment, notification or import). |
Responses
200{items: [PageSummary + role]}
A teamspace and its explicit grants
Section titled “A teamspace and its explicit grants”GET /v1/orgs/{org}/docs/spaces/{id}/sharingAPI keys: needs the docs:read scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
id (required) |
path | string (uuid) | A Tasks object (project, section, field, item, comment, rule, form, view, attachment, notification or import). |
Responses
200{space, grants: [{id, principal, role}]}
Grant a person, team, AI employee or everyone access to a teamspace (full access)
Section titled “Grant a person, team, AI employee or everyone access to a teamspace (full access)”POST /v1/orgs/{org}/docs/spaces/{id}/grantsAPI keys: needs the docs:write scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
id (required) |
path | string (uuid) | A Tasks object (project, section, field, item, comment, rule, form, view, attachment, notification or import). |
Request body (JSON)
| Field | Type | Description |
|---|---|---|
person_id |
string (uuid) | |
team_id |
string (uuid) | |
agent_id |
string (uuid) | An AI employee |
whole_org |
boolean | |
email |
string | Someone outside the organisation becomes a guest (pages only) |
role |
view, comment, edit, full |
Responses
201{id}
Create a page, database (kind database: seeded with Name/Status/Assignee/Due/Tags and a Table view) or database row (in_database + parent_id = the database, props). Start from Markdown, a built-in template key or any page you can read (template_id). No space or parent = your private space. Needs edit access at the place
Section titled “Create a page, database (kind database: seeded with Name/Status/Assignee/Due/Tags and a Table view) or database row (in_database + parent_id = the database, props). Start from Markdown, a built-in template key or any page you can read (template_id). No space or parent = your private space. Needs edit access at the place”POST /v1/orgs/{org}/docs/pagesAPI keys: needs the docs:write scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
Request body (JSON)
| Field | Type | Description |
|---|---|---|
space_id |
string (uuid) | |
parent_id |
string (uuid) | |
title |
string | |
icon |
string | |
cover |
string | |
kind |
page, database |
|
in_database |
boolean | |
props |
object | |
is_template |
boolean | |
template |
string | |
template_id |
string (uuid) | |
markdown |
string | |
after_id |
string (uuid) |
Responses
201DocPage403Authenticated but not allowed (e.g. unverified email, not the agent’s controller, card routed to someone else) — Problem422Invalid input — Problem
A page (records a visit): summary + inherit, ai_edit_direct, full_width, props, db_schema (own, or the database’s for a row), database, breadcrumbs, space, role, favorite, created_by, edited_by, edited_via, counts {comments_open, suggestions_open, backlinks}, linked_tasks
Section titled “A page (records a visit): summary + inherit, ai_edit_direct, full_width, props, db_schema (own, or the database’s for a row), database, breadcrumbs, space, role, favorite, created_by, edited_by, edited_via, counts {comments_open, suggestions_open, backlinks}, linked_tasks”GET /v1/orgs/{org}/docs/pages/{id}API keys: needs the docs:read scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
id (required) |
path | string (uuid) | A Tasks object (project, section, field, item, comment, rule, form, view, attachment, notification or import). |
Responses
200DocPage404Not found (also returned for rows the caller may not see, and for disabled features) — Problem
Edit page metadata (edit access): title, icon (null clears), cover, full_width, props (rows; merged, null removes; validated against the schema), is_template; ai_edit_direct needs full access
Section titled “Edit page metadata (edit access): title, icon (null clears), cover, full_width, props (rows; merged, null removes; validated against the schema), is_template; ai_edit_direct needs full access”PATCH /v1/orgs/{org}/docs/pages/{id}API keys: needs the docs:write scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
id (required) |
path | string (uuid) | A Tasks object (project, section, field, item, comment, rule, form, view, attachment, notification or import). |
Responses
200DocPage
Delete for good (only from the trash; full access)
Section titled “Delete for good (only from the trash; full access)”DELETE /v1/orgs/{org}/docs/pages/{id}API keys: needs the docs:write scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
id (required) |
path | string (uuid) | A Tasks object (project, section, field, item, comment, rule, form, view, attachment, notification or import). |
Responses
200{deleted: true}409Conflicting state (card already answered, duplicate in flight, name taken) — Problem
Sub-pages (not rows)
Section titled “Sub-pages (not rows)”GET /v1/orgs/{org}/docs/pages/{id}/childrenAPI keys: needs the docs:read scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
id (required) |
path | string (uuid) | A Tasks object (project, section, field, item, comment, rule, form, view, attachment, notification or import). |
Responses
200{items: [PageSummary]}
Move / reorder (edit access here and at the destination; no cycles): {space_id?, parent_id? (null = top level), before_id? | after_id?}
Section titled “Move / reorder (edit access here and at the destination; no cycles): {space_id?, parent_id? (null = top level), before_id? | after_id?}”POST /v1/orgs/{org}/docs/pages/{id}/moveAPI keys: needs the docs:write scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
id (required) |
path | string (uuid) | A Tasks object (project, section, field, item, comment, rule, form, view, attachment, notification or import). |
Responses
200DocPage403Authenticated but not allowed (e.g. unverified email, not the agent’s controller, card routed to someone else) — Problem
Duplicate with content, sub-pages (and a database’s views and rows)
Section titled “Duplicate with content, sub-pages (and a database’s views and rows)”POST /v1/orgs/{org}/docs/pages/{id}/duplicateAPI keys: needs the docs:write scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
id (required) |
path | string (uuid) | A Tasks object (project, section, field, item, comment, rule, form, view, attachment, notification or import). |
Responses
201DocPage
Move a page and its sub-pages to the trash (edit access)
Section titled “Move a page and its sub-pages to the trash (edit access)”POST /v1/orgs/{org}/docs/pages/{id}/trashAPI keys: needs the docs:write scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
id (required) |
path | string (uuid) | A Tasks object (project, section, field, item, comment, rule, form, view, attachment, notification or import). |
Responses
200{trashed: true}
Restore from the trash (with what was trashed with it; to the top of its space if its parent is still in the trash)
Section titled “Restore from the trash (with what was trashed with it; to the top of its space if its parent is still in the trash)”POST /v1/orgs/{org}/docs/pages/{id}/restoreAPI keys: needs the docs:write scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
id (required) |
path | string (uuid) | A Tasks object (project, section, field, item, comment, rule, form, view, attachment, notification or import). |
Responses
200DocPage
Favourite / unfavourite {favorite}
Section titled “Favourite / unfavourite {favorite}”PUT /v1/orgs/{org}/docs/pages/{id}/favoriteAPI keys: needs the docs:write scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
id (required) |
path | string (uuid) | A Tasks object (project, section, field, item, comment, rule, form, view, attachment, notification or import). |
Responses
200{favorite}
Pages (you can see) that link to or mention this one
Section titled “Pages (you can see) that link to or mention this one”GET /v1/orgs/{org}/docs/pages/{id}/backlinksAPI keys: needs the docs:read scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
id (required) |
path | string (uuid) | A Tasks object (project, section, field, item, comment, rule, form, view, attachment, notification or import). |
Responses
200{items: [PageSummary]}
Who has access: your role, inherit, ai_edit_direct, the space, space_applies, grants on the page and inherited ones (inherited_from {id, title, kind: page|space})
Section titled “Who has access: your role, inherit, ai_edit_direct, the space, space_applies, grants on the page and inherited ones (inherited_from {id, title, kind: page|space})”GET /v1/orgs/{org}/docs/pages/{id}/sharingAPI keys: needs the docs:read scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
id (required) |
path | string (uuid) | A Tasks object (project, section, field, item, comment, rule, form, view, attachment, notification or import). |
Responses
200{role, inherit, ai_edit_direct, space, space_applies, grants: [{id, principal: {kind: person|team|agent|org, id, name, email?, is_guest?}, role, inherited_from}]}
Share (full access): a person, team, AI employee (only AI employees: your own agents already read what you can), everyone (not guests), or an email (a guest when the guests switch is on). Notifies the person
Section titled “Share (full access): a person, team, AI employee (only AI employees: your own agents already read what you can), everyone (not guests), or an email (a guest when the guests switch is on). Notifies the person”POST /v1/orgs/{org}/docs/pages/{id}/grantsAPI keys: needs the docs:write scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
id (required) |
path | string (uuid) | A Tasks object (project, section, field, item, comment, rule, form, view, attachment, notification or import). |
Request body (JSON)
| Field | Type | Description |
|---|---|---|
person_id |
string (uuid) | |
team_id |
string (uuid) | |
agent_id |
string (uuid) | An AI employee |
whole_org |
boolean | |
email |
string | Someone outside the organisation becomes a guest (pages only) |
role |
view, comment, edit, full |
Responses
201Sharing403Authenticated but not allowed (e.g. unverified email, not the agent’s controller, card routed to someone else) — Problem
Restrict (inherit false: keeps people granted on parent pages, drops the teamspace’s members, gives you full access) or inherit again (full access)
Section titled “Restrict (inherit false: keeps people granted on parent pages, drops the teamspace’s members, gives you full access) or inherit again (full access)”PUT /v1/orgs/{org}/docs/pages/{id}/inheritAPI keys: needs the docs:write scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
id (required) |
path | string (uuid) | A Tasks object (project, section, field, item, comment, rule, form, view, attachment, notification or import). |
Request body (JSON)
| Field | Type | Description |
|---|---|---|
inherit (required) |
boolean |
Responses
200Sharing
The page as Markdown and its top-level blocks with ids (agents, mobile)
Section titled “The page as Markdown and its top-level blocks with ids (agents, mobile)”GET /v1/orgs/{org}/docs/pages/{id}/contentAPI keys: needs the docs:read scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
id (required) |
path | string (uuid) | A Tasks object (project, section, field, item, comment, rule, form, view, attachment, notification or import). |
Responses
200{markdown, blocks: [{id, type, markdown}]}
Block edits applied on the server (edit access), relayed to live editors: replace | insert_after | insert_before | delete (block_id) | append, with Markdown
Section titled “Block edits applied on the server (edit access), relayed to live editors: replace | insert_after | insert_before | delete (block_id) | append, with Markdown”POST /v1/orgs/{org}/docs/pages/{id}/contentAPI keys: needs the docs:write scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
id (required) |
path | string (uuid) | A Tasks object (project, section, field, item, comment, rule, form, view, attachment, notification or import). |
Request body (JSON)
| Field | Type | Description |
|---|---|---|
ops (required) |
array of DocBlockOp |
Responses
200{markdown, blocks}403Authenticated but not allowed (e.g. unverified email, not the agent’s controller, card routed to someone else) — Problem422Invalid input — Problem
Export as Markdown (a database exports its rows as a table)
Section titled “Export as Markdown (a database exports its rows as a table)”GET /v1/orgs/{org}/docs/pages/{id}/export.mdAPI keys: needs the docs:read scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
id (required) |
path | string (uuid) | A Tasks object (project, section, field, item, comment, rule, form, view, attachment, notification or import). |
Responses
200text/markdown attachment
Export as PDF, laid out on the server (G2; same access as reading the page; a database as a table). Images and files are named, not embedded; characters the bundled Latin fonts can’t draw are left out (the web print view remains for those)
Section titled “Export as PDF, laid out on the server (G2; same access as reading the page; a database as a table). Images and files are named, not embedded; characters the bundled Latin fonts can’t draw are left out (the web print view remains for those)”GET /v1/orgs/{org}/docs/pages/{id}/export.pdfAPI keys: needs the docs:read scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
id (required) |
path | string (uuid) | A Tasks object (project, section, field, item, comment, rule, form, view, attachment, notification or import). |
Responses
200application/pdf attachment404Not found (also returned for rows the caller may not see, and for disabled features) — Problem
Page history: snapshots (auto every few minutes of editing and when editors leave, manual, restore, import, agent edits)
Section titled “Page history: snapshots (auto every few minutes of editing and when editors leave, manual, restore, import, agent edits)”GET /v1/orgs/{org}/docs/pages/{id}/versionsAPI keys: needs the docs:read scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
id (required) |
path | string (uuid) | A Tasks object (project, section, field, item, comment, rule, form, view, attachment, notification or import). |
Responses
200{items: [{id, kind: auto|manual|restore|import|agent|create, label, created_at, authors: [Actor], created_by, size}]}
Save a version now (edit access) {label?}
Section titled “Save a version now (edit access) {label?}”POST /v1/orgs/{org}/docs/pages/{id}/versionsAPI keys: needs the docs:write scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
id (required) |
path | string (uuid) | A Tasks object (project, section, field, item, comment, rule, form, view, attachment, notification or import). |
Responses
201{id}
Comments, flat (thread by parent_id)
Section titled “Comments, flat (thread by parent_id)”GET /v1/orgs/{org}/docs/pages/{id}/commentsAPI keys: needs the docs:read scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
id (required) |
path | string (uuid) | A Tasks object (project, section, field, item, comment, rule, form, view, attachment, notification or import). |
resolved |
query | open, resolved, all |
Responses
200{items: [{id, page_id, parent_id, block_id, anchor, quote, body, author, via, resolved_at, resolved_by, edited_at, created_at}]}
Comment (comment access): page-level, on a block (block_id), inline (anchor {start, end}: base64 Yjs relative positions, quote) or a reply (parent_id; reopens a resolved thread). Mentions @[Name](person|agent:ID) notify people who can see the page; an @mentioned AI employee with access answers in the thread
Section titled “Comment (comment access): page-level, on a block (block_id), inline (anchor {start, end}: base64 Yjs relative positions, quote) or a reply (parent_id; reopens a resolved thread). Mentions @[Name](person|agent:ID) notify people who can see the page; an @mentioned AI employee with access answers in the thread”POST /v1/orgs/{org}/docs/pages/{id}/commentsAPI keys: needs the docs:write scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
id (required) |
path | string (uuid) | A Tasks object (project, section, field, item, comment, rule, form, view, attachment, notification or import). |
resolved |
query | open, resolved, all |
Responses
201DocComment
Agents’ suggested edits
Section titled “Agents’ suggested edits”GET /v1/orgs/{org}/docs/pages/{id}/suggestionsAPI keys: needs the docs:read scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
id (required) |
path | string (uuid) | A Tasks object (project, section, field, item, comment, rule, form, view, attachment, notification or import). |
status |
query | open, all |
Responses
200{items: [{id, agent, person, label (“Maya via Scout (AI)” | “Riya (AI)”), summary, ops: [DocBlockOp + before], status: open|accepted|rejected|stale, created_at, decided_by, decided_at}]}
Upload an image or file to a page (edit access; raw body ≤ 25 MB; stored under the organisation’s prefix)
Section titled “Upload an image or file to a page (edit access; raw body ≤ 25 MB; stored under the organisation’s prefix)”POST /v1/orgs/{org}/docs/pages/{id}/filesAPI keys: needs the docs:write scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
id (required) |
path | string (uuid) | A Tasks object (project, section, field, item, comment, rule, form, view, attachment, notification or import). |
name |
query | string | |
mime |
query | string |
Request body: application/octet-stream.
Responses
201{id, name, size, mime, url}
Work items linked to the page
Section titled “Work items linked to the page”GET /v1/orgs/{org}/docs/pages/{id}/tasksAPI keys: needs the docs:read scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
id (required) |
path | string (uuid) | A Tasks object (project, section, field, item, comment, rule, form, view, attachment, notification or import). |
Responses
200{items: [{id, title, completed}]}
Link a work item {item_id} (you can see both and edit one)
Section titled “Link a work item {item_id} (you can see both and edit one)”POST /v1/orgs/{org}/docs/pages/{id}/tasksAPI keys: needs the docs:write scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
id (required) |
path | string (uuid) | A Tasks object (project, section, field, item, comment, rule, form, view, attachment, notification or import). |
Responses
201{linked: true}
Unlink a work item
Section titled “Unlink a work item”DELETE /v1/orgs/{org}/docs/pages/{id}/tasks/{item}API keys: needs the docs:write scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
id (required) |
path | string (uuid) | A Tasks object (project, section, field, item, comment, rule, form, view, attachment, notification or import). |
item (required) |
path | string (uuid) |
Responses
200{unlinked: true}
Pages linked to a work item (for the Tasks item pane)
Section titled “Pages linked to a work item (for the Tasks item pane)”GET /v1/orgs/{org}/docs/task-linksAPI keys: needs the docs:read scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
item_id (required) |
query | string (uuid) |
Responses
200{items: [PageSummary]}
Trashed pages you can see (the pages that were trashed, not their sub-pages)
Section titled “Trashed pages you can see (the pages that were trashed, not their sub-pages)”GET /v1/orgs/{org}/docs/trashAPI keys: needs the docs:read scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
q |
query | string |
Responses
200{items: [PageSummary + trashed_by, space_name, role]}
Titles and content (Postgres full-text with prefix matching + title trigram), only pages you can read
Section titled “Titles and content (Postgres full-text with prefix matching + title trigram), only pages you can read”GET /v1/orgs/{org}/docs/searchAPI keys: needs the docs:read scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
q |
query | string | |
space_id |
query | string (uuid) | |
limit |
query | integer | |
rows |
query | boolean |
Responses
200{items: [PageSummary + snippet (matches wrapped in \u0001…\u0002), path]}
@-mention picker: people and AI employees you can see, pages
Section titled “@-mention picker: people and AI employees you can see, pages”GET /v1/orgs/{org}/docs/mentionsAPI keys: needs the docs:read scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
q |
query | string |
Responses
200{people, agents, pages}
Built-in page/database templates and your organisation’s template pages
Section titled “Built-in page/database templates and your organisation’s template pages”GET /v1/orgs/{org}/docs/templatesAPI keys: needs the docs:read scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
Responses
200{builtin: [{key, name, icon, description, kind}], org: [PageSummary]}
Docs notifications: mentions, comments, replies, shares, agent suggestions
Section titled “Docs notifications: mentions, comments, replies, shares, agent suggestions”GET /v1/orgs/{org}/docs/inboxAPI keys: needs the docs:read scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
Responses
200{items: [{id, kind, doc_page_id, doc_comment_id, text, actor, page, read_at, created_at}], unread}
Mark all docs notifications read
Section titled “Mark all docs notifications read”POST /v1/orgs/{org}/docs/inbox/read-allAPI keys: needs the docs:write scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
Responses
200{read: true}
Mark one read
Section titled “Mark one read”POST /v1/orgs/{org}/docs/inbox/{id}/readAPI keys: needs the docs:write scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
id (required) |
path | string (uuid) | A Tasks object (project, section, field, item, comment, rule, form, view, attachment, notification or import). |
Responses
200{read: true}
Change a grant’s role {role} (full access)
Section titled “Change a grant’s role {role} (full access)”PATCH /v1/orgs/{org}/docs/grants/{id}API keys: needs the docs:write scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
id (required) |
path | string (uuid) | A Tasks object (project, section, field, item, comment, rule, form, view, attachment, notification or import). |
Responses
200{role}
Remove a grant (full access; anyone may remove their own)
Section titled “Remove a grant (full access; anyone may remove their own)”DELETE /v1/orgs/{org}/docs/grants/{id}API keys: needs the docs:write scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
id (required) |
path | string (uuid) | A Tasks object (project, section, field, item, comment, rule, form, view, attachment, notification or import). |
Responses
200{deleted: true}
A version’s full Yjs state (update v1) for a read-only preview
Section titled “A version’s full Yjs state (update v1) for a read-only preview”GET /v1/orgs/{org}/docs/versions/{id}/stateAPI keys: needs the docs:read scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
id (required) |
path | string (uuid) | A Tasks object (project, section, field, item, comment, rule, form, view, attachment, notification or import). |
Responses
200Yjs update
Restore a version (edit access): its content becomes the page’s (as a new edit, relayed live) and a restore version is saved
Section titled “Restore a version (edit access): its content becomes the page’s (as a new edit, relayed live) and a restore version is saved”POST /v1/orgs/{org}/docs/versions/{id}/restoreAPI keys: needs the docs:write scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
id (required) |
path | string (uuid) | A Tasks object (project, section, field, item, comment, rule, form, view, attachment, notification or import). |
Responses
200{restored: true, page_id}
Edit your comment’s body; resolve / reopen its thread (comment access)
Section titled “Edit your comment’s body; resolve / reopen its thread (comment access)”PATCH /v1/orgs/{org}/docs/comments/{id}API keys: needs the docs:write scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
id (required) |
path | string (uuid) | A Tasks object (project, section, field, item, comment, rule, form, view, attachment, notification or import). |
Responses
200DocComment
Delete (author, or full access)
Section titled “Delete (author, or full access)”DELETE /v1/orgs/{org}/docs/comments/{id}API keys: needs the docs:write scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
id (required) |
path | string (uuid) | A Tasks object (project, section, field, item, comment, rule, form, view, attachment, notification or import). |
Responses
200{deleted: true}
Accept (edit access): the edits are applied as you and relayed to live editors; stale if the blocks are gone
Section titled “Accept (edit access): the edits are applied as you and relayed to live editors; stale if the blocks are gone”POST /v1/orgs/{org}/docs/suggestions/{id}/acceptAPI keys: needs the docs:write scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
id (required) |
path | string (uuid) | A Tasks object (project, section, field, item, comment, rule, form, view, attachment, notification or import). |
Responses
200DocSuggestion409Conflicting state (card already answered, duplicate in flight, name taken) — Problem
Reject (edit access, or the person a personal agent suggested for)
Section titled “Reject (edit access, or the person a personal agent suggested for)”POST /v1/orgs/{org}/docs/suggestions/{id}/rejectAPI keys: needs the docs:write scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
id (required) |
path | string (uuid) | A Tasks object (project, section, field, item, comment, rule, form, view, attachment, notification or import). |
Responses
200DocSuggestion
Add a property (edit access): text, number, select, multi_select, status, date, person, checkbox, url, email, files, relation (relation_database_id), created_by, created_time, edited_by, edited_time
Section titled “Add a property (edit access): text, number, select, multi_select, status, date, person, checkbox, url, email, files, relation (relation_database_id), created_by, created_time, edited_by, edited_time”POST /v1/orgs/{org}/docs/databases/{id}/propertiesAPI keys: needs the docs:write scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
id (required) |
path | string (uuid) | A Tasks object (project, section, field, item, comment, rule, form, view, attachment, notification or import). |
Request body (JSON)
| Field | Type | Description |
|---|---|---|
name |
string | |
type |
string | |
options |
array of object | |
relation_database_id |
string (uuid) | |
number_format |
string |
Responses
201{schema}
Rename, change type (values that no longer fit are cleared) or options
Section titled “Rename, change type (values that no longer fit are cleared) or options”PATCH /v1/orgs/{org}/docs/databases/{id}/properties/{prop}API keys: needs the docs:write scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
id (required) |
path | string (uuid) | A Tasks object (project, section, field, item, comment, rule, form, view, attachment, notification or import). |
prop (required) |
path | string |
Responses
200{schema}
Delete a property and its values (not the title)
Section titled “Delete a property and its values (not the title)”DELETE /v1/orgs/{org}/docs/databases/{id}/properties/{prop}API keys: needs the docs:write scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
id (required) |
path | string (uuid) | A Tasks object (project, section, field, item, comment, rule, form, view, attachment, notification or import). |
prop (required) |
path | string |
Responses
200{schema}
Rows, filtered and sorted in SQL. Filters [{property, op: equals|not_equals|contains|not_contains|is_empty|is_not_empty|gt|lt|gte|lte|before|after|checked|unchecked, value}], filter_mode and|or, sorts [{property, direction}] (select/status by option order), q, limit ≤ 2000, templates
Section titled “Rows, filtered and sorted in SQL. Filters [{property, op: equals|not_equals|contains|not_contains|is_empty|is_not_empty|gt|lt|gte|lte|before|after|checked|unchecked, value}], filter_mode and|or, sorts [{property, direction}] (select/status by option order), q, limit ≤ 2000, templates”POST /v1/orgs/{org}/docs/databases/{id}/queryAPI keys: needs the docs:write scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
id (required) |
path | string (uuid) | A Tasks object (project, section, field, item, comment, rule, form, view, attachment, notification or import). |
Responses
200{items: [PageSummary + props, created_by, edited_by, created_at], schema, relations: {id: {title, icon}}, people: {id: {name}}}
A database’s views (shared by everyone who can see it)
Section titled “A database’s views (shared by everyone who can see it)”GET /v1/orgs/{org}/docs/databases/{id}/viewsAPI keys: needs the docs:read scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
id (required) |
path | string (uuid) | A Tasks object (project, section, field, item, comment, rule, form, view, attachment, notification or import). |
Responses
200{items: [{id, database_id, name, type: table|board|list|calendar|gallery, config, position}]}
Add a view (edit access): config {filters, filter_mode, sorts, group_by, date_property, visible, widths, cover}
Section titled “Add a view (edit access): config {filters, filter_mode, sorts, group_by, date_property, visible, widths, cover}”POST /v1/orgs/{org}/docs/databases/{id}/viewsAPI keys: needs the docs:write scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
id (required) |
path | string (uuid) | A Tasks object (project, section, field, item, comment, rule, form, view, attachment, notification or import). |
Responses
201DocView
Row templates (rows with is_template; create a row from one with template_id)
Section titled “Row templates (rows with is_template; create a row from one with template_id)”GET /v1/orgs/{org}/docs/databases/{id}/templatesAPI keys: needs the docs:read scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
id (required) |
path | string (uuid) | A Tasks object (project, section, field, item, comment, rule, form, view, attachment, notification or import). |
Responses
200{items}
Change a view: name, type, config, position
Section titled “Change a view: name, type, config, position”PATCH /v1/orgs/{org}/docs/views/{id}API keys: needs the docs:write scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
id (required) |
path | string (uuid) | A Tasks object (project, section, field, item, comment, rule, form, view, attachment, notification or import). |
Responses
200DocView
Delete a view (a database keeps at least one)
Section titled “Delete a view (a database keeps at least one)”DELETE /v1/orgs/{org}/docs/views/{id}API keys: needs the docs:write scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
id (required) |
path | string (uuid) | A Tasks object (project, section, field, item, comment, rule, form, view, attachment, notification or import). |
Responses
200{deleted: true}
Download (images, PDF, media inline; anything else as an attachment; nosniff)
Section titled “Download (images, PDF, media inline; anything else as an attachment; nosniff)”GET /v1/orgs/{org}/docs/files/{id}/contentAPI keys: needs the docs:read scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
id (required) |
path | string (uuid) | A Tasks object (project, section, field, item, comment, rule, form, view, attachment, notification or import). |
Responses
200File bytes
Bookmark preview of a public web page (SSRF-safe fetch): {url}
Section titled “Bookmark preview of a public web page (SSRF-safe fetch): {url}”POST /v1/orgs/{org}/docs/unfurlAPI keys: needs the docs:write scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
Responses
200{url, title, description, image, site}
Import Markdown files as pages {space_id?, parent_id?, files: [{name, markdown}]} (≤ 200 files; the first # heading becomes the title)
Section titled “Import Markdown files as pages {space_id?, parent_id?, files: [{name, markdown}]} (≤ 200 files; the first # heading becomes the title)”POST /v1/orgs/{org}/docs/import/markdownAPI keys: not available (needs a person signed in to the app).
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
Responses
201{pages: [PageSummary]}
Dry run of a Notion export (“Markdown & CSV” zip, raw body ≤ 200 MB; nested part zips are read too): what would be created
Section titled “Dry run of a Notion export (“Markdown & CSV” zip, raw body ≤ 200 MB; nested part zips are read too): what would be created”POST /v1/orgs/{org}/docs/import/notion/previewAPI keys: not available (needs a person signed in to the app).
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
Request body: application/zip.
Responses
200{pages, databases, rows, files, top_level: [{title, kind}], warnings}422Invalid input — Problem
Import: pages and sub-pages, databases with typed properties from the CSV, rows with values and their page bodies, images/files into storage, links between pages rewritten to the new pages
Section titled “Import: pages and sub-pages, databases with typed properties from the CSV, rows with values and their page bodies, images/files into storage, links between pages rewritten to the new pages”POST /v1/orgs/{org}/docs/import/notionAPI keys: not available (needs a person signed in to the app).
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
space_id |
query | string (uuid) | |
parent_id |
query | string (uuid) |
Request body: application/zip.
Responses
201{import_id, state: done, counts: {pages, databases, rows, files}, page_ids}
An import’s result
Section titled “An import’s result”GET /v1/orgs/{org}/docs/imports/{id}API keys: not available (needs a person signed in to the app).
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
id (required) |
path | string (uuid) | A Tasks object (project, section, field, item, comment, rule, form, view, attachment, notification or import). |
Responses
200{id, source, state, counts, page_ids, error}
Save ready meeting notes (summary, decisions, action items as to-dos, notes) as a Docs page {space_id?, parent_id?} (default: your private pages)
Section titled “Save ready meeting notes (summary, decisions, action items as to-dos, notes) as a Docs page {space_id?, parent_id?} (default: your private pages)”POST /v1/orgs/{org}/meetings/{id}/doc-pageAPI keys: not available (needs a person signed in to the app).
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
id (required) |
path | string (uuid) | A Tasks object (project, section, field, item, comment, rule, form, view, attachment, notification or import). |
Responses
201DocPage409Conflicting state (card already answered, duplicate in flight, name taken) — Problem