---
title: "Create conversation attachment"
method: POST
path: "/api/agent_builder/conversations/{conversation_id}/attachments"
tags: ["agent builder"]
---

# Create conversation attachment

`POST /api/agent_builder/conversations/{conversation_id}/attachments`

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

<div><span class="operation-verb post">post</span>&nbsp;<span class="operation-path">/s/{space_id}/api/agent_builder/conversations/{conversation_id}/attachments</span></div>

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

Create a new attachment for a conversation with version tracking.<br/><br/>[Required authorization] Route required privileges: agentBuilder:read.

## Path parameters

- `conversation_id` string, required

## Headers

- `kbn-xsrf` string, required

## Request body

- object
  - `data` unknown, required
  - `description` string — Human-readable description of the attachment.
  - `hidden` boolean — Whether the attachment should be hidden from the user.
  - `id` string — Optional custom ID for the attachment.
  - `origin` string — Origin string (for example, saved object ID) for by-reference attachments. When provided without data, the content is resolved once at creation time.
  - `type` string, required — The type of the attachment (e.g., text, esql, visualization).

## Response `200`

Indicates a successful 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)
