---
title: "Get annotation"
method: POST
path: "/annotations/getById"
tags: ["Annotations"]
---

# Get annotation

`POST /annotations/getById`

## Request

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

Returns a single annotation by id. Requires website read permission.

## Request body

- object
  - `id` string, required

## 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)
