Skip to content

Trash copies of a page

POST
/v1/workspaces/{workspaceId}/assets/duplicates/remove
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.

workspaceId
required
string

Workspace ID or slug.

Media typeapplication/json
object
keep
required

The page to keep.

string
remove
required
Array<string>
confirm
required
boolean

Removed

Media typeapplication/json
object
ok
boolean
kept
string
removed
Array<object>
object
id
string
recoverableUntil
string format: date-time
retentionDays
integer

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

Media typeapplication/json
object
success
required
boolean
error
required

Human-readable message.

string
code
required

Machine-readable error code.

string
request_id

Correlation id (also the X-Request-Id header). Quote it in support tickets.

string
reason

Finer cause under code. For UNAUTHORIZED: missing, invalid, revoked or expired.

string
hint

What to do next, in plain words.

string
suggestion
string
param

The request field at fault.

string
docs

Doc page for this error.

string
redirect_url
string
support

Present on 5xx — how to reach a human.

object
how
string
include
Array<string>

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.