# List files

`GET https://api.cademi.com.br/api/v3/files`

Operation ID: `files.list` · API v3

Lists the files stored in the current account, using cursor-based pagination.

The collection can be filtered by purpose and by creation date range.

Required permissions: `files.read`.

## Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `limit` | query | integer | no |  |
| `cursor` | query | string | no |  |
| `sort` | query | string, one of `created_at`, `-created_at` | no |  |
| `purpose` | query | string | no |  |
| `created_after` | query | string (date-time) | no |  |
| `created_before` | query | string (date-time) | no |  |

## Responses

### 200

Returns a page of files.

Body: `data`: array of File.

Fields of File:

| Field | Type | Required | Description |
|---|---|---|---|
| `checksum` | object | yes |  |
| `content_type` | string or null | yes |  |
| `created_at` | string (date-time) | yes |  |
| `extension` | string or null | yes |  |
| `filename` | string | yes |  |
| `id` | string | yes | Public ID of the file, prefixed with file_. |
| `object` | string, one of `file` | yes |  |
| `purpose` | string or null | yes |  |
| `size_bytes` | integer or null | yes |  |
| `status` | string, one of `ready` | yes |  |

### 400

The cursor is invalid or the request contains an unsupported query parameter.

Body: Error.

### 401

The credential is missing, malformed, expired, or revoked.

Body: Error.

### 403

The current credentials do not have the permission required by this operation.

Body: Error.

### 422

The request body or query parameters failed validation.

Body: ValidationFailed.

Full schema: https://cademi.dev/openapi/v3.json
