Create flag
Creates a flag definition in a visible project. Configure environments separately before it is served.
Path parameters
Stable project_ identifier.
Pattern: ^project_.+
Body parameters
Developer-facing flag key, unique inside the project.
Length: 1-80
Human-readable flag name.
Length: 1-120
Optional internal description shown in management surfaces.
Length: up to 240
Typed value family for this flag.
Default: booleanOptions: boolean, string, number, object
Whether the flag should be reviewed for cleanup or treated as permanent.
Default: temporaryOptions: temporary, permanent
Why the flag exists.
Default: releaseOptions: release, ops, permission, experiment, configuration, maintenance
Cleanup review timestamp for temporary flags.
Optional cleanup guidance for temporary flags.
Length: up to 500
curl -X POST https://api.featuregate.dev/v1/projects/project_example/flags \
-H "Authorization: Bearer fg_ak_test_0123456789abcdef0123456789abcdef0123456789abcdef" \
-H "Content-Type: application/json" \
-d '{
"key": "new-checkout",
"name": "New checkout",
"type": "boolean"
}'Returns
Stable flag identifier, prefixed with flag_.
Length: 1+
Flag creation timestamp.
Last flag update timestamp.
Archive timestamp, or null while active.
Owning project identifier.
Length: 1+
Developer-facing flag key.
Length: 1+
Human-readable flag name.
Length: 1+
Optional internal description.
Flag value type.
Options: boolean, string, number, object
Flag lifecycle classification.
Options: temporary, permanent
Flag intent classification.
Options: release, ops, permission, experiment, configuration, maintenance
Cleanup review timestamp, when set.
Optional cleanup guidance.
Responses