---
title: "Create a service annotation"
method: POST
path: "/api/apm/services/{serviceName}/annotation"
tags: ["APM annotations"]
---

# Create a service annotation

`POST /api/apm/services/{serviceName}/annotation`

**Spaces method and path for this operation:**

<div><span class="operation-verb post">post</span>&nbsp;<span class="operation-path">/s/{space_id}/api/apm/services/{serviceName}/annotation</span></div>

Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.

Create a new annotation for a specific service.

## Path parameters

- `serviceName` string, required

## Headers

- `elastic-api-version` '2023-10-31', required
- `kbn-xsrf` string, required

## Request body

- APMUICreateAnnotationObject
  - `@timestamp` string, required — The date and time of the annotation. It must be in ISO 8601 format.
  - `message` string — The message displayed in the annotation. It defaults to `service.version`.
  - `service` object, required — The service that identifies the configuration to create or update.
    - `environment` string — The environment of the service.
    - `version` string, required — The version of the service.
  - `tags` string[] — Tags are used by the Applications UI to distinguish APM annotations from other annotations. Tags may have additional functionality in future releases. It defaults to `[apm]`. While you can add additional tags, you cannot remove the `apm` tag.

## Response `200`

Annotation created successfully

- APMUICreateAnnotationResponse
  - `_id` string — Identifier
  - `_index` string — Index
  - `_source` object — Response
    - `@timestamp` string
    - `annotation` object
      - `title` string
      - `type` string
    - `event` object
      - `created` string
    - `message` string
    - `service` object
      - `environment` string
      - `name` string
      - `version` string
    - `tags` string[]

## Other responses

- `400` — Bad Request response
- `401` — Unauthorized response
- `403` — Forbidden response
- `404` — Not found response

---

[API](https://skmtc.net/elastic/apis/kibana-apis.md) · [All operations](https://skmtc.net/elastic/apis/kibana-apis/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/elastic/kibana-apis/versions/531c9e2a7d23/schema)
