Soft-deletes or trashes multiple files and folders in a single request

http
PUT https://services.leadconnectorhq.com/medias/delete-files

Authorization

NameTypeRequiredExampleDescription
AuthorizationstringYesBearer token generated from the Leadway portal. See Authentication.
VersionstringYes2021-07-28API version.

Body

  • filesToBeDeleted (object[], required): Array of file objects to be deleted or trashed

    • _id (string, required): Unique identifier of the file or folder to be deleted Example: 686f630df0d3166d68fbcec2

NameTypeRequiredExampleDescription
altTypestringYesaccountType of entity that owns the files Possible values: 'account'
altIdstringYessx6wyHhbFdRXh302LLNRAccount identifier
statusstringYesdeletedStatus to set for the files (deleted or trashed) Possible values: 'deleted', 'trashed'

Responses

200 - Successful response
json
[
  {
    "deleted": true,
    "id": "686f630df0d3166d68fbcec2"
  }
]

Example

curl -X PUT 'https://services.leadconnectorhq.com/medias/delete-files' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Version: 2021-07-28' \
  -H 'Content-Type: application/json' \
  -d '{
  "filesToBeDeleted": [
    {
      "_id": "686f630df0d3166d68fbcec2"
    }
  ],
  "altType": "account",
  "altId": "sx6wyHhbFdRXh302LLNR",
  "status": "deleted"
}'

Last updated October 26, 2026

Was this page helpful?