> ## Documentation Index > Fetch the complete documentation index at: https://developer.rocket.chat/llms.txt > Use this file to discover all available pages before exploring further. # Delete Uploaded File > Delete a specific file uploaded to a room. The response includes the list of files that were successfully removed. It may include additional files such as image thumbnails. Users can delete messages only in the following cases: * The **Allow Message Deleting** setting is enabled in the workspace's **Message** settings. * If the `Block Message Deleting After (n) Minutes` message setting has a non-zero value, the `bypass-time-limit-edit-and-delete` permission is required to delete messages after the defined time limit. * In read-only rooms, the `post-readonly` permission is required to delete messages. * The `delete-own-message` permission is required to delete users' own messages. * The `delete-message` permission is required for users to delete messages from other users. ### Changelog | Version | Description | | ------- | ----------- | | 8.2.0 | Added | ## OpenAPI ````json POST /api/v1/uploads.delete { "openapi": "3.0.0", "info": { "version": "1.0.0", "title": "Rooms" }, "servers": [ { "url": "https://apiexplorer.support.rocket.chat" } ], "tags": [ { "name": "Channels" }, { "name": "Directory" }, { "name": "Groups" }, { "name": "Rooms" }, { "name": "Teams" }, { "name": "Room Invites" }, { "name": "Subscriptions" }, { "name": "ABAC" } ], "paths": { "/api/v1/uploads.delete": { "post": { "summary": "Delete Uploaded File", "tags": [ "Rooms" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "deletedFiles": { "type": "array", "items": { "type": "string" } }, "success": { "type": "boolean" } } }, "examples": { "Example 1": { "value": { "deletedFiles": [ "699e6b8a8eddae7c5eaed9c3", "699e6b8b8eddae7c5eaed9c5" ], "success": true } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "errorType": { "type": "string" }, "error": { "type": "string" } } }, "examples": { "Example 1": { "value": { "success": false, "errorType": "error-invalid-params", "error": "must have required property 'fileId'" } } } } } }, "401": { "$ref": "#/components/responses/authorizationError" } }, "operationId": "post-api-v1-uploads.delete", "description": "Delete a specific file uploaded to a room. The response includes the list of files that were successfully removed. It may include additional files such as image thumbnails. \n\nUsers can delete messages only in the following cases:\n * The **Allow Message Deleting** setting is enabled in the workspace's **Message** settings.\n * If the `Block Message Deleting After (n) Minutes` message setting has a non-zero value, the `bypass-time-limit-edit-and-delete` permission is required to delete messages after the defined time limit.\n * In read-only rooms, the `post-readonly` permission is required to delete messages.\n * The `delete-own-message` permission is required to delete users' own messages.\n * The `delete-message` permission is required for users to delete messages from other users.\n\n ### Changelog\n | Version | Description |\n | ------- | ----------- |\n | 8.2.0 | Added |", "parameters": [ { "$ref": "#/components/parameters/Auth-Token" }, { "$ref": "#/components/parameters/UserId" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "fileId" ], "properties": { "fileId": { "type": "string", "description": "Enter the file ID of the file that you want to delete. You can get this value from the Get Room Images endpoint.", "example": "699e6b8a8eddae7c5eaed9c3" } } }, "examples": { "Example 1": { "value": { "fileId": "699e6b8a8eddae7c5eaed9c3" } } } } } } } } }, "components": { "responses": { "authorizationError": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "error": { "type": "string" } } }, "examples": { "Authorization Error": { "value": { "success": false, "error": "You must be logged in to do this." } } } } } } }, "parameters": { "Auth-Token": { "name": "X-Auth-Token", "in": "header", "description": "The `authToken` of the authenticated user.", "required": true, "schema": { "type": "string" }, "example": "RScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f" }, "UserId": { "name": "X-User-Id", "in": "header", "description": "The `userId` of the authenticated user.", "required": true, "schema": { "type": "string" }, "example": "rbAXPnMktTFbNpwtJ" } } } } ````