API pipeline: Keep a card's version history

Index: API pipelines — index

Goal: keep every saved state of a card, take a snapshot on demand and roll back to an older version.

Steps

  1. Switch history on (the owner only).
PUT /v0/my/cards/470000000000000001/versions
{"enabled": true}
→ {"nonce": "470000000000000001", "versioned": true, "workspace": "470000000000000031", "items": []}

History works for projects, articles, posts, docs, sheets, boards, workspaces, rubrics, campaigns, oracles, agendas, API endpoints, links, secrets, rooms and coupons. {"enabled": false} switches it off.

  1. Edit as usual. Every write by the owner or a writer first stores the previous state as the next version.

  2. Snapshot now (needs write; no body).

POST /v0/my/cards/470000000000000001/versions
→ {"version": 3, "nonce": "470000000000000043", "created_at": "2026-10-15T12:00:00Z", "author": "<user>"}
  1. List versions.
GET /v0/my/cards/470000000000000001/versions
→ {"versioned": true, "workspace": "470000000000000031",
   "items": [{"version": 1, "nonce": "470000000000000041", "created_at": "…", "author": "<user>"}, …]}

Version 1 is the oldest; numbers never change. Read a version with the ordinary card GET on its nonce; GET /v0/my/cards/{snapshot}/versions answers version_of and version.

  1. Roll back.
POST /v0/my/cards/470000000000000001/versions/2/make-current
→ {"nonce": "470000000000000001", "restored": 2, "pushed": {"version": 4, "nonce": "…", …}}

The state that was current is stored first as the next version (pushed), so a rollback can be undone the same way.

Behind

Rules

API surface

Endpoint Purpose FE AI / oracle
PUT /v0/my/cards/{nonce}/versions Switch history on or off yes (Keep history) yes, before editing important cards
GET /v0/my/cards/{nonce}/versions List versions yes (History) yes
POST /v0/my/cards/{nonce}/versions Snapshot now yes yes, as a checkpoint
POST /v0/my/cards/{nonce}/versions/{version}/make-current Roll back yes (Make it current) yes

Mentioned