curl --request POST \
--url https://api.zerodrive.dev/v1/files/move \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"source": "<string>",
"destination": "<string>",
"resume": true,
"after": "<string>",
"client": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
source: '<string>',
destination: '<string>',
resume: true,
after: '<string>',
client: '<string>'
})
};
fetch('https://api.zerodrive.dev/v1/files/move', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.zerodrive.dev/v1/files/move"
payload = {
"source": "<string>",
"destination": "<string>",
"resume": True,
"after": "<string>",
"client": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"ok": true,
"source": "<string>",
"destination": "<string>",
"kind": "file",
"shares_followed": 123,
"references_checked": true,
"replaced": true,
"done": true,
"moved": 123,
"skipped": 123,
"next": "<string>",
"resume": true
}Move or Rename File or Folder
Move or rename a file or a folder within the vault. A shared item keeps its share link, its setting and its people at the new path. A file moved onto an existing file replaces it and the answer says replaced. A folder is never moved onto something that exists (409). A folder moves in steps of up to 200 files a call: while the answer says done false, call again with resume true and after set to the answer’s next.
curl --request POST \
--url https://api.zerodrive.dev/v1/files/move \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"source": "<string>",
"destination": "<string>",
"resume": true,
"after": "<string>",
"client": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
source: '<string>',
destination: '<string>',
resume: true,
after: '<string>',
client: '<string>'
})
};
fetch('https://api.zerodrive.dev/v1/files/move', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.zerodrive.dev/v1/files/move"
payload = {
"source": "<string>",
"destination": "<string>",
"resume": True,
"after": "<string>",
"client": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"ok": true,
"source": "<string>",
"destination": "<string>",
"kind": "file",
"shares_followed": 123,
"references_checked": true,
"replaced": true,
"done": true,
"moved": 123,
"skipped": 123,
"next": "<string>",
"resume": true
}Authorizations
Body
Response
Moved. Always ok, source and destination; also kind (file or folder), shares_followed (share rows that followed the item), move_id (the id of this move in the history, or null when none was written), references_checked (false: a move never looks for files that name the old path; call POST /v1/files/references to look), replaced (true only when a file was replaced) and, for a folder, done, moved, skipped and, while done is false, next and resume true.

