# Elastic Alerts & Cases API

**URL:** https://discuss.elastic.co/t/elastic-alerts-cases-api/361092
**Category:** Elastic Security
**Created:** [June 9, 2024, 7:10am UTC](https://discuss.elastic.co/t/elastic-alerts-cases-api/361092 "2024-06-09T07:10:32Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![hal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hal/32/135151_2.png) [@hal](https://discuss.elastic.co/u/hal)
#### Post date: [June 9, 2024, 7:10am UTC](https://discuss.elastic.co/t/elastic-alerts-cases-api/361092/1 "2024-06-09T07:10:32Z")

</div>

is there a way to add alerts to a case using api?

I asked chatgpt and it gave me this:

POST /api/cases/{case\_id}/alerts  
{  
"alerts": [  
{  
"id": "alert\_id\_1",  
"index": "index\_name\_1"  
},  
{  
"id": "alert\_id\_2",  
"index": "index\_name\_2"  
}  
]  
}

did not found it in the official documentation and also did not work

---

<div class="post-metadata">

### Author: ![georgii](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/georgii/32/78076_2.png) [@georgii](https://discuss.elastic.co/u/georgii)
#### Post date: [June 10, 2024, 9:38am UTC](https://discuss.elastic.co/t/elastic-alerts-cases-api/361092/2 "2024-06-10T09:38:50Z")

</div>

Welcome to the community @hal 👋

An alert can be attached to a case via the [Add comment to case API](https://www.elastic.co/guide/en/kibana/8.14/cases-api-add-comment.html).

---

<div class="post-metadata">

### Author: ![hal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hal/32/135151_2.png) [@hal](https://discuss.elastic.co/u/hal)
#### Post date: [June 17, 2024, 6:45am UTC](https://discuss.elastic.co/t/elastic-alerts-cases-api/361092/3 "2024-06-17T06:45:41Z")

</div>

Thanks Georgii, the comment seems to add one alert to a case, how can I add multiple alerts to a case ?

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [July 15, 2024, 6:45am UTC](https://discuss.elastic.co/t/elastic-alerts-cases-api/361092/4 "2024-07-15T06:45:47Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
