Returns all file uploads attached to a chat, with freshly generated presigned download URLs.
Presigned URLs expire after 1 hour. Call this endpoint again to obtain new URLs when needed.
Bearer token obtained from the authenticate endpoint.
Unique identifier of the chat whose uploads to list.
Response
The chat ID the uploads belong to.
List of uploads for this chat.
Unique identifier for the upload.
MIME type of the uploaded file.
Either "document" or "image".
Temporary download URL for the file. Expires after 1 hour.
ISO 8601 timestamp when the upload was created.
ID of the chat message this upload is attached to. null if the upload has not yet been linked to a message via upload_ids.
curl -X GET https://api.trellis.sh/v1/chats/chat_abc123/uploads \
-H "Authorization: Bearer YOUR_TOKEN"
{
"chat_id": "chat_abc123",
"uploads": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"filename": "report.pdf",
"mime_type": "application/pdf",
"file_size": 245760,
"upload_type": "document",
"presigned_url": "https://s3.amazonaws.com/...",
"created_at": "2025-06-15T09:30:00Z",
"message_id": "msg_abc123"
},
{
"id": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
"filename": "photo.png",
"mime_type": "image/png",
"file_size": 512000,
"upload_type": "image",
"presigned_url": "https://s3.amazonaws.com/...",
"created_at": "2025-06-15T09:31:00Z",
"message_id": "msg_abc123"
}
]
}