Skip to main content
PUT
Python (SDK)

Authorizations

Authorization
string
header
required

Gateway auth: send Authorization: Bearer <mka1-api-key>. For multi-user server-side integrations, you can also send X-On-Behalf-Of: <external-user-id>.

Headers

If-Match
string

The version of the state you read and edited. When supplied, the write is refused with 412 if anyone changed the state in the meantime, instead of silently overwriting them. * matches the current state unconditionally.

X-On-Behalf-Of
string

Optional external end-user identifier forwarded by the API gateway.

Path Parameters

key
string
required
Pattern: ^[a-z0-9][a-z0-9-]{0,62}$
env
string
required
Pattern: ^[a-z0-9][a-z0-9-]{0,62}$

Body

application/json
enabled
boolean
required
overrides
object[]
required
Maximum array length: 1000
rollout_percentage
integer
required
Required range: 0 <= x <= 100
rules
object[]
required
Maximum array length: 100
value
any
required

Any JSON value; its shape is constrained by the flag's value_type.

Response

Saved state

enabled
boolean
required
overrides
object[]
required
Maximum array length: 1000
rollout_percentage
integer
required
Required range: 0 <= x <= 100
rules
object[]
required
Maximum array length: 100
value
any
required

Any JSON value; its shape is constrained by the flag's value_type.

updated_at
string<date-time>
required
version
string
required

Opaque revision token. Send it back as If-Match on the next write to that state so a concurrent edit is refused rather than silently overwritten. Compare and echo it; never parse it.