# Delete a file

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

Operation ID: `files.delete` · API v3

Permanently deletes the file from storage and removes it from the account's file inventory. The file is not moved to the trash and cannot be restored.

If the storage service is unavailable, the file is not deleted and the request can be retried.

The `Idempotency-Key` header is optional for this operation.

Required permissions: `files.write`.

## Parameters

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

## Responses

### 204

The file was deleted successfully.

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