Skip to content
Dashboard
Theme
Theme

Update a feature flag

PATCH /v1/feature_flags/{feature_flag}: Update a feature flag.

View Markdown

PATCH /v1/feature_flags/{feature_flag}

Replaces the fields given. revision must be the flag’s current revision (resource_conflict otherwise, so concurrent edits never overwrite each other). The key and kind never change.

Scope
feature_flags:write
Auth
Secret key (sk_…)
Since
1.1
  • feature_flag string Required

  • OhAuthCat-Version string

    Minor version; defaults to the environment’s pin.

  • revision integer Required

    min 1

  • name string

    min length 1 · max length 200

  • description string

    max length 2000

  • enabled boolean

  • variants array of FeatureFlagVariant

    max items 20

  • off_variant string

  • rules array of FeatureFlagRule

    max items 50

  • fallthrough FeatureFlagServe

    Exactly one of variant and rollout.

Errors share one shape; see the error code catalogue.

curl -X PATCH \
"https://api.ohauthcat.com/v1/feature_flags/flag_01J9Z3K5V7W8X9Y0Z1A2B3C4D5" \
-H "Authorization: Bearer $OHAUTHCAT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"revision": 1
}'
Response 200
{
"object": "feature_flag",
"id": "flag_01J9Z3K5V7W8X9Y0Z1A2B3C4D5",
"key": "plan",
"name": "Acme Corp",
"description": "Primary SSO connection for Acme Corp.",
"kind": "boolean",
"enabled": true,
"variants": [
{
"key": "plan",
"value": {}
}
],
"off_variant": "example_off_variant",
"rules": [
{
"conditions": [
{
"attribute": "department",
"operator": "in",
"values": []
}
],
"serve": {
"variant": "default",
"rollout": [
{}
],
"bucket_by": "example_bucket_by"
}
}
],
"fallthrough": {
"variant": "default",
"rollout": [
{
"variant": "default",
"weight": 0
}
],
"bucket_by": "example_bucket_by"
},
"revision": 1,
"created_at": "2026-01-15T09:30:00Z",
"updated_at": "2026-01-15T09:30:00Z"
}