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

# Rename attachment

Availability: 9.2+

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

## Paths

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

- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/kibana/v9/authentication#apikeyauth)
- [Basic auth](/elastic/docs-builder/docs/4371/api/doc/kibana/v9/authentication#basicauth)

#### Path Parameters

- `conversation_id` (string)
  The unique identifier of the conversation.
- `attachment_id` (string)
  The unique identifier of the attachment to rename.

## Description

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

Rename an attachment without creating a new version.<br/><br/>[Required authorization] Route required privileges: agentBuilder:read.

## Request Body

`application/json`

- `description` (string) — required
  The new description/name for the attachment.

## Response

Indicates a successful response

## Code Examples

#### Console

```console
PATCH /api/agent_builder/conversations/{conversation_id}/attachments/{attachment_id}
{
  "description": "Updated attachment name"
}
```

#### curl

```curl
curl -X PATCH "https://{kibana_url}/api/agent_builder/conversations/{conversation_id}/attachments/{attachment_id}" \
  -H "kbn-xsrf: true" \
  -H "Content-Type: application/json" \
  -d '{
  "description": "Updated attachment name"
}'
```

## Response Examples

#### Rename attachment response

Example response returning the renamed attachment (version unchanged)

```json
{
  "attachment": {
    "active": true,
    "current_version": 1,
    "description": "Updated attachment name",
    "id": "att-abc123",
    "type": "text",
    "versions": [
      {
        "content_hash": "sha256-xyz",
        "created_at": "2025-01-06T10:00:00.000Z",
        "data": "Content remains the same",
        "estimated_tokens": 10,
        "version": 1
      }
    ]
  },
  "success": true
}
```

