Skip to content

Move Item

Move one or many items elsewhere within File Request.

Endpoint

http
POST /api/v1/requests/{file_request_id}/moves

Parameters

Path parameters

ParameterTypeRequiredDescription
file_request_idstringyes-

Body parameters

ParameterTypeRequiredDescription
to_iduuid-The id of the parent folder, there the items move. If null, then the items will be moved into the home location
itemsarrayyesThe array of the items
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 POST 'https://files.ro/api/v1/requests/{file_request_id}/moves' \
--header 'Content-Type: application/json' \
--data-raw '{
  "to_id": "{folder_id}",
  "items": [
    {
      "type": "file",
      "id": "{item_id}"
    }
  ]
}'

Response

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