List files
Returns a cursor-paginated list of files in the bucket. Use prefix to scope
to a folder-style path (e.g. images/). The bucket must be active.
Path parameters
| Name | Type | Default | Description |
|---|---|---|---|
| bucketIdrequired | string | — | The bucket to list files from. |
Query parameters
| Name | Type | Default | Description |
|---|---|---|---|
| prefix | string | — | Only include files whose key starts with this prefix (e.g. `images/`). |
| cursor | string | — | Pagination cursor returned in `meta.nextCursor` from a previous request. Omit to start from the first page. |
| limit | number | 100 | Page size. Range 1–1000. |
Example request
import { Buckt } from "@buckt/sdk";
const client = new Buckt({ apiKey: process.env.BUCKT_API_KEY });
const { data, meta } = await client.files.list(
"bkt_01H8XYZABCDEFGHJKMNPQRSTVW",
{ prefix: "images/", limit: 100 }
);Responses
{
"data": [
{
"object": "file",
"id": "images/hero.png",
"key": "images/hero.png",
"size": 184321,
"lastModified": "2026-04-22T08:15:00Z"
},
{
"object": "file",
"id": "images/logo.png",
"key": "images/logo.png",
"size": 24531,
"lastModified": "2026-04-25T11:30:00Z"
}
],
"error": null,
"meta": {
"nextCursor": "1h0aHIvbG9nby5wbmc=",
"limit": 100
}
}