---
title: "Delete Uploaded File"
slug: "delete-uploaded-file"
updated: 2026-06-08T12:46:40Z
published: 2026-06-08T12:46:40Z
---

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

Post/api/v1/uploads.delete

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](https://docs.rocket.chat/docs/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 |

Header parametersX-Auth-TokenstringRequired

The `authToken` of the authenticated user.

ExampleRScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f
X-User-IdstringRequired

The `userId` of the authenticated user.

ExamplerbAXPnMktTFbNpwtJ

Body parameters<select class='api-response-data' aria-label='Media type'><option value='d2b8542a-2977-45cf-9837-c62480b2e589'>application/json</option>
</select><select class='select-example' aria-label='Media type'><option value='5b5bb4c0-c627-4164-9301-faefdd591985'>Example 1</option>
</select>Example 1

```json
{
  "fileId": "699e6b8a8eddae7c5eaed9c3"
}
```

object  fileIdstring    Required

Enter the file ID of the file that you want to delete. You can get this value from the [Get Room Images](https://developer.rocket.chat/apidocs/get-room-images) endpoint.

Example699e6b8a8eddae7c5eaed9c3

Responses200

OK

<select class='api-response-data' aria-label='Media type'><option value='9c7d8725-646c-4074-90e6-dc08c0f8cbab'>application/json</option>
</select><select class='select-example' aria-label='Media type'><option value='9411e42f-3f33-40dc-b9b5-4b1b0ca8eb40'>Example 1</option>
</select>Example 1

```json
{
  "deletedFiles": [
    "699e6b8a8eddae7c5eaed9c3",
    "699e6b8b8eddae7c5eaed9c5"
  ],
  "success": true
}
```

object  deletedFiles Array of string   string    
successboolean    

400

Bad Request

<select class='api-response-data' aria-label='Media type'><option value='a9ee576b-d85f-4937-94d0-5adb85da9d9d'>application/json</option>
</select><select class='select-example' aria-label='Media type'><option value='20280608-4710-453c-ab89-94a5c8e31018'>Example 1</option>
</select>Example 1

```json
{
  "success": false,
  "errorType": "invalid-params",
  "error": "must have required property 'fileId'"
}
```

object  successboolean    
errorTypestring    
errorstring    

401

Unauthorized

<select class='api-response-data' aria-label='Media type'><option value='e1021a41-254e-49fb-a94f-ee1552d7eb09'>application/json</option>
</select><select class='select-example' aria-label='Media type'><option value='b0ec8ed5-8113-41ef-9868-ef5a92b1f8ba'>Authorization Error</option>
</select>Authorization Error

```json
{
  "status": "error",
  "message": "You must be logged in to do this."
}
```

object  statusstring    
messagestring
