Skip to content
Hoody.com

The Notes real-time APIs drive live collaboration inside a Hoody notebook container. Use these endpoints to identify the current user, open a WebSocket channel for receiving live events, and synchronize batches of client-side mutations back to the server.

All operations on this page run against the Notes container for your project:

https://{projectId}-{containerId}-notes-1.{server}.containers.hoody.com

GET /api/v1/notes/me

Returns the current user identity, including userId, username, role, and notebookId. The user and notebook are auto-provisioned on first call.

This endpoint takes no parameters.

Terminal window
curl -X GET "https://{projectId}-{containerId}-notes-1.{server}.containers.hoody.com/api/v1/notes/me" \
-H "Authorization: Bearer <token>"

A live collaboration channel requires two steps: initialize a socket session to obtain a socket ID, then open the WebSocket using that ID.

POST /api/v1/notes/sockets

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

This endpoint takes no parameters.

Terminal window
curl -X POST "https://{projectId}-{containerId}-notes-1.{server}.containers.hoody.com/api/v1/notes/sockets" \
-H "Authorization: Bearer <token>"

GET /api/v1/notes/sockets/{socketId}

Upgrades the HTTP connection to a WebSocket using a previously initialized socket ID. Once upgraded, send and receive messages as text frames.

NameInTypeRequiredDescription
socketIdpathstringYesThe socket ID returned by POST /api/v1/notes/sockets
Terminal window
curl -i -X GET "https://{projectId}-{containerId}-notes-1.{server}.containers.hoody.com/api/v1/notes/sockets/{socketId}" \
-H "Authorization: Bearer <token>" \
-H "Connection: Upgrade" \
-H "Upgrade: websocket"

The full WebSocket URL to connect to from a browser or Node.js client is:

wss://{projectId}-{containerId}-notes-1.{server}.containers.hoody.com/api/v1/notes/sockets/{socketId}

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

Processes a batch of client-side mutations (node CRUD, reactions, interactions, document updates) and returns a per-mutation status result for each entry.

NameInTypeRequiredDescription
notebookIdpathstringYesThe notebook receiving the mutations
NameTypeRequiredDescription
mutationsarrayYesOrdered list of mutations to apply. Maximum 500 entries per request. Each entry follows the envelope shape below.

Each entry in mutations carries the following envelope fields:

NameTypeRequiredDescription
idstringYesClient-generated mutation ID, echoed back in the response
createdAtstringYesClient-side ISO 8601 timestamp for the mutation
typestringYesDiscriminator selecting the payload shape (see below)
dataobjectYesPayload matching the selected type

The supported type values and their required data fields are:

node.create

FieldTypeRequiredDescription
data.nodeIdstringYesIdentifier of the new node
data.updateIdstringYesClient-generated update ID
data.createdAtstringYesISO 8601 creation timestamp
data.datastringYesEncoded node payload

node.update

FieldTypeRequiredDescription
data.nodeIdstringYesIdentifier of the node being updated
data.updateIdstringYesClient-generated update ID
data.datastringYesEncoded update payload
data.createdAtstringYesISO 8601 update timestamp

node.delete

FieldTypeRequiredDescription
data.nodeIdstringYesIdentifier of the node being deleted
data.rootIdstringYesRoot node ID containing the target
data.deletedAtstringYesISO 8601 deletion timestamp

node.reaction.create

FieldTypeRequiredDescription
data.nodeIdstringYesNode receiving the reaction
data.reactionstringYesReaction identifier (for example, a short code)
data.rootIdstringYesRoot node ID containing the target
data.createdAtstringYesISO 8601 timestamp of the reaction

node.reaction.delete

FieldTypeRequiredDescription
data.nodeIdstringYesNode whose reaction is being removed
data.reactionstringYesReaction identifier being removed
data.rootIdstringYesRoot node ID containing the target
data.deletedAtstringYesISO 8601 timestamp of the removal

node.interaction.seen

FieldTypeRequiredDescription
data.nodeIdstringYesNode being marked as seen
data.collaboratorIdstringYesCollaborator who saw the node
data.seenAtstringYesISO 8601 timestamp of the seen event

node.interaction.opened

FieldTypeRequiredDescription
data.nodeIdstringYesNode being marked as opened
data.collaboratorIdstringYesCollaborator who opened the node
data.openedAtstringYesISO 8601 timestamp of the opened event

document.update

FieldTypeRequiredDescription
data.documentIdstringYesIdentifier of the document being updated
data.updateIdstringYesClient-generated update ID
data.datastringYesEncoded document update payload
data.createdAtstringYesISO 8601 update timestamp
Terminal window
curl -X POST "https://{projectId}-{containerId}-notes-1.{server}.containers.hoody.com/api/v1/notes/notebooks/{notebookId}/mutations" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"mutations": [
{
"id": "m-9f3a1b",
"createdAt": "2026-01-15T12:00:00.000Z",
"type": "node.create",
"data": {
"nodeId": "n-aaaa1111bbbb2222cccc3333",
"updateId": "u-7c1d2e",
"createdAt": "2026-01-15T12:00:00.000Z",
"data": "eyJ0ZXh0IjoiSGVsbG8sIHdvcmxkISJ9"
}
},
{
"id": "m-7b2c4d",
"createdAt": "2026-01-15T12:00:05.000Z",
"type": "node.reaction.create",
"data": {
"nodeId": "n-aaaa1111bbbb2222cccc3333",
"reaction": ":wave:",
"rootId": "n-root1111aaaa2222bbbb3333",
"createdAt": "2026-01-15T12:00:05.000Z"
}
}
]
}'