Limai Docs
API ReferenceBuckets

Download

Get a download URL for a bucket file

GET/api/v1/buckets/{bucketId}/files/{fileId}/download

Returns a presigned download URL for a file in a bucket. The URL expires after 1 hour.

Parameters

NameTypeInRequiredDescription
bucketIdstringpathYesThe bucket ID
fileIdstringpathYesThe 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"
}