# Delete a file div strong 🔨 In Development — This section is still being developed and may change. Permanently delete a file from an organization. Permanently removes a file from storage. Files attached to vector stores will be automatically removed from those stores. #### Path Parameters **`organization_id`** string required The unique identifier of the organization. **`file_id`** string required The unique identifier of the file to delete. ## Returns A deletion confirmation response. Request ```bash curl -X DELETE "https://api.freddy.aitronos.com/v1/organizations/org_abc123/files/file_abc123" \ -H "X-API-Key: $FREDDY_API_KEY" ``` ```python from freddy import FreddyClient with FreddyClient(api_key="your-api-key") as client: result = client.files.delete( organization_id="org_abc123", file_id="file_abc123" ) print(f"Deleted: {result.deleted}") print(f"File ID: {result.id}") ``` ```python import requests response = requests.delete( "https://api.freddy.aitronos.com/v1/organizations/org_abc123/files/file_abc123", headers={"X-API-Key": api_key} ) result = response.json() print(f"Deleted: {result['deleted']}") ``` ## Response 200 OK ```json { "id": "file_abc123", "deleted": true } ``` Errors **404 Not Found** ```json { "error": { "message": "File not found", "type": "not_found_error", "code": "file_not_found" } } ``` **401 Unauthorized** ```json { "error": { "message": "Authentication required", "type": "authentication_error", "code": "missing_authentication" } } ``` **403 Forbidden** ```json { "error": { "message": "Cannot delete file - insufficient permissions", "type": "permission_error", "code": "insufficient_permissions" } } ``` ## Related Resources - [Upload File](/docs/api-reference/files/upload) - [List Files](/docs/api-reference/files/list) - [Retrieve File](/docs/api-reference/files/retrieve) - [File Object](/docs/api-reference/objects/file-object)