Skip to content

Update Endpoint

PATCH
/api/v1/chart-annotations/{annotation_id}
curl --request PATCH \
--url https://example.com/api/v1/chart-annotations/1 \
--header 'Content-Type: application/json' \
--data '{ "date": "2026-04-15", "label": "example" }'
annotation_id
required
Annotation Id
integer
Media typeapplication/json
ChartAnnotationUpdate

Partial update: only the fields that are sent change. An explicit null is rejected rather than read as “clear it”, since neither field can be empty.

object
date
Any of:
string format: date
label
Any of:
string
>= 1 characters <= 200 characters

Example generated

{
"date": "2026-04-15",
"label": "example"
}

Successful Response

Media typeapplication/json
ChartAnnotationOut
object
id
required
Id
integer
user_id
required
User Id
integer
date
required
Date
string format: date
label
required
Label
string
created_at
required
Created At
string format: date-time
updated_at
required
Updated At
string format: date-time

Example generated

{
"id": 1,
"user_id": 1,
"date": "2026-04-15",
"label": "example",
"created_at": "2026-04-15T12:00:00Z",
"updated_at": "2026-04-15T12:00:00Z"
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object

Example generated

{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example",
"input": "example",
"ctx": {}
}
]
}