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.
Path parameters
-
The unique identifier of the conversation.
-
The unique identifier of the attachment to update.
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
Update attachment content example
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
}