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

# Create Annotation.

`POST /annotations`

Creates an annotation in the Grafana database. The dashboardId and panelId fields are optional. If they are not specified then an organization annotation is created and can be queried in any dashboard that adds the Grafana annotations data source. When creating a region annotation include the timeEnd property.
The format for `time` and `timeEnd` should be epoch numbers in millisecond resolution.
The response for this HTTP request is slightly different in versions prior to v6.4. In prior versions you would also get an endId if you where creating a region. But in 6.4 regions are represented using a single event with time and timeEnd properties.

## Request body

- PostAnnotationsCmd
  - `dashboardId` integer
  - `dashboardUID` string
  - `data` Json
  - `panelId` integer
  - `tags` string[]
  - `text` string, required
  - `time` integer
  - `timeEnd` integer

## Response `200`

(empty)

- object
  - `id` integer, required — ID Identifier of the created annotation.
  - `message` string, required — Message Message of the created annotation.

## Other responses

- `400` — BadRequestError is returned when the request is invalid and it cannot be processed.
- `401` — UnauthorizedError is returned when the request is not authenticated.
- `403` — ForbiddenError is returned if the user/token has insufficient permissions to access the requested resource.
- `500` — InternalServerError is a general error indicating something went wrong internally.

---

[API](https://skmtc.net/grafana/apis/http-api.md) · [All operations](https://skmtc.net/grafana/apis/http-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/grafana/http-api/versions/df55ba1718ba/schema)
