Author a page end-to-end

Embed
Preview of the card
<a href="https://forumulate.com/reference/authoring-a-page"><img src="https://forumulate.com/reference/_api/public/orgs/046a9bc0-d530-43ae-9bae-af7945008cda/spaces/8042f004-e3d9-445f-b7a4-b6c1f86836e6/pages/74723d34-f799-4fd3-be94-a409c8c18401/social-card.svg?v=3e7ae33eec8b" alt="Author a page end-to-end" width="600" height="315"></a>

This is the whole lifecycle an integrator needs — create a page, set its content, publish it, and read it back — with real requests you can copy. Every call uses Authorization: Bearer <token> and the base URL https://forumulate.com/api.

You need three ids, each one call away: your org (GET /orgs), a space in it (GET /orgs/{orgId}/spaces), and a collection in that space (GET /orgs/{orgId}/spaces/{spaceId}/collections).

1. Create the page

A page can arrive as Markdown (body) or as a block document (content, TipTap/ProseMirror JSON) — use exactly one. Markdown is the shortest path:

curl -X POST \
  https://forumulate.com/api/orgs/{orgId}/spaces/{spaceId}/collections/{collectionId}/pages \
  -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
  -d '{
    "title": "Hello from the API",
    "slug": "hello-api",
    "body": "# Hello\n\nCreated **via the API**.\n\n- one\n- two\n"
  }'

Response:

{ "page": { "id": "533a69e6-…", "slug": "hello-api", "title": "Hello from the API" } }

Keep that page.id — the rest of the lifecycle addresses the page directly, not through its collection.

2. Set or replace the content

PUT …/pages/{id}/content replaces the body wholesale. It accepts the same two shapes as create — Markdown body or block-doc content:

curl -X PUT \
  https://forumulate.com/api/orgs/{orgId}/spaces/{spaceId}/pages/{pageId}/content \
  -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
  -d '{
    "title": "Hello from the API",
    "body": "# Hello, again\n\nUpdated **via PUT content**.\n\n1. first\n2. second\n"
  }'

3. Publish

Publishing makes the current draft the live revision. No request body:

curl -X POST \
  https://forumulate.com/api/orgs/{orgId}/spaces/{spaceId}/pages/{pageId}/publish \
  -H "Authorization: Bearer $TOKEN"

4. Read it back

GET …/pages/{id}/markdown returns the rendered Markdown — the round-trip of what you sent:

curl https://forumulate.com/api/orgs/{orgId}/spaces/{spaceId}/pages/{pageId}/markdown \
  -H "Authorization: Bearer $TOKEN"
# Hello, again

Updated **via PUT content**.

1. first
2. second

Three reads are available, each for a different need:

Call

Returns

GET …/pages/{id}

the page and its metadata (title, slug, cover, audience…)

GET …/pages/{id}/markdown

the content as Markdown

GET …/pages/{id}/published

the published block document

Scopes

Reads need a token with read; create / PUT content / publish need write. Each endpoint states its required scope in the reference.

The Forumulate teamUpdated