Skip to content

Returns the current user identity including userId, username, role, and notebookId. Auto-provisions the user and notebook on first call. Call this before opening a socket or syncing mutations to ensure the session is initialized.

This endpoint takes no parameters.

Terminal window
curl -X GET https://api.hoody.com/api/v1/notes/me \
-H "Authorization: Bearer <token>"

WebSocket connections are established in two steps: first initialize a session to receive a socketId, then upgrade the HTTP connection to a WebSocket using that ID.

Creates a new socket session and returns the socket ID used to open a WebSocket connection.

This endpoint takes no parameters.

Terminal window
curl -X POST https://api.hoody.com/api/v1/notes/sockets \
-H "Authorization: Bearer <token>"

Upgrades an HTTP connection to a WebSocket using a previously initialized socket ID. The server processes bidirectional messages including cursor movements, node updates, reactions, and document edits.

NameInTypeRequiredDescription
socketIdpathstringYesThe socket session ID returned by POST /api/v1/notes/sockets
Terminal window
curl -X GET https://api.hoody.com/api/v1/notes/sockets/sock_a1b2c3d4e5f60718 \
-H "Authorization: Bearer <token>" \
-H "Upgrade: websocket" \
-H "Connection: Upgrade"

POST /api/v1/notes/notebooks/{notebookId}/mutations

Section titled “POST /api/v1/notes/notebooks/{notebookId}/mutations”

Processes a batch of client-side mutations — including node CRUD, reactions, interactions, and document edits. Batches can contain up to 500 mutations.

NameInTypeRequiredDescription
notebookIdpathstringYesThe notebook to which mutations should be applied
NameTypeRequiredDescription
mutationsarrayYesAn array of mutation objects (max 500 items). Each entry has a type discriminator — supported types include node.create, node.update, node.delete, node.reaction.create, node.reaction.delete, node.interaction.seen, node.interaction.opened, and document.update.
{
"mutations": [
{
"id": "mut_01HQ7X2E5R8T9K3F",
"createdAt": "2026-01-15T14:22:09.481Z",
"type": "node.create",
"data": {
"nodeId": "node_9c4a1e2b7f8d3061",
"updateId": "upd_3a7f1b9d4c8e0252",
"createdAt": "2026-01-15T14:22:09.481Z",
"data": "eyJ0eXBlIjoicGFyYWdyYXBoIn0="
}
},
{
"id": "mut_01HQ7X2E5R8T9K3G",
"createdAt": "2026-01-15T14:22:10.112Z",
"type": "node.reaction.create",
"data": {
"nodeId": "node_9c4a1e2b7f8d3061",
"reaction": "👍",
"rootId": "node_root_4d8e2a1c9b0f7352",
"createdAt": "2026-01-15T14:22:10.112Z"
}
},
{
"id": "mut_01HQ7X2E5R8T9K3H",
"createdAt": "2026-01-15T14:22:11.503Z",
"type": "node.interaction.seen",
"data": {
"nodeId": "node_9c4a1e2b7f8d3061",
"collaboratorId": "usr_8f2a1c9b3d4e5f60",
"seenAt": "2026-01-15T14:22:11.503Z"
}
}
]
}
Terminal window
curl -X POST https://api.hoody.com/api/v1/notes/notebooks/ntb_4b7e2d1a9c8f3601/mutations \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"mutations": [
{
"id": "mut_01HQ7X2E5R8T9K3F",
"createdAt": "2026-01-15T14:22:09.481Z",
"type": "node.create",
"data": {
"nodeId": "node_9c4a1e2b7f8d3061",
"updateId": "upd_3a7f1b9d4c8e0252",
"createdAt": "2026-01-15T14:22:09.481Z",
"data": "eyJ0eXBlIjoicGFyYWdyYXBoIn0="
}
}
]
}'