/Docs
Search docs or ask a question⌘K
DocsAgent
Changelog
API Reference Content History

Content History

List the revisions of a project written in Syntext, and read what one changed.

GET/v1/projects/{projectId}/content/historyTry it
API key or session token

Every save, upload, restore and publish-ready change to a project written in Syntext is a numbered revision. History is never rewritten: a restore adds a new revision.

Note

Any workspace member (session JWT), or an API key bound to this project with the read scope or higher.

Query Parameters

NameDescription
path:stringquery
Only revisions that changed this file, e.g. guides/quickstart.mdx.
limit:integerquery
1–100.
Default20
before:integerquery
Only revisions numbered below this. Pass the previous page's pagination.nextBefore.

Response

Newest first.

NameDescription
source:string
What made the revision: editor, template, import (an upload), restore, agent (the editor's Assistant), mcp, api, schedule or github-snapshot (pages copied from GitHub when it was disconnected).
author:object | null
Who made it. null for an API key or an automated change.
restoredFrom:integer | null
For a restore, the revision it brought back.
buildId:string | null
The build that published this revision, when one did.
published:boolean
true when the live site includes this revision: it's at or before the newest revision a successful publish deployed.
pagination.nextBefore:integer | null
Pass as before for older revisions. null on the last page.

Get a revision

GET/v1/projects/{projectId}/content/revisions/{number}

One revision and every file it changed. Add ?content=true for each text file's content after the change — what the dashboard's per-file diff compares.

json
{
"data": {
"revision": { "id": "5b0f9c1e-…", "number": 14, "message": "docs: update guides/quickstart.mdx", "source": "editor", "author": { "id": "usr_9f2c", "name": "Ada Lovelace" }, "createdAt": "2026-11-14T09:12:44.000Z", "fileCount": 1, "restoredFrom": null, "buildId": null, "published": false },
"files": [
{ "path": "guides/quickstart.mdx", "op": "modify", "kind": "text", "sha": "c2a8e4…", "previousSha": "3f1c9a…", "size": 2104 }
]
}
}
•
op — add, modify or delete. A deleted file has sha: null.
•
kind — text or asset (an image; images have no content).

Error Responses

400 Bad Request

validation_error — {number} isn't a positive integer, or a query parameter is out of range.

404 Not Found

not_found — no revision with that number in this project, or the project doesn't exist.

409 Conflict

content_source_github / content_source_upload — the project isn't written in Syntext. See Errors on GitHub and CLI projects.

Was this page helpful? Yes No
Request
cURLJavaScriptPythonGoRubyPHPJavaC#cURL
curl --request GET \
--url 'https://api.syntext.dev/v1/projects/{projectId}/content/history' \
--header 'Authorization: Bearer <token>'
Responseapplication/json
json
{
"data": [
{
"id": "5b0f9c1e-7a2d-4e8b-9c3f-1d6a8e2b4c70",
"number": 14,
"message": "docs: update guides/quickstart.mdx",
"source": "editor",
"author": { "id": "usr_9f2c", "name": "Ada Lovelace" },
"createdAt": "2026-11-14T09:12:44.000Z",
"fileCount": 1,
"restoredFrom": null,
"buildId": null,
"published": false
},
{
"id": "0c4e8a2f-6b1d-4f9e-8a3c-7d5b2e9f1a60",
"number": 13,
"message": "Restore all files to revision 9",
"source": "restore",
"author": { "id": "usr_9f2c", "name": "Ada Lovelace" },
"createdAt": "2026-11-13T17:40:02.000Z",
"fileCount": 4,
"restoredFrom": 9,
"buildId": "b7d2e9a4-1c3f-4b8e-9a6d-2f5c8e1b4a70",
"published": true
}
],
"pagination": { "nextBefore": 13 }
}
Product
Resources
Company
© 2026 SyntextBuilt with Syntext