Browse the docs

API reference

Pages

The workspace's documents, read as flat blocks and edited one block at a time.

List pages

GET/v1/pages

Up to 60 pages, most recently edited first, each with a short excerpt. Archived pages are excluded.

Requires pages.read

Request
curl "https://atrix.dev/api/v1/pages" \
  -H "Authorization: Bearer $ATRIX_TOKEN"
Response
{
  "items": [
    {
      "id": "cm9p0q1r20005gh67ij89kl01",
      "title": "Pricing decision",
      "icon": null,
      "excerpt": "We charge per mailbox because…",
      "project": "Atrix Mail",
      "at": "2026-10-22T10:00:00.000Z"
    }
  ]
}

Create a page

POST/v1/pages

Writes a page from a title and plain text. Blank lines split the text into paragraphs and a leading # makes a heading.

Requires pages.write

Body

  • titlestringrequired

    The page title.

  • textstring

    The body as plain text.

Request
curl -X POST "https://atrix.dev/api/v1/pages" \
  -H "Authorization: Bearer $ATRIX_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "title": "…" }'
Response
{
  "id": "cm9p0q1r20005gh67ij89kl01"
}

Get a page

GET/v1/pages/{id}

One page as flat blocks (empty lines included), with its sub-pages, backlinks and comment threads. Lossy on purpose: marks and embeds are dropped, so url links to the full document; database pages carry database, rows carry row.

Requires pages.read

Path parameters

  • idstringrequired

    The page id.

Request
curl "https://atrix.dev/api/v1/pages/ID" \
  -H "Authorization: Bearer $ATRIX_TOKEN"
Response
{
  "id": "cm9p0q1r20005gh67ij89kl01",
  "title": "Pricing decision",
  "icon": null,
  "project": "Atrix Mail",
  "at": "2026-10-22T10:00:00.000Z",
  "url": "https://atrix.dev/dashboard/pages/cm9p0q1r20005gh67ij89kl01",
  "locked": false,
  "isTemplate": false,
  "parent": null,
  "subPages": [
    {
      "id": "cm9p1q2r30006gh67ij89kl01",
      "title": "Competitor prices",
      "icon": null
    }
  ],
  "linkedFrom": [
    {
      "id": "cm9p2q3r40007gh67ij89kl01",
      "title": "Q4 plan",
      "icon": null
    }
  ],
  "comments": [
    {
      "id": "cm9k1l2m30016ab12cd34ef56",
      "author": "Sara Khan",
      "body": "Agreed.",
      "quote": "per mailbox",
      "resolved": false,
      "at": "2026-10-23T11:00:00.000Z",
      "replies": []
    }
  ],
  "database": null,
  "row": null,
  "blocks": [
    {
      "kind": "heading",
      "level": 1,
      "text": "Pricing",
      "path": [
        0
      ]
    },
    {
      "kind": "text",
      "text": "We charge per mailbox because…",
      "path": [
        1
      ]
    },
    {
      "kind": "task",
      "text": "Confirm with finance",
      "done": false,
      "path": [
        2,
        0
      ]
    }
  ]
}

Update a page

PATCH/v1/pages/{id}

Applies one change per request, checked in this order: rename, insert, remove, move, change kind, toggle a task, or set a block's text. Blocks are named by the path from Get a page, and the document is never replaced wholesale.

Requires pages.write

Path parameters

  • idstringrequired

    The page id.

Body

  • titlestring

    Rename the page.

  • insertobject

    { kind, text?, after? } adds a block of one of the listed kinds after a block path or top-level index, or at the end.

    paragraphheading1heading2heading3bulletnumbertaskquotecodedivider

  • removeinteger[]

    Path of the block to delete.

  • moveobject

    { path, direction } moves a block up or down.

  • kindobject

    { path, kind } changes a block to one of the listed kinds.

    paragraphheading1heading2heading3bulletnumbertaskquotecodedivider

  • toggleinteger[]

    Path of a task block to tick or untick.

  • pathinteger[]

    Path of the block whose text text replaces.

  • textstring

    New text for the block at path.

Request
curl -X PATCH "https://atrix.dev/api/v1/pages/ID" \
  -H "Authorization: Bearer $ATRIX_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "title": "…", "insert": "paragraph" }'
Response
{
  "ok": true
}

Delete a page

DELETE/v1/pages/{id}

Moves a page to the trash and stops sharing it.

Requires pages.write

Path parameters

  • idstringrequired

    The page id.

Request
curl -X DELETE "https://atrix.dev/api/v1/pages/ID" \
  -H "Authorization: Bearer $ATRIX_TOKEN"
Response
{
  "ok": true
}

Comment on a page

POST/v1/pages/{id}/comments

Starts a comment thread or replies to one; replies stay one level deep. Works on locked pages, and notifies the page's creator and last editor.

Requires pages.write

Path parameters

  • idstringrequired

    The page id.

Body

  • bodystringrequired

    The comment, up to 4000 characters.

  • parentIdstring

    A comment to reply to; a reply to a reply joins the top-level thread.

Request
curl -X POST "https://atrix.dev/api/v1/pages/ID/comments" \
  -H "Authorization: Bearer $ATRIX_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "body": "…" }'
Response
{
  "id": "cm9k1l2m30016ab12cd34ef56"
}