---
title: "Update annotation"
method: POST
path: "/annotations/update"
tags: ["Annotations"]
---

# Update annotation

`POST /annotations/update`

## Request

- Base URL: `https://api.databuddy.cc`
- URL: `https://api.databuddy.cc/annotations/update`
- Auth: API key in header `x-api-key`

Updates an annotation. Members can update their own annotations; owners, admins and API keys can update any.

## Request body

- object
  - `id` string, required
  - `text` string
  - `tags` string[]
  - `color` string
  - `isPublic` boolean

## Response `200`

OK

- object
  - `annotationType` string, required
  - `chartContext` object, required
    - `dateRange` object, required
      - `start_date` string, required
      - `end_date` string, required
      - `granularity` 'hourly' | 'daily' | 'weekly' | 'monthly', required
    - `filters` object[]
      - `field` string, required
      - `operator` 'eq' | 'ne' | 'gt' | 'lt' | 'contains', required
      - `value` string, required
    - `metrics` string[]
    - `tabId` string
  - `chartType` string, required
  - `color` string, required
  - `createdAt` string, date-time, required
  - `createdBy` string, nullable, required
  - `deletedAt` string, date-time, nullable, required
  - `id` string, required
  - `isPublic` boolean, required
  - `tags` string[], nullable, required
  - `text` string, required
  - `updatedAt` string, date-time, required
  - `websiteId` string, required
  - `xEndValue` string, date-time, nullable, required
  - `xValue` string, date-time, required
  - `yValue` number, nullable, required

## Other responses

- `400`: 400
- `401`: 401
- `402`: 402
- `403`: 403
- `404`: 404
- `409`: 409
- `429`: 429
- `500`: 500
- `503`: 503

---

[API](https://skmtc.dev/databuddy/apis/databuddy-api.md) - [All operations](https://skmtc.dev/databuddy/apis/databuddy-api/llms.txt) - [OpenAPI document](https://skmtc.dev/databuddy/apis/databuddy-api/revisions/ddfbba648d52?raw)
