Ir al contenido

Page folders

Esta página aún no está disponible en tu idioma.

Folders group top-level pages in the wiki or in one project. Create folders first when importing a tree, then file pages into them.

List the page folders of the wiki (omit projectId) or one project.

GET /v1/workspaces/{workspaceId}/page-folders

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

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.

Create a page folder (an imported wiki tree needs folders first — D18).

POST /v1/workspaces/{workspaceId}/page-folders

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

Response: the resulting object as JSON.

Rename a page folder or change its icon. Only pass the fields to change.

PATCH /v1/workspaces/{workspaceId}/page-folders/{folderId}

Terminal window
curl -X PATCH "https://api.dotby.app/v1/workspaces/acme/page-folders/FOLDER_ID" \
-H "Authorization: Bearer $DOTBY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"Platform work"}'

Response: the resulting object as JSON.

Archive a page folder (its pages fall back to the top level).

POST /v1/workspaces/{workspaceId}/page-folders/{folderId}/archive

Terminal window
curl -X POST "https://api.dotby.app/v1/workspaces/acme/page-folders/FOLDER_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.