---
type: api
title: Get conversation attachment
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana-serverless/operation/operation-get-agent-builder-conversations-conversation-id-attachments-attachment-id
resource: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana-serverless/operation/operation-get-agent-builder-conversations-conversation-id-attachments-attachment-id
products:
  - Kibana
---

# Get conversation attachment

Availability: Experimental

- Server: `https://{kibana_url}`

## Paths

- `GET` `/api/agent_builder/conversations/{conversation_id}/attachments/{attachment_id}`
- `GET` `/s/{space_id}/api/agent_builder/conversations/{conversation_id}/attachments/{attachment_id}`

#### Path parameters

- `conversation_id` (string · max length: 256) — required
  The unique identifier of the conversation.
- `attachment_id` (string · max length: 256) — required
  The unique identifier of the attachment.

## Description

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

Get a single attachment by ID for a conversation.

## Required authorization

- Privileges: `agentBuilder:read`

## Authentication

- Api key: `Authorization: <value>`
  You must create an API key and use the encoded value in the request header. To learn about creating keys, go to [API keys](https://www.elastic.co/docs/current/serverless/api-keys).

## Response

Indicates a successful response

`application/json`

## Code examples

#### Console

```console
GET kbn:/api/agent_builder/conversations/CONVERSATION_ID/attachments/ATTACHMENT_ID
```

#### curl

```curl
curl -X GET "${KIBANA_URL}/api/agent_builder/conversations/${CONVERSATION_ID}/attachments/${ATTACHMENT_ID}" \
  -H "Authorization: ApiKey ${API_KEY}"
```

## Response examples

#### Get attachment response

Example response containing a single attachment

```json
{
  "attachment": {
    "active": true,
    "current_version": 1,
    "description": "My text file",
    "id": "attachment-1",
    "type": "text",
    "versions": [
      {
        "content_hash": "abc123",
        "created_at": "2025-01-01T10:00:00.000Z",
        "data": "File content",
        "estimated_tokens": 2,
        "version": 1
      }
    ]
  }
}
```

