---
type: api
title: Update conversation attachment
description: Update an attachment content. Creates a new version if content changed.<br/><br/>[Required authorization] Route required privileges: agentBuilder:read.
url: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana/v0/operation/operation-put-agent-builder-conversations-conversation-id-attachments-attachment-id
resource: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana/v0/operation/operation-put-agent-builder-conversations-conversation-id-attachments-attachment-id
products:
  - Kibana
---

# Update conversation attachment

Availability: Experimental since 9.2

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

## Paths

- `PUT` `/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 to update.

## Description

Update an attachment content. Creates a new version if content changed.

## Required authorization

- Privileges: `agentBuilder:read`

## Authentication

- Api key: `Authorization: <value>`
  These APIs use key-based authentication. You must create an API key and use the encoded value in the request header. For example: `Authorization: ApiKey base64AccessApiKey`
- Basic: `Authorization: Basic <credentials>`

## Header parameters

- `kbn-xsrf` (string) — required
  A required header to protect against CSRF attacks

## Request body

`application/json`

- `data` (object) — required
  The new attachment data/content.
- `description` (string · max length: 2048) — optional
  Optional new description for the attachment.
- `render_inline` (boolean · default: false) — optional
  When true, the attachment is rendered inline in the UI when the conversation is opened, without the agent referencing it.

## Response

Indicates a successful response

`application/json`

## Code examples

#### Console

```console
PUT kbn:/api/agent_builder/conversations/CONVERSATION_ID/attachments/ATTACHMENT_ID
{
  "data": "This is the updated content"
}
```

#### curl

```curl
curl -X PUT "${KIBANA_URL}/api/agent_builder/conversations/${CONVERSATION_ID}/attachments/${ATTACHMENT_ID}" \
  -H "kbn-xsrf: true" \
  -H "Authorization: ApiKey ${API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "data": "This is the updated content"
  }'
```

## Response examples

#### Update attachment response

Example response returning the updated attachment with new version

```json
{
  "attachment": {
    "active": true,
    "current_version": 2,
    "description": "Meeting notes",
    "id": "att-abc123",
    "type": "text",
    "versions": [
      {
        "content_hash": "sha256-abc",
        "created_at": "2025-01-06T10:00:00.000Z",
        "data": "Original content",
        "estimated_tokens": 10,
        "version": 1
      },
      {
        "content_hash": "sha256-def",
        "created_at": "2025-01-06T11:00:00.000Z",
        "data": "This is the updated content",
        "estimated_tokens": 12,
        "version": 2
      }
    ]
  },
  "new_version": 2
}
```

