DevelopersAPI referenceCleanup
Merge copies of one page
POST
Folds copies of one page into the copy that stays, all in one transaction. The copy that stays gets:
- every tag from the other copies
- their notes, joined with a blank line (a note already inside another is not repeated, and if joining would pass 1 MB the kept note stays alone)
- a favourite flag if any copy had one
- a place in every list the other copies were in
The other copies are deleted like any deleted item: a tombstone for sync, an item.deleted webhook
event, and their stored files removed. A refused merge changes nothing.
bearerheader
AuthorizationBearer <token>A personal API key (ga_…), sent as Authorization: Bearer ga_…. A key gets 403 on a resource it has no access to, and on anything that changes data without write access.
application/json- body
keep_id*stringThe copy that stays
Length
26 <= length <= 26remove_ids*array<>The copies to fold into keep_id and delete. All of them must be copies of the same page as keep_id.
Items
1 <= items <= 50Which copy stayed and which were removed
application/json- response
kept_id*stringremoved_ids*array<string>curl -X POST 'https://example.com/v1/cleanup/duplicates/merge' \ -H 'Content-Type: application/json' \ -d '{ "keep_id": "stringstringstringstringst", "remove_ids": [ "stringstringstringstringst" ]}'Example Response
{ "kept_id": "string", "removed_ids": [ "string" ]}