> ## Documentation Index
> Fetch the complete documentation index at: https://docs.invaro.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete File

> Delete a file permanently

## Delete File

**DELETE** `/files/{file_id}`

Permanently delete a file from the system. This operation removes the file completely and cannot be undone.

### Features

* Permanently deletes the file
* File completely removed from system
* Cannot be undone - use with caution
* User ownership validation

### Parameters

| Parameter | Type   | Required | Description                             |
| --------- | ------ | -------- | --------------------------------------- |
| `file_id` | string | Yes      | Unique identifier of the file to delete |

### Request

```bash theme={null}
curl -X DELETE "https://api.invaro.ai/api/v1/files/72f574a0-b3d2-4a0f-8527-f542e6ea7500" \
  -H "Authorization: Bearer your_api_key"
```

### Response

```json theme={null}
{
  "success": true,
  "data": {
    "file_id": "72f574a0-b3d2-4a0f-8527-f542e6ea7500",
    "message": "File deleted successfully"
  }
}
```

### Response Fields

| Field     | Type   | Description            |
| --------- | ------ | ---------------------- |
| `file_id` | string | ID of the deleted file |
| `message` | string | Confirmation message   |

### Important Notes

* **Irreversible**: Deletion cannot be undone
* **Permanent Deletion**: File is completely removed from the system
* **No Recovery**: File cannot be recovered after deletion
* **Complete Removal**: All file data and metadata are permanently deleted

### Error Responses

* **404 Not Found**: File doesn't exist or user doesn't have access
* **409 Conflict**: File is already deleted
* **403 Forbidden**: User doesn't own the file

## Try It Out

Use the interactive playground above to test the delete file endpoint. You can:

1. **Add your API key** in the Authorization header
2. **Enter a file ID** in the path parameter (use a UUID from your uploaded files)
3. **Execute the request** to permanently delete the file

**⚠️ Warning**: This operation cannot be undone. The file will be permanently removed from the system.


## OpenAPI

````yaml DELETE /files/{file_id}
openapi: 3.0.0
info:
  title: Invaro Document Processing API
  description: API for processing bank statements and invoices using OCR and AI
  version: 1.0.0
  contact:
    name: Invaro Support
    email: support@invaro.ai
    url: https://docs.invaro.ai
servers:
  - url: https://api.invaro.ai/api/v1
    description: Production API
security:
  - bearerAuth: []
paths:
  /files/{file_id}:
    parameters:
      - name: file_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
        description: Unique identifier of the file
        example: 72f574a0-b3d2-4a0f-8527-f542e6ea7500
    delete:
      tags:
        - Files API
      summary: Delete File
      description: Soft delete a file (sets status to 'deleted')
      operationId: deleteFile
      responses:
        '200':
          description: File deleted successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: object
                    properties:
                      file_id:
                        type: string
                        example: 72f574a0-b3d2-4a0f-8527-f542e6ea7500
                      message:
                        type: string
                        example: File deleted successfully
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````