Attach a note to a timeline event
POST
/timeline/annotations
const url = 'https://example.com/api/v1/timeline/annotations';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"source":"sync","eventId":1,"body":"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/timeline/annotations \ --header 'Content-Type: application/json' \ --data '{ "source": "sync", "eventId": 1, "body": "example" }'Requires an authenticated user (or AUTH-bypass). The referenced event must exist (404 otherwise, so a note is never born dangling).
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
source
required
The event source a timeline event originates from.
string
eventId
required
integer
body
required
string
Responses
Section titled “Responses”Annotation created
Media typeapplication/json
A user note attached to a single timeline event.
object
id
required
integer
source
required
The event source a timeline event originates from.
string
eventId
required
integer
body
required
string
authorUserId
required
integer
authorName
required
string
createdAt
required
string format: date-time
updatedAt
required
string format: date-time
Example
{ "source": "sync"}Invalid body or source
Media typeapplication/json
object
error
required
Error message
string
Examplegenerated
{ "error": "example"}Authentication required
Media typeapplication/json
object
error
required
Error message
string
Examplegenerated
{ "error": "example"}Referenced event not found
Media typeapplication/json
object
error
required
Error message
string
Examplegenerated
{ "error": "example"}Failed to create annotation
Media typeapplication/json
object
error
required
Error message
string
Examplegenerated
{ "error": "example"}