# Annotation API in elasticsearch in kibana for transactions

**URL:** <https://discuss.elastic.co/t/annotation-api-in-elasticsearch-in-kibana-for-transactions/360398>\
**Category:** Kibana\
**Tags:** elastic-stack-monitoring, elastic-stack-security, kql-kibana-query-language\
**Created:** [May 28, 2024, 4:08pm UTC](https://discuss.elastic.co/t/annotation-api-in-elasticsearch-in-kibana-for-transactions/360398 "2024-05-28T16:08:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![navya\_k](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/navya_k/32/127091_2.png) [@navya\_k](https://discuss.elastic.co/u/navya_k)\
**Post date:** [May 28, 2024, 4:08pm UTC](https://discuss.elastic.co/t/annotation-api-in-elasticsearch-in-kibana-for-transactions/360398/1 "2024-05-28T16:08:38Z")

</div>

Need help on Annotation API on transactions in Elasticsearch. I have tried to create for one of my .Net service below is the code I run in kibana dev tools:

```auto
POST /api/apm/service/1ACT/annotation
{
-H 'Content-Type: application/json' \
-H 'kbn-xsrf: true' \
-H 'Authorization: Basic ${API_KEY}' \ 
-d '{
      "@timestamp": "2024-05-10 12:00:00", 
      "service": {
        "version": "1.2" 
      },
      "message": "Deployment of 1.2" 
    }'
}

Error:
Error code 400,
Bad request.

I have tried without braces after post and by adding kbn:/api/APM/service/annotation. Still no use.
Please help out how to resolve this issue
```

---

<div class="post-metadata">

**Author:** ![navya\_k](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/navya_k/32/127091_2.png) [@navya\_k](https://discuss.elastic.co/u/navya_k)\
**Post date:** [May 29, 2024, 5:03pm UTC](https://discuss.elastic.co/t/annotation-api-in-elasticsearch-in-kibana-for-transactions/360398/2 "2024-05-29T17:03:34Z")

</div>

Here, we trying to annotate as per deployment date. But what ever I tried it's still has bad request error. Could some one help here ? What's the wrong I am giving in post syntax ?

---

<div class="post-metadata">

**Author:** ![navya\_k](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/navya_k/32/127091_2.png) [@navya\_k](https://discuss.elastic.co/u/navya_k)\
**Post date:** [May 30, 2024, 5:06pm UTC](https://discuss.elastic.co/t/annotation-api-in-elasticsearch-in-kibana-for-transactions/360398/3 "2024-05-30T17:06:02Z")

</div>

Can someone help here ?
