Skip to content
Hoody.com

These endpoints manage the version history of individual documents inside a notebook. Use them to list historical snapshots, fetch the content of a specific revision, capture a new snapshot of the current document, restore a previous revision, or permanently delete a stored version.

All endpoints are scoped to the notebook (notebookId) and the specific document node (nodeId) whose version history you want to work with.


GET /api/v1/notes/notebooks/{notebookId}/nodes/{nodeId}/versions

Section titled “GET /api/v1/notes/notebooks/{notebookId}/nodes/{nodeId}/versions”

Lists all versions for a document, ordered by revision descending. Supports pagination via limit and offset query parameters.

NameInTypeRequiredDescription
notebookIdpathstringYesIdentifier of the notebook that owns the document
nodeIdpathstringYesIdentifier of the document node whose versions are being listed
limitqueryintegerNoMaximum number of versions to return. Default: 20
offsetqueryintegerNoNumber of versions to skip from the start of the result set. Default: 0
{
"versions": [
{
"id": "v-9a8b7c6d5e4f",
"documentId": "nd-5e8f2a1b3c7d",
"revision": 7,
"createdAt": "2026-01-14T09:42:11.000Z",
"createdBy": "user-2c4a8b1e6f9d"
},
{
"id": "v-3d2e1c0b9a87",
"documentId": "nd-5e8f2a1b3c7d",
"revision": 6,
"createdAt": "2026-01-13T17:05:48.000Z",
"createdBy": "user-2c4a8b1e6f9d"
}
],
"total": 2
}
await client.notes.versions.list("nb-7f3a2b9c1d4e", "nd-5e8f2a1b3c7d", { limit: 20, offset: 0 })
Terminal window
curl -X GET "https://proj-abc123-cont-xyz789-notes-1.us-east-1.containers.hoody.icu/api/v1/notes/notebooks/nb-7f3a2b9c1d4e/nodes/nd-5e8f2a1b3c7d/versions?limit=20&offset=0" \
-H "Authorization: Bearer <token>"

GET /api/v1/notes/notebooks/{notebookId}/nodes/{nodeId}/versions/{versionId}

Section titled “GET /api/v1/notes/notebooks/{notebookId}/nodes/{nodeId}/versions/{versionId}”

Retrieves a specific document version by ID, including the snapshot’s full content payload.

NameInTypeRequiredDescription
notebookIdpathstringYesIdentifier of the notebook that owns the document
nodeIdpathstringYesIdentifier of the document node
versionIdpathstringYesIdentifier of the specific version to retrieve
{
"id": "v-9a8b7c6d5e4f",
"documentId": "nd-5e8f2a1b3c7d",
"revision": 7,
"content": {
"type": "doc",
"content": [
{
"type": "paragraph",
"text": "Quarterly planning notes."
}
]
},
"createdAt": "2026-01-14T09:42:11.000Z",
"createdBy": "user-2c4a8b1e6f9d"
}
await client.notes.versions.get("nb-7f3a2b9c1d4e", "nd-5e8f2a1b3c7d", "v-9a8b7c6d5e4f")
Terminal window
curl -X GET "https://proj-abc123-cont-xyz789-notes-1.us-east-1.containers.hoody.icu/api/v1/notes/notebooks/nb-7f3a2b9c1d4e/nodes/nd-5e8f2a1b3c7d/versions/v-9a8b7c6d5e4f" \
-H "Authorization: Bearer <token>"

POST /api/v1/notes/notebooks/{notebookId}/nodes/{nodeId}/versions

Section titled “POST /api/v1/notes/notebooks/{notebookId}/nodes/{nodeId}/versions”

Captures the current document content as a new version snapshot. The request takes no body; the snapshot is built from the document’s live state.

NameInTypeRequiredDescription
notebookIdpathstringYesIdentifier of the notebook that owns the document
nodeIdpathstringYesIdentifier of the document node to snapshot
{
"id": "v-1b2c3d4e5f60",
"documentId": "nd-5e8f2a1b3c7d",
"revision": 8,
"createdAt": "2026-01-15T11:22:03.000Z",
"createdBy": "user-2c4a8b1e6f9d"
}
await client.notes.versions.create("nb-7f3a2b9c1d4e", "nd-5e8f2a1b3c7d")
Terminal window
curl -X POST "https://proj-abc123-cont-xyz789-notes-1.us-east-1.containers.hoody.icu/api/v1/notes/notebooks/nb-7f3a2b9c1d4e/nodes/nd-5e8f2a1b3c7d/versions" \
-H "Authorization: Bearer <token>"

POST /api/v1/notes/notebooks/{notebookId}/nodes/{nodeId}/versions/{versionId}/restore

Section titled “POST /api/v1/notes/notebooks/{notebookId}/nodes/{nodeId}/versions/{versionId}/restore”

Restores a document to a previous version by replacing its current content with the snapshot stored at versionId. The request takes no body.

NameInTypeRequiredDescription
notebookIdpathstringYesIdentifier of the notebook that owns the document
nodeIdpathstringYesIdentifier of the document node being restored
versionIdpathstringYesIdentifier of the version whose content should become the live document
{
"success": true
}
await client.notes.versions.restore("nb-7f3a2b9c1d4e", "nd-5e8f2a1b3c7d", "v-9a8b7c6d5e4f")
Terminal window
curl -X POST "https://proj-abc123-cont-xyz789-notes-1.us-east-1.containers.hoody.icu/api/v1/notes/notebooks/nb-7f3a2b9c1d4e/nodes/nd-5e8f2a1b3c7d/versions/v-9a8b7c6d5e4f/restore" \
-H "Authorization: Bearer <token>"

DELETE /api/v1/notes/notebooks/{notebookId}/nodes/{nodeId}/versions/{versionId}

Section titled “DELETE /api/v1/notes/notebooks/{notebookId}/nodes/{nodeId}/versions/{versionId}”

Deletes a specific document version. The version is removed permanently from the version history.

NameInTypeRequiredDescription
notebookIdpathstringYesIdentifier of the notebook that owns the document
nodeIdpathstringYesIdentifier of the document node
versionIdpathstringYesIdentifier of the version to delete
{
"success": true
}
await client.notes.versions.delete("nb-7f3a2b9c1d4e", "nd-5e8f2a1b3c7d", "v-9a8b7c6d5e4f")
Terminal window
curl -X DELETE "https://proj-abc123-cont-xyz789-notes-1.us-east-1.containers.hoody.icu/api/v1/notes/notebooks/nb-7f3a2b9c1d4e/nodes/nd-5e8f2a1b3c7d/versions/v-9a8b7c6d5e4f" \
-H "Authorization: Bearer <token>"