Create a feature flag
Create a feature flag with the given name, key, and variations.
Click to expand instructions for creating a migration flag
Creating a migration flag
When you create a migration flag, the variations are pre-determined based on the number of stages in the migration.
To create a migration flag, omit the variations
and defaults
information. Instead, provide a purpose
of migration
, and migrationSettings
. If you create a migration flag with six stages, contextKind
is required. Otherwise, it should be omitted.
Here’s an example:
To learn more, read Migration Flags.
Path parameters
Headers
Query parameters
The key of the feature flag to be cloned. The key identifies the flag in your code. For example, setting clone=flagKey
copies the full targeting configuration for all environments, including on/off
state, from the original flag to the new flag.
Request
A human-friendly name for the feature flag
Which type of client-side SDKs the feature flag is available to
An array of possible variations for the flag. The variation values must be unique. If omitted, two boolean variations of true
and false
will be used.
Whether the flag is a temporary flag. Defaults to true
.
Settings relevant to flags where purpose
is migration
Whether to automatically turn the flag on across all environments at creation. Defaults to false
.
Deprecated, use clientSideAvailability
. Whether this flag should be made available to the client-side JavaScript SDK. Defaults to false
.
Response
A human-friendly name for the feature flag
Which type of client-side SDKs the feature flag is available to
Migration-related settings for the flag
Details on the environments for this flag. Only returned if the request is filtered by environment, using the filterEnv
query parameter.
Deprecated, use clientSideAvailability
. Whether this flag should be made available to the client-side JavaScript SDK
Deprecated, use experiments
instead