Set the key Photo in a burst
const url = 'https://example.com/api/v1/photos/stacks/example/key-photo';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"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 PUT \ --url https://example.com/api/v1/photos/stacks/example/key-photo \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "item_id": "example" }'Requires a signed-in User. It chooses which Photo represents the burst in the timeline. It returns 400 when the Photo is not in the burst, 404 when the burst is missing or 409 when its metadata cannot be updated. Route: /api/v1/photos/stacks/{group_id}/key-photo. 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”Request Bodyrequired
Section titled “Request Bodyrequired”object
Examplegenerated
{ "item_id": "example"}Responses
Section titled “Responses”The accepted key choice plus the previous override and CAS tokens for Undo.
object
Prior explicit choice, or None when capture order supplied the key.
Current Sidecar hashes, captured after the forward update.
A Sidecar revision expected by a key-photo Undo; None means it was absent.
object
BLAKE3 hash of the Sidecar bytes, or None when no Sidecar existed.
Stable Files item identity for the photo.
Examplegenerated
{ "previous_item_id": "example", "sidecars": [ { "hash": "example", "item_id": "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" }}