BucktDocs

List files

GET/v1/buckets/{bucketId}/filesfiles:readSDK: files.list

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

NameTypeDefaultDescription
bucketIdrequiredstringThe bucket to list files from.

Query parameters

NameTypeDefaultDescription
prefixstringOnly include files whose key starts with this prefix (e.g. `images/`).
cursorstringPagination cursor returned in `meta.nextCursor` from a previous request. Omit to start from the first page.
limitnumber100Page 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
  }
}