PATCH
Rename, archive or re-rule a segment

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

segmentId
string
required

Body

application/json

Every field is optional and an omitted one keeps its stored value. None may be sent as null: no field on a segment has a "clear it" meaning, and a null rule on a dynamic segment is not "no rule", it is a segment that cannot exist.

name
string

Still unique per store; a clash is 409 name_taken.

status
enum<string>

archived takes the segment out of the refresh rotation without destroying its definition, and is reversible. It is the safe alternative to deleting.

Available options:
active,
archived
rule
object

REPLACES the whole tree rather than merging into it. Same shape and same closed vocabulary as the create. Sending one to a static segment is 400 not_dynamic: a static segment's membership is a list and it can never gain a rule.

Response

Success

data
object