---
title: "Create feature flag"
method: POST
path: "/admin/flags"
tags: ["FeatureFlag"]
---

# Create feature flag

`POST /admin/flags`

## Request

- Base URL: `https://api.testnet.rise.trade`
- URL: `https://api.testnet.rise.trade/admin/flags`
- Auth: none required
- TypeScript: <https://skmtc.dev/rise/apis/risex-rest-api/docs/admin/flags/post.ts> (a function with typed inputs; its response is checked against the schema)

Create a new feature flag. Key must be unique, lowercase alphanumeric + . - _ (3-100 chars).

## Request body

- ApiCreateFeatureFlagRequest
  - `key` string: Stable identifier (lowercase alphanumeric + . - _, 3-100 chars). Required.
  - `name` string: Human-readable name. Required, max 255 chars.
  - `description` string: Free-form description. Optional, max 1000 chars.
  - `enabled` boolean: Initial enabled state.
  - `default_access` string: "whitelist" or "public". Defaults to "whitelist".
  - `actor` string: Wallet address of the admin performing this action. Required.
  - `is_internal` boolean: Internal-only flags are excluded from GetFlagsByWallet's public response.

## Response `200`

A successful response.

- ApiCreateFeatureFlagResponse
  - `flag` ApiFeatureFlagInfo
    - `key` string: Stable identifier (lowercase alphanumeric + . - _, 3-100 chars).
    - `name` string: Human-readable name shown in the admin panel.
    - `description` string: Free-form description.
    - `enabled` boolean: Master switch: when false, IsEnabled returns false for every wallet.
    - `default_access` string: "whitelist": only listed wallets see the flag when enabled. "public": all wallets see the flag when enabled.
    - `created_by` string: Wallet address of the admin who created this flag.
    - `created_at` string, int64: Unix nanoseconds.
    - `updated_at` string, int64: Unix nanoseconds.
    - `is_internal` boolean: Internal-only flags are excluded from GetFlagsByWallet's public response.

## Other responses

- `default`: An unexpected error response.

## Changes

- **2026-11-03** `98eabcd6a6ad`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/rise/apis/risex-rest-api/changes/admin/flags/post.md)

---

[API](https://skmtc.dev/rise/apis/risex-rest-api.md) - [All operations](https://skmtc.dev/rise/apis/risex-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/rise/apis/risex-rest-api/revisions/98eabcd6a6ad?raw)
