Conversation Attachment Management API
Use the File Library API to list and delete conversation attachments, and understand list visibility and expiration fields.
Use the conversation attachment API 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 attachment uploads, see Presigned File Upload Mode.
Access Requirements and Visibility
Authenticate with Authorization: Api-Key <your API key>; see Quick Start for how to obtain a key. Your 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 only view attachments from conversations in which they have sent messages. The list is sorted by creation time, newest first.
Endpoints
GET
/api/v1/file-library/conversation-attachments/
List conversation attachments visible to the caller
DELETE
/api/v1/file-library/conversation-attachments/{id}/
Delete the attachment; the stored file is also removed if it is not shared
{id} is the attachment ID returned in the list. Confirm the selected attachment before deleting it. If another attachment or file still uses the same storage object, that object is retained.
Pagination and List Fields
The list defaults to 20 entries per page. Use page_size to adjust this, up to 100 entries. Attachments appear in the response's results. Continue fetching the next page using the next URL until next is null; do not read only the first page.
Each attachment includes id, filename, file_size, type, conversation_id, expires_at, and created_at. Integrations can use conversation_id to identify the originating conversation. expires_at is the expiration time calculated from the cleanup settings; it is null if no cleanup effective time is configured. If the conversation has a last message timestamp, the expiration time is based on that timestamp; otherwise, it is based on the attachment's creation time.
Last updated
Was this helpful?