List or search doc pages

GET/api/v1/docs

Workspace-visible doc pages without their bodies. With q it searches title and text and returns up to 50 matches; otherwise it returns the tree order (use parentId to walk one level) or the 50 most recently edited pages. Pages inside restricted subtrees are never returned to a key.

Query parameters

ParameterTypeDescription
qstringCase-insensitive match on the title or text.
parentIdstringChildren of this page, in order. Pass root for top-level pages.

Example request

curl "https://crowdstack.org/api/v1/docs?q=onboarding" \
  -H "Authorization: Bearer $CROWDSTACK_API_KEY"

Example response

{
  "pages": [
    {
      "id": "cmf3k2x9a0150abcd",
      "title": "Onboarding checklist",
      "icon": "✅",
      "parentId": null,
      "position": 0,
      "visibility": "workspace",
      "archivedAt": null,
      "lastEditedBy": {
        "id": "cmf3k2x9a0003abcd",
        "name": "Jane Doe",
        "email": "jane@acme-mail.com"
      },
      "createdAt": "2026-09-01T09:00:00.000Z",
      "updatedAt": "2026-09-15T10:12:00.000Z"
    }
  ]
}

Get a doc page

GET/api/v1/docs/:id

One page with its text, its breadcrumb up the tree, and its direct children.

Responses

StatusMeaning
404No visible page with that id.

Example request

curl "https://crowdstack.org/api/v1/docs/cmf3k2x9a0001abcd" \
  -H "Authorization: Bearer $CROWDSTACK_API_KEY"

Example response

{
  "page": {
    "id": "cmf3k2x9a0150abcd",
    "title": "Onboarding checklist",
    "icon": "✅",
    "parentId": null,
    "position": 0,
    "visibility": "workspace",
    "archivedAt": null,
    "lastEditedBy": {
      "id": "cmf3k2x9a0003abcd",
      "name": "Jane Doe",
      "email": "jane@acme-mail.com"
    },
    "createdAt": "2026-09-01T09:00:00.000Z",
    "updatedAt": "2026-09-15T10:12:00.000Z",
    "text": "1. Create the workspace\n2. Invite the team",
    "breadcrumb": [],
    "children": []
  }
}

Create a doc page

POST/api/v1/docs

Creates a page from plain text, at the top level or under a visible parent. Blank lines separate paragraphs. The page inherits its parent's access; a top-level page takes the workspace's default visibility.

Request body

FieldTypeDescription
titlestringDefaults to the first line of the text.
textstringPlain text body. Default "".
parentIdstring | null
iconstring | nullA single emoji.

Responses

StatusMeaning
201Body: { page }.
404The parent page is not visible.

Example request

curl -X POST https://crowdstack.org/api/v1/docs \
  -H "Authorization: Bearer $CROWDSTACK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Onboarding checklist",
    "text": "1. Create the workspace\n\n2. Invite the team"
  }'

Example response

{
  "page": {
    "id": "cmf3k2x9a0150abcd",
    "title": "Onboarding checklist",
    "icon": "✅",
    "parentId": null,
    "position": 0,
    "visibility": "workspace",
    "archivedAt": null,
    "lastEditedBy": {
      "id": "cmf3k2x9a0003abcd",
      "name": "Jane Doe",
      "email": "jane@acme-mail.com"
    },
    "createdAt": "2026-09-01T09:00:00.000Z",
    "updatedAt": "2026-09-15T10:12:00.000Z",
    "text": "1. Create the workspace\n2. Invite the team"
  }
}

Update a doc page

PATCH/api/v1/docs/:id

Rename a page, change its icon, or replace its whole body with new plain text. A new body discards rich formatting and mentions the page had. Only keys you send are changed.

Request body

FieldTypeDescription
titlestring
textstringReplaces the entire body.
iconstring | null

Responses

StatusMeaning
200Body: { page }.
404No visible page with that id.

Example request

curl -X PATCH https://crowdstack.org/api/v1/docs/cmf3k2x9a0001abcd \
  -H "Authorization: Bearer $CROWDSTACK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Onboarding checklist (2026)"
  }'

Example response

{
  "page": {
    "id": "cmf3k2x9a0150abcd",
    "title": "Onboarding checklist (2026)",
    "icon": "✅",
    "parentId": null,
    "position": 0,
    "visibility": "workspace",
    "archivedAt": null,
    "lastEditedBy": {
      "id": "cmf3k2x9a0003abcd",
      "name": "Jane Doe",
      "email": "jane@acme-mail.com"
    },
    "createdAt": "2026-09-01T09:00:00.000Z",
    "updatedAt": "2026-09-15T10:12:00.000Z",
    "text": "1. Create the workspace\n2. Invite the team"
  }
}

Archive a doc page

DELETE/api/v1/docs/:id

Archives a page and everything under it. Archived pages can be restored from the app until the workspace's retention window ends.

Responses

StatusMeaning
200Body: { archived: true }.
404No visible page with that id.

Example request

curl -X DELETE https://crowdstack.org/api/v1/docs/cmf3k2x9a0001abcd \
  -H "Authorization: Bearer $CROWDSTACK_API_KEY"

Example response

{
  "archived": true
}