cases
Create a case attachment
Spaces method and path for this operation:
<div><span class="operation-verb post">post</span> <span class="operation-path">/s/{space_id}/api/cases/{caseId}/attachments</span></div>Refer to Spaces for more information.
Adds a single attachment, such as a comment or an alert, to a case. You must have all privileges for the Cases feature in the Management, Observability, or Security section of the Kibana feature privileges, depending on the owner of the case. NOTE: Each case can have a maximum of 1,000 alerts.
post/api/cases/{caseId}/attachments
Request
- Base URLhttps://localhost:5601
- URLhttps://localhost:5601/api/cases/{caseId}/attachments
- Auth
- API key in header Authorization
- or HTTP basic
Path parameters
caseIdstring required
Example:9c235210-6834-11ea-a78c-6ffb38a34414
The identifier for the case. To retrieve case IDs, use the search cases (_find) API. All non-ASCII characters must be URL encoded.
Headers
kbn-xsrfstring required
Cross-site request forgery protection
Request body
Example request
{
"data": {
"content": "A new comment."
},
"owner": "cases",
"type": "comment"
}Response
Indicates a successful call. Returns the new attachment, or the existing one if the alert or event was already attached.
Example response
{
"created_at": "2026-09-30T09:16:17.416Z",
"created_by": {
"profile_uid": "u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0",
"username": "elastic"
},
"data": {
"content": "A new comment."
},
"id": "71ec1870-725b-11ea-a0b2-c51ea50a58e2",
"owner": "cases",
"pushed_by": {
"profile_uid": "u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0",
"username": "elastic"
},
"type": "comment",
"updated_by": {
"profile_uid": "u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0",
"username": "elastic"
},
"version": "WzIwNDMxLDFd"
}Changes
No operation changes recorded.