PUT
Replace a collection's metadata document

Authorizations

Authorization
string
header
required

A secret API key. Publishable keys cannot reach this API. A key may carry an expiry, and an expired key is refused exactly like an unknown one, with a 401 that names no reason; check the key's expires_at in the dashboard rather than inferring it from a response. When a merchant rolls a key's secret they choose a grace window of up to 3 days, and for its duration BOTH the new secret and the one it replaced authenticate, so an integration moves over on its own deploy schedule instead of at the instant the button is pressed. Move before the window closes: after it, the old secret is refused. Nothing else about this contract moves with a roll. The key keeps its id and its scopes, so the only thing an integration updates is the credential itself.

Headers

Idempotency-Key
string
required

A unique key per logical write. Replaying a request with the same key returns the first response byte for byte instead of applying the write twice.

Path Parameters

collectionId
string
required

Body

application/json
metadata
object
required

REPLACES the whole document rather than merging into it. Read the current value first and send it back with your change, or keys the merchant set elsewhere are dropped.

expected_updated_at
string<date-time>

OPTIONAL precondition. Because this replaces the WHOLE document, the instruction below (read the current value and send it back with your change) is a read-modify-write race unless you assert a version: the loser silently drops the winner's keys and receives a 200, and one of those keys is the storefront tile's cover image. Send back the updated_at you read and a stale write is refused 409 collection_modified. Omit it and the write behaves exactly as it always has; it is optional because this route shipped without it. Compared at the precision you express, so a millisecond timestamp satisfies a microsecond one.

Response

Success

data
object