Annotations
API DocumentationEndpoint
GET
https://dev.usermetric.io/api/annotations/
Parameters
| Parameters | Details | Description |
|---|---|---|
website_id
|
Optional
Integer
|
|
search
|
Optional
String
|
The search string. |
search_by
|
Optional
String
|
What field are you searching by. Allowed values are: name. |
datetime_field
|
Optional
String
|
Allowed values: datetime, last_datetime, chart_datetime |
datetime_start
|
Optional
String
|
Filter results starting from this datetime. Y-m-d H:i:s format. |
datetime_end
|
Optional
String
|
Filter results up to this datetime. Y-m-d H:i:s format. |
order_by
|
Optional
String
|
What field to order the results by. Allowed values are: annotation_id, website_id, datetime, last_datetime, name, chart_datetime. |
order_type
|
Optional
String
|
The ordering of the results. Allowed values are: ASC for ascending ordering, and DESC for descending ordering. |
page
|
Optional
Integer
|
The page number that you want results from. Defaults to 1. |
results_per_page
|
Optional
Integer
|
How many results you want per page. Allowed values are: 10, 25, 50, 100, 250, 500, 1000. Defaults to 25. |
Example
curl --request GET \
--url 'https://dev.usermetric.io/api/annotations/' \
--header 'Authorization: Bearer {api_key}' \
Response example
{
"data": [
{
"id": 1,
"website_id": 1,
"user_id": 1,
"name": "Example",
"chart_datetime": "2026-09-22 02:52:19",
"datetime": "2026-09-22 02:52:19",
"last_datetime": null
},
{
"id": 2,
"website_id": 1,
"user_id": 1,
"name": "Launched v2 pricing",
"chart_datetime": "2026-09-19 02:52:19",
"datetime": "2026-09-19 02:52:19",
"last_datetime": "2026-09-22 02:52:19"
}
],
"meta": {
"page": 1,
"total_pages": 1,
"results_per_page": 25,
"total_results": 2
},
"links": {
"first": "https://dev.usermetric.io/api/annotations?page=1",
"last": "https://dev.usermetric.io/api/annotations?page=1",
"next": null,
"prev": null,
"self": "https://dev.usermetric.io/api/annotations?page=1"
}
}
Endpoint
GET
https://dev.usermetric.io/api/annotations/{annotation_id}
Example
curl --request GET \
--url 'https://dev.usermetric.io/api/annotations/{annotation_id}' \
--header 'Authorization: Bearer {api_key}' \
Response example
{
"data": {
"id": 1,
"website_id": 1,
"user_id": 1,
"name": "Example",
"chart_datetime": "2026-09-22 02:52:19",
"datetime": "2026-09-22 02:52:19",
"last_datetime": null
}
}
Endpoint
POST
https://dev.usermetric.io/api/annotations
Parameters
| Parameters | Details | Description |
|---|---|---|
website_id
|
Required
Integer
|
|
name
|
Required
String
|
|
chart_datetime
|
Required
String
|
Y-m-d H:i:s UTC |
Example
curl --request POST \
--url 'https://dev.usermetric.io/api/annotations' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'website_id=1' \
--form 'name=Example' \
--form 'chart_datetime=2026-09-22 02:52:19' \
Response example
{
"data": {
"id": 1,
"website_id": 1,
"user_id": 1,
"name": "Example",
"chart_datetime": "2026-09-22 02:52:19",
"last_datetime": null,
"datetime": "2026-09-22 02:52:19"
}
}
Endpoint
POST
https://dev.usermetric.io/api/annotations/{annotation_id}
Parameters
| Parameters | Details | Description |
|---|---|---|
website_id
|
Optional
Integer
|
|
name
|
Optional
String
|
|
chart_datetime
|
Optional
String
|
Y-m-d H:i:s UTC |
Example
curl --request POST \
--url 'https://dev.usermetric.io/api/annotations/{annotation_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Example' \
Response example
{
"data": {
"id": 1,
"website_id": 1,
"user_id": 1,
"name": "Example",
"chart_datetime": "2026-09-22 02:52:19",
"last_datetime": "2026-09-22 02:52:19",
"datetime": "2026-09-19 02:52:19"
}
}
Endpoint
DELETE
https://dev.usermetric.io/api/annotations/{annotation_id}
Example
curl --request DELETE \
--url 'https://dev.usermetric.io/api/annotations/{annotation_id}' \
--header 'Authorization: Bearer {api_key}' \