Update conversation attachment Technical Preview; added in 9.2.0

PUT /api/agent_builder/conversations/{conversation_id}/attachments/{attachment_id}

Spaces method and path for this operation:

put /s/{space_id}/api/agent_builder/conversations/{conversation_id}/attachments/{attachment_id}

Refer to Spaces for more information.

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

[Required authorization] Route required privileges: read_agent_builder.

Headers

  • kbn-xsrf string Required

    A required header to protect against CSRF attacks

Path parameters

  • conversation_id string Required

    The unique identifier of the conversation.

  • attachment_id string Required

    The unique identifier of the attachment to update.

application/json

Body

  • description string

    Optional new description for the attachment.

Responses

  • 200 application/json

    Indicates a successful response

PUT /api/agent_builder/conversations/{conversation_id}/attachments/{attachment_id}
curl \
 --request PUT 'https://localhost:5601/api/agent_builder/conversations/{conversation_id}/attachments/{attachment_id}' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --header "kbn-xsrf: true" \
 --data '{"data":"This is the updated content"}'
Request examples
Example request for updating attachment content
{
  "data": "This is the updated content"
}
Example request for updating both content and description
{
  "data": "New content version",
  "description": "Updated meeting notes - v2"
}
Response examples (200)
Example response returning the updated attachment with new version
{
  "attachment": {
    "id": "att-abc123",
    "type": "text",
    "active": true,
    "versions": [
      {
        "data": "Original content",
        "version": 1,
        "created_at": "2025-01-06T10:00:00.000Z",
        "content_hash": "sha256-abc",
        "estimated_tokens": 10
      },
      {
        "data": "This is the updated content",
        "version": 2,
        "created_at": "2025-01-06T11:00:00.000Z",
        "content_hash": "sha256-def",
        "estimated_tokens": 12
      }
    ],
    "description": "Meeting notes",
    "current_version": 2
  },
  "new_version": 2
}