Restore the prior burst key only while every Sidecar still has its captured revision (#775).
POST
/api/v1/photos/stacks/{group_id}/key-photo/undo
const url = 'https://example.com/api/v1/photos/stacks/example/key-photo/undo';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"previous_item_id":"example","sidecars":[{"hash":"example","item_id":"example"}]}'};
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/photos/stacks/example/key-photo/undo \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "previous_item_id": "example", "sidecars": [ { "hash": "example", "item_id": "example" } ] }'Route: /api/v1/photos/stacks/{group_id}/key-photo/undo. Inputs: group_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”group_id
required
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
Restore the prior explicit key, or infer it from capture order when absent.
object
previous_item_id
Explicit prior key, or None to remove all Calternal key markers.
string | null
sidecars
required
Sidecar revisions returned by the forward update.
Array<object>
A Sidecar revision expected by a key-photo Undo; None means it was absent.
object
hash
BLAKE3 hash of the Sidecar bytes, or None when no Sidecar existed.
string | null
item_id
required
Stable Files item identity for the photo.
string
Examplegenerated
{ "previous_item_id": "example", "sidecars": [ { "hash": "example", "item_id": "example" } ]}Responses
Section titled “Responses”Media typeapplication/json
The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}Media typeapplication/json
The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}Media typeapplication/json
The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}