curl --request POST \
--url https://api.zerodrive.dev/v1/duplicates/remove \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"scan_id": "<string>",
"groups": [
{
"keep": "<string>",
"remove": [
"<string>"
]
}
],
"confirm": "<unknown>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
scan_id: '<string>',
groups: [{keep: '<string>', remove: ['<string>']}],
confirm: '<unknown>'
})
};
fetch('https://api.zerodrive.dev/v1/duplicates/remove', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.zerodrive.dev/v1/duplicates/remove"
payload = {
"scan_id": "<string>",
"groups": [
{
"keep": "<string>",
"remove": ["<string>"]
}
],
"confirm": "<unknown>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)Remove the Extra Copies of Duplicate Files
Keeps one file of each group and removes the others, following the account’s web delete setting: Trash by default (the space comes back when Trash is emptied), or a real delete. The request must carry the person’s confirm: true when the setting is Trash, the word DELETE when it is Delete right away; otherwise the answer is 400 confirm_required with the mode. It never trusts the scan: each file is read again and an extra moves only when its size and content match the kept file’s. A request does a bounded amount of work: when the answer says done is false, repeat the call with groups.slice(next_group). Repeating a request is safe: removed files answer already_gone. This route is for the ZeroDrive apps and zd (a device token); an AI connector (an OAuth token) is refused with 403.
curl --request POST \
--url https://api.zerodrive.dev/v1/duplicates/remove \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"scan_id": "<string>",
"groups": [
{
"keep": "<string>",
"remove": [
"<string>"
]
}
],
"confirm": "<unknown>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
scan_id: '<string>',
groups: [{keep: '<string>', remove: ['<string>']}],
confirm: '<unknown>'
})
};
fetch('https://api.zerodrive.dev/v1/duplicates/remove', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.zerodrive.dev/v1/duplicates/remove"
payload = {
"scan_id": "<string>",
"groups": [
{
"keep": "<string>",
"remove": ["<string>"]
}
],
"confirm": "<unknown>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)Authorizations
Body
Response
done, mode, message, results (one for each group, with the status of each file), removed, shared_removed and next_group

