Skip to content

Delete Item

Delete one or many files or folders within File Request.

Endpoint

http
DELETE /api/v1/requests/{file_request_id}/items

Parameters

Path parameters

ParameterTypeRequiredDescription
file_request_idstringyes-

Body parameters

ParameterTypeRequiredDescription
itemsarrayyesThe array of the items
items.*.force_deletebooleanyesDetermine how to delete the item. If value is set to yes, then the item will be immediately deleted from the database and storage. If false, the item will be softly deleted.
items.*.typestringyesThe type of the deleting item. Allowed types are folder or file.
items.*.iduuidyesThe ID of the item.

Request example

sh
curl --location --request DELETE 'https://files.ro/api/v1/requests/{file_request_id}/items' \
--header 'Content-Type: application/json' \
--data-raw '{
  "items": [
    {
      "force_delete": false,
      "type": "image",
      "id": "{item_id}"
    }
  ]
}'

Response

json
{
  "type": "success",
  "message": "Items was successfully deleted."
}
json
{
  "type": "error",
  "message": "Access Denied"
}
json
{
  "message": "The given data was invalid.",
  "errors": {
    "field": [
      "The field is required."
    ]
  }
}