# List files

```http
GET /projects/{project_reference}/files
```

List the files. Requires project.read.

## Parameters

| Name                | In    | Required | Description                                                                                                     |
| ------------------- | ----- | -------- | --------------------------------------------------------------------------------------------------------------- |
| `project_reference` | path  | Yes      | Project slug, UUID, or domain that identifies the project.                                                      |
| `ref`               | query |          |                                                                                                                 |
| `branch`            | query |          |                                                                                                                 |
| `branch_id`         | query |          |                                                                                                                 |
| `pattern`           | query |          | File pattern filter (for example, \*.tsx).                                                                      |
| `cursor`            | query |          | Opaque cursor pointing at the next page. Omit it to read the first page.                                        |
| `limit`             | query |          | Files per page. At most 100 when the listing includes content, and at most 1000 when `fields` excludes content. |
| `sort_by`           | query |          |                                                                                                                 |
| `sort_order`        | query |          |                                                                                                                 |
| `fields`            | query |          |                                                                                                                 |

## Responses

| Status | Description                                              |
| ------ | -------------------------------------------------------- |
| 200    | Paginated list of files with selectable response fields. |
| 400    | Bad request                                              |
| 401    | Unauthorized                                             |
| 403    | Forbidden - insufficient permissions                     |
| 404    | Not found                                                |
| 500    | Server error                                             |
