# Retrieve a file

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

Operation ID: `files.get` · API v3

Retrieves a file by its public ID, including its content type and SHA-256 checksum.

Required permissions: `files.read`.

## Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `file_id` | path | string | yes |  |

## Responses

### 200

Returns the requested file.

Body: `data`: 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 |  |

### 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.

### 404

The file was not found or is not accessible with the current credentials.

Body: Error.

### 503

The storage service is temporarily unavailable.

Body: Error.

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