---
title: "Update Analysis Item Attachments"
method: PATCH
path: "/v1/convai/analysis-items/{analysis_item_id}/attachments"
tags: ["Agents Platform"]
---

# Update Analysis Item Attachments

`PATCH /v1/convai/analysis-items/{analysis_item_id}/attachments`

## Request

- Base URL: `https://api.elevenlabs.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.elevenlabs.io/v1/convai/analysis-items/{analysis_item_id}/attachments`
- Auth: none declared

Attach or detach one analysis item on multiple agent branches.

## Path parameters

- `analysis_item_id` string, required: ID of the requested analysis item.

## Headers

- `xi-api-key` string, nullable: Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.

## Request body

- UpdateAnalysisItemAttachmentsRequestModel
  - `source` 'user' | 'system', required
  - `attach` AnalysisItemAttachmentDestination[]
    - `agent_id` string, required
    - `branch_id` string, required
  - `detach` AnalysisItemAttachmentDestination[]
    - `agent_id` string, required
    - `branch_id` string, required

## Response `200`

Successful Response

- UpdateAnalysisItemAttachmentsResponseModel
  - `results` union[], required
    - union
      - BatchSuccessResponseModelAnalysisItemAttachmentResultData
        - `status` 'success', required
        - `data` AnalysisItemAttachmentResultData, required
          - `agent_id` string, required
          - `branch_id` string, required
          - `action` 'attach' | 'detach', required
          - `changed` boolean, required
      - BatchFailureResponseModel
        - `status` 'failure', required
        - `error_code` integer, required
        - `error_status` string, required
        - `error_message` string, required

## Other responses

- `422`: Validation Error

## Changes

- **2026-11-02** `79b03ec785e0`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/elevenlabs/apis/elevenlabs-api-documentation/changes/v1/convai/analysis-items/:analysis_item_id/attachments/patch.md)

---

[API](https://skmtc.dev/elevenlabs/apis/elevenlabs-api-documentation.md) - [All operations](https://skmtc.dev/elevenlabs/apis/elevenlabs-api-documentation/llms.txt) - [OpenAPI document](https://skmtc.dev/elevenlabs/apis/elevenlabs-api-documentation/revisions/1fbf939a1e97?raw)
