v14

latestOpenAPI 3.0.32026-08-04377889.4 MB
feature-flags

Create a flag

Create a new feature flag for a project. The flag must have a unique slug within the project and specify its kind (boolean, string, number, or json).

put/v1/projects/{projectIdOrName}/feature-flags/flags

Path parameters

projectIdOrNamestring required

The project id or name

The project id or name

Query parameters

teamIdstring
Example:team_1a2b3c4d5e6f7g8h9i0j1k2l

The Team identifier to perform the request on behalf of.

slugstring
Example:my-team-url-slug

The Team slug to perform the request on behalf of.

Request body

slugstring required

A unique (per project) key for the flag, composed of letters, numbers, dashes, and underscores

kind'boolean' | 'string' | 'number' | 'json' required

The kind of flag

environmentsobject required

The configuration for the flag in different environments

seednumber

A random seed to prevent split points in different flags from having the same targets

descriptionstring

A description of the flag

state'active' | 'archived'
maintainerIdsstring[]

The user ids of the maintainers of the flag

permanentboolean

Whether this flag is marked as permanent, indicating it should not be removed

tagsstring[]

Tags for categorizing the flag

Response

descriptionstring
maintainerIdsstring[]
permanentfalse | true
tagsstring[]
updatedBystring
variantsobject[] required
idstring required
environmentsobject required
kind'boolean' | 'json' | 'number' | 'string' required
revisionnumber required
seednumber required
state'active' | 'archived' required
slugstring required
createdAtnumber required
updatedAtnumber required
createdBystring required
ownerIdstring required
projectIdstring required
typeName'flag' required