Document Versions
Section titled “Document Versions”The Document Versions API provides version history management for note documents. Use these endpoints to list prior versions of a document, capture new version snapshots, retrieve the content of a specific version, restore a document to a previous version, or permanently delete a stored version. Each document’s versions are ordered by revision number in descending order.
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.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
notebookId | path | string | Yes | The identifier of the notebook that contains the document |
nodeId | path | string | Yes | The identifier of the document node |
limit | query | integer | No | Maximum number of versions to return. Defaults to 20. |
offset | query | integer | No | Number of versions to skip before returning results. Defaults to 0. |
curl -X GET "https://api.hoody.com/api/v1/notes/notebooks/nb_8f3c2a1b4d5e6f7g/nodes/node_h7i8j9k0l1m2n3o4/versions?limit=20&offset=0" \ -H "Authorization: Bearer <token>"const { versions, total } = await client.notes.versions.list({ notebookId: "nb_8f3c2a1b4d5e6f7g", nodeId: "node_h7i8j9k0l1m2n3o4", limit: 20, offset: 0,});{ "versions": [ { "id": "ver_4d5e6f7g8h9i0j1k", "documentId": "node_h7i8j9k0l1m2n3o4", "revision": 12, "createdAt": "2026-01-14T16:42:18.231Z", "createdBy": "user_alice" }, { "id": "ver_3c4d5e6f7g8h9i0j", "documentId": "node_h7i8j9k0l1m2n3o4", "revision": 11, "createdAt": "2026-01-13T10:05:51.740Z", "createdBy": "user_bob" } ], "total": 12}{ "message": "You do not have permission to view versions of this document", "code": "FORBIDDEN", "details": [ { "path": "notebookId", "message": "User lacks read access to notebook nb_8f3c2a1b4d5e6f7g" } ]}{ "message": "Document not found", "code": "NOT_FOUND", "details": [ { "path": "nodeId", "message": "No document with id node_h7i8j9k0l1m2n3o4 in notebook nb_8f3c2a1b4d5e6f7g" } ]}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.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
notebookId | path | string | Yes | The identifier of the notebook that contains the document |
nodeId | path | string | Yes | The identifier of the document node |
versionId | path | string | Yes | The identifier of the version to retrieve |
curl -X GET "https://api.hoody.com/api/v1/notes/notebooks/nb_8f3c2a1b4d5e6f7g/nodes/node_h7i8j9k0l1m2n3o4/versions/ver_4d5e6f7g8h9i0j1k" \ -H "Authorization: Bearer <token>"const version = await client.notes.versions.get({ notebookId: "nb_8f3c2a1b4d5e6f7g", nodeId: "node_h7i8j9k0l1m2n3o4", versionId: "ver_4d5e6f7g8h9i0j1k",});{ "id": "ver_4d5e6f7g8h9i0j1k", "documentId": "node_h7i8j9k0l1m2n3o4", "revision": 12, "content": { "type": "doc", "content": [ { "type": "heading", "attrs": { "level": 2 }, "content": [ { "type": "text", "text": "Q4 Planning Notes" } ] }, { "type": "paragraph", "content": [ { "type": "text", "text": "Updated rollout timeline for the analytics dashboard." } ] } ] }, "createdAt": "2026-01-14T16:42:18.231Z", "createdBy": "user_alice"}{ "message": "You do not have permission to view this version", "code": "FORBIDDEN", "details": [ { "path": "versionId", "message": "User lacks read access to version ver_4d5e6f7g8h9i0j1k" } ]}{ "message": "Document version not found", "code": "NOT_FOUND", "details": [ { "path": "versionId", "message": "No version with id ver_4d5e6f7g8h9i0j1k for document node_h7i8j9k0l1m2n3o4" } ]}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.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
notebookId | path | string | Yes | The identifier of the notebook that contains the document |
nodeId | path | string | Yes | The identifier of the document node to snapshot |
curl -X POST "https://api.hoody.com/api/v1/notes/notebooks/nb_8f3c2a1b4d5e6f7g/nodes/node_h7i8j9k0l1m2n3o4/versions" \ -H "Authorization: Bearer <token>"const snapshot = await client.notes.versions.create({ notebookId: "nb_8f3c2a1b4d5e6f7g", nodeId: "node_h7i8j9k0l1m2n3o4",});{ "id": "ver_9j0k1l2m3n4o5p6q", "documentId": "node_h7i8j9k0l1m2n3o4", "revision": 13, "createdAt": "2026-01-15T09:14:02.118Z", "createdBy": "user_alice"}{ "message": "You do not have permission to snapshot this document", "code": "FORBIDDEN", "details": [ { "path": "nodeId", "message": "User lacks write access to document node_h7i8j9k0l1m2n3o4" } ]}{ "message": "Document not found", "code": "NOT_FOUND", "details": [ { "path": "nodeId", "message": "No document with id node_h7i8j9k0l1m2n3o4 in notebook nb_8f3c2a1b4d5e6f7g" } ]}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 updating its content.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
notebookId | path | string | Yes | The identifier of the notebook that contains the document |
nodeId | path | string | Yes | The identifier of the document node to restore |
versionId | path | string | Yes | The identifier of the version to restore the document to |
curl -X POST "https://api.hoody.com/api/v1/notes/notebooks/nb_8f3c2a1b4d5e6f7g/nodes/node_h7i8j9k0l1m2n3o4/versions/ver_3c4d5e6f7g8h9i0j/restore" \ -H "Authorization: Bearer <token>"const result = await client.notes.versions.restore({ notebookId: "nb_8f3c2a1b4d5e6f7g", nodeId: "node_h7i8j9k0l1m2n3o4", versionId: "ver_3c4d5e6f7g8h9i0j",});{ "success": true}{ "message": "You do not have permission to restore this document", "code": "FORBIDDEN", "details": [ { "path": "nodeId", "message": "User lacks write access to document node_h7i8j9k0l1m2n3o4" } ]}{ "message": "Document version not found", "code": "NOT_FOUND", "details": [ { "path": "versionId", "message": "No version with id ver_3c4d5e6f7g8h9i0j for document node_h7i8j9k0l1m2n3o4" } ]}{ "message": "Failed to restore document to selected version", "code": "INTERNAL_SERVER_ERROR", "details": [ { "path": "versionId", "message": "An unexpected error occurred while applying version ver_3c4d5e6f7g8h9i0j" } ]}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.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
notebookId | path | string | Yes | The identifier of the notebook that contains the document |
nodeId | path | string | Yes | The identifier of the document node |
versionId | path | string | Yes | The identifier of the version to delete |
curl -X DELETE "https://api.hoody.com/api/v1/notes/notebooks/nb_8f3c2a1b4d5e6f7g/nodes/node_h7i8j9k0l1m2n3o4/versions/ver_9j0k1l2m3n4o5p6q" \ -H "Authorization: Bearer <token>"const result = await client.notes.versions.delete({ notebookId: "nb_8f3c2a1b4d5e6f7g", nodeId: "node_h7i8j9k0l1m2n3o4", versionId: "ver_9j0k1l2m3n4o5p6q",});{ "success": true}{ "message": "You do not have permission to delete this version", "code": "FORBIDDEN", "details": [ { "path": "versionId", "message": "User lacks delete access to version ver_9j0k1l2m3n4o5p6q" } ]}{ "message": "Document version not found", "code": "NOT_FOUND", "details": [ { "path": "versionId", "message": "No version with id ver_9j0k1l2m3n4o5p6q for document node_h7i8j9k0l1m2n3o4" } ]}