Undo an author’s changes
const url = 'https://example.com/api/v1/collab/history/example/undo';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"author":{"id":"example","kind":"user"},"from":1,"to":1}'};
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://example.com/api/v1/collab/history/example/undo \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "author": { "id": "example", "kind": "user" }, "from": 1, "to": 1 }'Recheck and apply an owner-authorized selective Undo as a new forward edit. Edits by other authors remain protected. Route: /api/v1/collab/history/{item_id}/undo. Inputs: item_id. Do not automatically replay this operation after an uncertain result.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Stable item ID
Request Bodyrequired
Section titled “Request Bodyrequired”object
Select this User’s attributed updates for selective undo.
object
Select this User’s attributed updates for selective undo.
Select this guest’s attributed updates for selective undo.
object
Select this guest’s attributed updates for selective undo.
Select this agent turn’s attributed updates for selective undo.
object
Select this agent turn’s attributed updates for selective undo.
First point in the inclusive target range.
Last point in the inclusive target range.
Responses
Section titled “Responses”Undo applied
object
IDs retained because another author edited them later.
Element IDs or Note block IDs that the operation reversed.
Examplegenerated
{ "kept": [ "example" ], "reverted": [ "example" ]}The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}