---
title: "List files and directories in project storage"
method: GET
path: "/api/storage/{project_id}/list"
tags: ["Storage"]
---

# List files and directories in project storage

`GET /api/storage/{project_id}/list`

## Request

- Base URL: `https://core.blink.new`
- URL: `https://core.blink.new/api/storage/{project_id}/list`
- Auth: HTTP bearer

Returns files and directories at the given path level within the project's
storage bucket. Uses a directory delimiter so only items at the specified
depth are returned (non-recursive). Both file objects and directory prefixes
are included in the response array.

Response format is compatible with the Supabase Storage `list` API.

**Server only**: requires the project's secret key (or service token). End-user
tokens and publishable keys get 403 — listing would hand every user's file URLs to any visitor.

## Path parameters

- `project_id` string, required

## Query parameters

- `path` string
- `limit` integer
- `offset` integer
- `search` string

## Response `200`

List of files and directories at the given path

- StorageResponse
  - `data` union
    - FileObject
      - `id` string, uuid
      - `name` string
      - `bucket_id` string
      - `owner` string, nullable
      - `owner_id` string, nullable
      - `version` string, nullable
      - `created_at` string, date-time
      - `updated_at` string, date-time
      - `last_accessed_at` string, date-time
      - `metadata` object
        - `size` integer
        - `mimetype` string
        - `cacheControl` string
      - `user_metadata` object
    - FileObject[]
      - `id` string, uuid
      - `name` string
      - `bucket_id` string
      - `owner` string, nullable
      - `owner_id` string, nullable
      - `version` string, nullable
      - `created_at` string, date-time
      - `updated_at` string, date-time
      - `last_accessed_at` string, date-time
      - `metadata` object
        - `size` integer
        - `mimetype` string
        - `cacheControl` string
      - `user_metadata` object
    - object
  - `error` object, nullable
    - `message` string
    - `statusCode` string

## Other responses

- `400`: Missing project ID
- `401`: Authentication required or invalid API key
- `403`: Caller is not the project's server (code STORAGE_SERVER_ONLY)
- `500`: Storage error

---

[API](https://skmtc.dev/blink/apis/blink-apis.md) - [All operations](https://skmtc.dev/blink/apis/blink-apis/llms.txt) - [OpenAPI document](https://skmtc.dev/blink/apis/blink-apis/revisions/4c59c706078e?raw)
