---
title: "Update a feature flag"
method: PUT
path: "/preview/v2/admin/feature_flags"
tags: ["admin"]
---

# Update a feature flag

`PUT /preview/v2/admin/feature_flags`

> ⚠️ This endpoint is in [public preview](/preview/roadmap).

Update the enabled state and/or account_regex of an existing feature flag. At least one of enabled or account_regex must be provided. Omitted fields are left unchanged.

## Request body

- SfcApiUpdateFeatureFlagRequest
  - `feature_flag_id` string, required
  - `account_regex` string, nullable
  - `enabled` boolean, nullable

## Response `200`

Feature flag updated

- SfcApiUpdateFeatureFlagResponse
  - `object` 'feature_flag', required
  - `feature_flag_id` string, required

## Other responses

- `400` — No fields provided to update
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Feature flag not found for this id
- `500` — Internal server error

---

[API](https://skmtc.net/sfcompute/apis/san-francisco-compute-documentation.md) · [All operations](https://skmtc.net/sfcompute/apis/san-francisco-compute-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/sfcompute/san-francisco-compute-documentation/versions/93dd7661e9bb/schema)
