---
title: "POST /annotations"
method: POST
path: "/annotations"
tags: ["annotations"]
---

# POST /annotations

`POST /annotations`

## Request

- Base URL: `https://api.axiom.co/v2`
- URL: `https://api.axiom.co/v2/annotations`
- Auth: OAuth 2
  - Authorization code: `https://accounts.google.com/o/oauth2/v2/auth`
  - Token URL: `https://www.googleapis.com/oauth2/v4/token` scopes: `annotations|create`
- TypeScript: <https://skmtc.dev/axiom/apis/axiom-public-api/docs/annotations/post.ts> (a function with typed inputs; its response is checked against the schema)

Creates an annotation on one or more existing datasets. If you omit `time`, Axiom uses the time of the request. `time` can't be in the future.

## Request body

- NewAnnotation
  - `datasets` string[], required: array<string> of dataset names for which the annotation appears on charts
  - `description` string: Explanation of the event the annotation marks on the charts
  - `endTime` string, date-time: End time of the annotation
  - `time` string, date-time: Time the annotation marks on the charts. If you don't include this field, Axiom assigns the time of the API request to the annotation.
  - `title` string: Summary of the annotation that appears on the charts
  - `type` string, required: Type of the event marked by the annotation. Use only alphanumeric characters or hyphens. For example, "production-deployment".
  - `url` string: URL relevant for the event marked by the annotation. For example, link to GitHub pull request.

## Response `201`

Created annotation.

- Annotation
  - `datasets` string[], required: array<string> of dataset names for which the annotation appears on charts
  - `description` string: Explanation of the event the annotation marks on the charts
  - `endTime` string, date-time, nullable: End time of the annotation
  - `id` string, required
  - `time` string, date-time, required: Time the annotation marks on the charts. If you don't include this field, Axiom assigns the time of the API request to the annotation.
  - `title` string: Summary of the annotation that appears on the charts
  - `type` string, required: Type of the event marked by the annotation. Use only alphanumeric characters or hyphens. For example, "production-deployment".
  - `url` string: URL relevant for the event marked by the annotation. For example, link to GitHub pull request.

## Other responses

- `400`: Invalid annotation, for example an unknown dataset, a `time` in the future, or an `endTime` before `time`.

## Changes

- **2026-10-16** (v2) `fbc1b8430feb`: 1 info
  - added the non-success response with the status `400`

[Operation history](https://skmtc.dev/axiom/apis/axiom-public-api/changes/annotations/post.md)

---

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