Aller au contenu

Pages

Ce contenu n’est pas encore disponible dans votre langue.

Pages form the workspace wiki (omit projectId) or a project’s docs (pass projectId). Page bodies accept PLAIN TEXT — each line becomes a paragraph — so you never have to build TipTap JSON.

List the page tree: the workspace wiki when projectId is omitted, or one project’s pages. Returns nested nodes with ids, titles, and folder grouping.

GET /v1/workspaces/{workspaceId}/pages

Terminal window
curl -H "Authorization: Bearer $DOTBY_TOKEN" \
"https://api.dotby.app/v1/workspaces/acme/pages"

Response: the resulting object as JSON.

Create a page in the workspace wiki (omit projectId) or in a project. Optional parent page nests it; body starts empty — write it with update_page_body.

POST /v1/workspaces/{workspaceId}/pages

Terminal window
curl -X POST "https://api.dotby.app/v1/workspaces/acme/pages" \
-H "Authorization: Bearer $DOTBY_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"projectId":"ENG"}'

Response: the resulting object as JSON.

Get one page: title, TipTap-JSON body, plain-text bodyText, folder, parent, and metadata.

GET /v1/workspaces/{workspaceId}/pages/{pageId}

Terminal window
curl -H "Authorization: Bearer $DOTBY_TOKEN" \
"https://api.dotby.app/v1/workspaces/acme/pages/PAGE_ID"

Response: the resulting object as JSON.

Rename a page.

PATCH /v1/workspaces/{workspaceId}/pages/{pageId}

Terminal window
curl -X PATCH "https://api.dotby.app/v1/workspaces/acme/pages/PAGE_ID" \
-H "Authorization: Bearer $DOTBY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"title":"Ship the onboarding flow"}'

Response: the resulting object as JSON.

Full-text search pages by title/content across the wiki or one project.

GET /v1/workspaces/{workspaceId}/pages/search

Terminal window
curl -H "Authorization: Bearer $DOTBY_TOKEN" \
"https://api.dotby.app/v1/workspaces/acme/pages/search?query=onboarding"

Response: a list envelope { data, has_more, next_cursor }. While has_more is true, pass next_cursor back as cursor to get the next page.

Replace a page’s body. Accepts PLAIN TEXT (each line becomes a paragraph) or a full TipTap JSON document string — plain text is ramped server-side (Spec 81 D18), so agents never have to build TipTap JSON.

PATCH /v1/workspaces/{workspaceId}/pages/{pageId}/body

Terminal window
curl -X PATCH "https://api.dotby.app/v1/workspaces/acme/pages/PAGE_ID/body" \
-H "Authorization: Bearer $DOTBY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"body":"Plain text content."}'

Response: the resulting object as JSON.

Move a page in the tree: under a new parent (or top level when omitted), after a sibling.

POST /v1/workspaces/{workspaceId}/pages/{pageId}/move

Terminal window
curl -X POST "https://api.dotby.app/v1/workspaces/acme/pages/PAGE_ID/move" \
-H "Authorization: Bearer $DOTBY_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"parentPageId":"PAGE_ID"}'

Response: the resulting object as JSON.

File a top-level page into a folder, or omit folderId to move it out of any folder.

PATCH /v1/workspaces/{workspaceId}/pages/{pageId}/folder

Terminal window
curl -X PATCH "https://api.dotby.app/v1/workspaces/acme/pages/PAGE_ID/folder" \
-H "Authorization: Bearer $DOTBY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"folderId":"FOLDER_ID"}'

Response: the resulting object as JSON.

Archive a page (and its subtree). Reversible in the app; never a hard delete.

POST /v1/workspaces/{workspaceId}/pages/{pageId}/archive

Terminal window
curl -X POST "https://api.dotby.app/v1/workspaces/acme/pages/PAGE_ID/archive" \
-H "Authorization: Bearer $DOTBY_TOKEN" \
-H "Idempotency-Key: $(uuidgen)"

Response: the resulting object as JSON.

Every error is an RFC 9457 application/problem+json body with a machine-stable code. Branch on the code, not the message:

  • 401unauthenticated / invalid_token: the bearer token is missing, expired, or revoked. Re-authenticate; do not retry as-is.
  • 403insufficient_scope / forbidden / upgrade_required: the token works but may not do this. upgrade_required means the workspace is not on Pro.
  • 404not_found_or_forbidden: the resource does not exist for this token. Never probe for existence.
  • 409idempotency_conflict: same Idempotency-Key, different body. Mint a new key.
  • 429rate_limited: back off for the number of seconds in Retry-After, then retry.
  • 400validation_failed: the request shape is wrong. Fix the request; retrying unchanged will fail again.