For the complete documentation index, see llms.txt. This page is also available as Markdown.

Conversation Attachment Management API

Use the file library API to query and delete conversation attachments, and understand list visibility and expiration fields.

Use the conversation attachment API when you need to query conversation attachments. The list excludes attachments directly linked to file library files. Automatic archiving creates separate file library entries, so the original conversation attachments may still appear in this list. Do not determine whether a file has been archived solely by whether its attachment appears in the list. For how to upload attachments, see Presigned File Upload Mode.

Access Requirements and Visibility

Authenticate with Authorization: Api-Key <your API key>. For how to obtain a key, see Quickstart. The organization must have the file library enabled, and the caller must have the relevant file library permissions. Organization owners can view conversation attachments in their organization that meet the conditions above. Other members can view attachments only from conversations in which they have sent a message. The list is sorted by creation time, newest first.

Endpoints

GET /api/v1/file-library/conversation-attachments/ lists conversation attachments visible to the caller, and DELETE /api/v1/file-library/conversation-attachments/{id}/ deletes one attachment. For parameters and response fields, see the API documentation for List Conversation Attachments and Delete a Conversation Attachment.

{id} is the attachment ID returned by the list. Deletion also removes the stored file if it is not shared, so confirm the selected attachment first. If another attachment or file still uses the same storage object, that object is retained.

Pagination and List Fields

The default page size is 20 items. Use pageSize (or page_size) to adjust it, up to 100 items. Attachments are returned in results. Keep following the next URL to retrieve subsequent pages until next is null; do not read only the first page.

For the fields of each attachment, see the API documentation for List Conversation Attachments. Integrations can use conversationId to identify the source conversation. expiresAt is the expiration time calculated from the cleanup settings, represented as an ISO 8601 string (unlike the millisecond timestamp in createdAt). It is null when no effective cleanup time has been configured. If the conversation has a last-message time, expiration is based on that time; otherwise, it is based on the attachment's creation time.

Last updated

Was this helpful?