Management API
Revisions
Read a document’s history and restore an older version.
Every content write records a revision: the version number, the content, who wrote it and from where (api, mcp or editor), and an optional message. published marks the revisions that went live.
What is kept#
- A document keeps at most 200 revisions.
- When there are more, the oldest unpublished revisions are removed first. Published revisions and the one a scheduled document will publish are never removed.
- Saves in the web editor by the same person within 10 minutes are merged into one revision.
Endpoints#
List revisions#
GET
/documents/:id/revisionsLists the document’s revisions, newest first, without content.
Path parameters
idstringrequired- The document’s id.
Query parameters
limitinteger- How many to return, 1 to 100. Defaults to 50.
offsetinteger- How many to skip, 0 to 100,000. Defaults to 0.
Errors
NotFound404- No document with this id in the token’s project, or it was deleted.
curl "https://api.pmkin.io/documents/6704a1f0c2b3d4e5f6a7b8c9/revisions?limit=10" \-H "Authorization: Bearer $PMKIN_MANAGEMENT_TOKEN"
Response: 200 OK
[{"author": {"agent": "Claude Code","id": "6703f6a7b8c9d0e1f2a3b4c5","name": "Writing agent","type": "token"},"createdAt": "2026-10-08T09:12:44.000Z","message": "Add a section on free plans","published": false,"source": "api","version": 7},{"author": {"id": "66f0b2c4d5e6f7a8b9c0d1f0","name": "Maja Lind","type": "user"},"createdAt": "2026-10-07T17:40:02.000Z","published": true,"source": "editor","version": 6}]
Get a revision#
GET
/documents/:id/revisions/:versionReturns one revision with its content.
Path parameters
idstringrequired- The document’s id.
versionintegerrequired- The revision’s version number.
Errors
RevisionNotFound404- No revision with this version. It may have been removed by the 200-revision limit.
NotFound404- No document with this id in the token’s project, or it was deleted.
curl "https://api.pmkin.io/documents/6704a1f0c2b3d4e5f6a7b8c9/revisions/6" \-H "Authorization: Bearer $PMKIN_MANAGEMENT_TOKEN"
Response: 200 OK
{"author": {"id": "66f0b2c4d5e6f7a8b9c0d1f0","name": "Maja Lind","type": "user"},"content": "# Headless CMS pricing\n\nWhat each plan costs, and when an upgrade pays off.\n","createdAt": "2026-10-07T17:40:02.000Z","published": true,"source": "editor","version": 6}
Restore a revision#
POST
/documents/:id/revisions/:version/restoreWrites the revision’s content as a new version of the draft. Nothing in the history is lost: the restore is a revision too.
Path parameters
idstringrequired- The document’s id.
versionintegerrequired- The revision’s version number.
Body
baseVersioninteger- The
versionfrom your last read of the document. Leave it out to restore over whatever is there. messagestring- A note for the revision history.
Errors
VersionConflict409baseVersionisn’t the current version. The body hascurrentVersion: read the document again and redo the change.RevisionNotFound404- No revision with this version.
NotFound404- No document with this id in the token’s project, or it was deleted.
WritesDisabled503- Content writes without
editorStateJsonare turned off on this server.
curl -X POST "https://api.pmkin.io/documents/6704a1f0c2b3d4e5f6a7b8c9/revisions/6/restore" \-H "Authorization: Bearer $PMKIN_MANAGEMENT_TOKEN" \-H "Content-Type: application/json" \-d '{"baseVersion": 8,"message": "Back to the version Maja approved"}'
Response: 200 OK
{"assigneeId": "66f0b2c4d5e6f7a8b9c0d1f0","briefState": "claimed","categoryId": "6701c3d4e5f6a7b8c9d0e1f2","clusterId": "6702d4e5f6a7b8c9d0e1f2a3","contentUpdatedBy": {"agent": "Claude Code","id": "6703f6a7b8c9d0e1f2a3b4c5","name": "Writing agent","type": "token"},"dueDate": "2026-10-20","id": "6704a1f0c2b3d4e5f6a7b8c9","isPublished": false,"slug": "headless-cms-pricing","status": "drafting","title": "Headless CMS pricing","updatedAt": "2026-10-08T09:12:44.000Z","wordCount": 11,"hasUnpublishedChanges": false,"version": 9}
Previous
Briefs
Next
Intents