Trash copies of a page
const url = 'https://shareout.site/v1/workspaces/example/assets/duplicates/remove';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"keep":"example","remove":["example"],"confirm":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://shareout.site/v1/workspaces/example/assets/duplicates/remove \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "keep": "example", "remove": [ "example" ], "confirm": true }'Workspace owner only, never automatic. Moves the remove pages to the trash (recoverable for 30 days) and keeps keep. Every page in remove must be a copy of keep in this workspace that the caller can see, or nothing is removed (409 NOT_A_DUPLICATE). Files that had become a removed page now point at the kept one.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Workspace ID or slug.
Request Bodyrequired
Section titled “Request Bodyrequired”object
The page to keep.
Responses
Section titled “Responses”Removed
object
object
Example generated
{ "ok": true, "kept": "example", "removed": [ { "id": "example", "recoverableUntil": "2026-04-15T12:00:00Z" } ], "retentionDays": 1}Missing ids (BAD_REQUEST), no page to remove (NOTHING_TO_REMOVE) or no confirm (CONFIRM_REQUIRED).
Access denied
object
Human-readable message.
Machine-readable error code.
Correlation id (also the X-Request-Id header). Quote it in support tickets.
Finer cause under code. For UNAUTHORIZED: missing, invalid, revoked or expired.
What to do next, in plain words.
The request field at fault.
Doc page for this error.
Present on 5xx — how to reach a human.
object
Example
{ "success": false, "support": { "how": "POST /v1/support/tickets", "include": [ "request_id" ] }}A page in remove is not a copy of keep (NOT_A_DUPLICATE); nothing was removed.
