API ReferenceBuckets
Download
Get a download URL for a bucket file
GET
/api/v1/buckets/{bucketId}/files/{fileId}/downloadReturns a presigned download URL for a file in a bucket. The URL expires after 1 hour.
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
bucketId | string | path | Yes | The bucket ID |
fileId | string | path | Yes | The file ID |
Request
const res = await fetch(
"https://app.limai.io/api/v1/buckets/bkt_abc123/files/file_001/download",
{
headers: {
Authorization: "Bearer YOUR_API_TOKEN",
},
}
);
const { url, fileName } = await res.json();Response
Response200
{
"url": "https://s3.amazonaws.com/...presigned-download-url...",
"fileName": "invoice_2025.pdf"
}