Apply a Canvas drawing event
POST
/api/v1/collab/notes/{id}/events
const url = 'https://example.com/api/v1/collab/notes/example/events';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"elements":["example"],"font":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/collab/notes/example/events \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "elements": [ "example" ], "font": "example" }'Validate and save a bounded Canvas element event through the existing Note writer. The authenticated owner’s stable identity selects the room. Route: /api/v1/collab/notes/{id}/events. Inputs: id. Do not automatically replay this operation after an uncertain result.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
Canvas event envelope shared by HTTP tools and the web room (§60, #976).
A remove is an element with isDeleted: true and a newer version.
object
elements
required
Array
font
Shared text style; omitted during ordinary drawing edits (§60).
string | null
Examplegenerated
{ "elements": [ "example" ], "font": "example"}Responses
Section titled “Responses”Canvas event saved
Canvas not found
Invalid Canvas event
Event limit reached