Skip to content

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
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.

group_id
required
string
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"
}
]
}
Media typeapplication/json

The standard API error response: { "error": { ... } }.

object
error
required

Error details.

object
code
required

Stable machine-readable code.

string
Allowed values: bad_request unauthorized forbidden not_found conflict name_conflict_case name_too_long push_endpoint_rejected too_many_requests internal service_unavailable
details
One of:

Optional field or operation details.

object
key
additional properties
string
message
required

Safe text for logs or a user-facing error message.

string
Example
{
"error": {
"code": "bad_request"
}
}
Media typeapplication/json

The standard API error response: { "error": { ... } }.

object
error
required

Error details.

object
code
required

Stable machine-readable code.

string
Allowed values: bad_request unauthorized forbidden not_found conflict name_conflict_case name_too_long push_endpoint_rejected too_many_requests internal service_unavailable
details
One of:

Optional field or operation details.

object
key
additional properties
string
message
required

Safe text for logs or a user-facing error message.

string
Example
{
"error": {
"code": "bad_request"
}
}
Media typeapplication/json

The standard API error response: { "error": { ... } }.

object
error
required

Error details.

object
code
required

Stable machine-readable code.

string
Allowed values: bad_request unauthorized forbidden not_found conflict name_conflict_case name_too_long push_endpoint_rejected too_many_requests internal service_unavailable
details
One of:

Optional field or operation details.

object
key
additional properties
string
message
required

Safe text for logs or a user-facing error message.

string
Example
{
"error": {
"code": "bad_request"
}
}