Skip to main content
PUT
/
medias
/
delete-files
Bulk Delete / Trash Files or Folders
curl --request PUT \
  --url https://services.leadconnectorhq.com/medias/delete-files \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "filesToBeDeleted": [
    {
      "_id": "686f630df0d3166d68fbcec2"
    }
  ],
  "altType": "location",
  "altId": "sx6wyHhbFdRXh302LLNR",
  "status": "deleted"
}
'

Authorizations

Authorization
string
header
required

Use the Access Token generated with user type as Sub-Account (OR) Private Integration Token of Sub-Account

Headers

Authorization
string

Access Token

Example:

"Bearer 9c48df2694a849b6089f9d0d3513efe"

Body

application/json
filesToBeDeleted
object[]
required

Array of file objects to be deleted or trashed

Example:
[{ "_id": "686f630df0d3166d68fbcec2" }]
altType
enum<string>
required

Type of entity that owns the files

Available options:
location
Example:

"location"

altId
string
required

Location identifier

Example:

"sx6wyHhbFdRXh302LLNR"

status
enum<string>
required

Status to set for the files (deleted or trashed)

Available options:
deleted,
trashed
Example:

"deleted"

Response

200 - application/json

Successful response

Last modified on March 4, 2026