---
title: "Create a feature flag for an account"
method: POST
path: "/preview/v2/admin/feature_flags"
tags: ["admin"]
---

# Create a feature flag for an account

`POST /preview/v2/admin/feature_flags`

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

Create a feature flag for an account. Returns a feature_flag_id that can be used to update or delete the entry.

## Request body

- SfcApiCreateFeatureFlagRequest
  - `feature_flag` string, required
  - `account_regex` string, required
  - `enabled` boolean, required

## Response `201`

Feature flag created

- SfcApiCreateFeatureFlagResponse
  - `object` 'feature_flag', required
  - `feature_flag_id` string, required
  - `feature_flag` string, required
  - `account_regex` string, required
  - `enabled` boolean, required

## Other responses

- `401` — Unauthorized
- `403` — Forbidden
- `409` — Feature flag already exists for this account
- `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)
