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 settings.
- If the
Block Message Deleting After (n) Minutesmessage setting has a non-zero value, thebypass-time-limit-edit-and-deletepermission is required to delete messages after the defined time limit. - In read-only rooms, the
post-readonlypermission is required to delete messages. - The
delete-own-messagepermission is required to delete users' own messages. - The
delete-messagepermission is required for users to delete messages from other users.
Changelog
| Version | Description |
|---|---|
| 8.2.0 | Added |
Header parameters
X-Auth-Token
stringRequired
The authToken of the authenticated user.
ExampleRScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f
X-User-Id
stringRequired
The userId of the authenticated user.
ExamplerbAXPnMktTFbNpwtJ
Body parameters
Example 1
{
"fileId": "699e6b8a8eddae7c5eaed9c3"
}object
fileId
string Required
Enter the file ID of the file that you want to delete. You can get this value from the Get Room Images endpoint.
Example699e6b8a8eddae7c5eaed9c3
Responses
200
OK
Example 1
{
"deletedFiles": [
"699e6b8a8eddae7c5eaed9c3",
"699e6b8b8eddae7c5eaed9c5"
],
"success": true
}object
deletedFiles
Array of string
string
success
boolean
400
Bad Request
Example 1
{
"success": false,
"errorType": "invalid-params",
"error": "must have required property 'fileId'"
}object
success
boolean
errorType
string
error
string
401
Unauthorized
Authorization Error
{
"status": "error",
"message": "You must be logged in to do this."
}object
status
string
message
string