For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
13.5kProductPricingSign inStart free trialBook a demo
DocsAPIsSDKsEnterprise EdgeGuidesAcademyRelease notes
DocsAPIsSDKsEnterprise EdgeGuidesAcademyRelease notes
    • API overview
  • Client API
  • Frontend API
  • Admin API
      • POSTMove feature to project
      • PUT[BETA] Update a milestone strategy
      • GET[BETA] Get partial updates (SDK)
      • PUT[BETA] Change a feature environment safeguard
      • DEL[BETA] Delete a feature environment safeguard
      • POSTValidate a feature flag name.
      • GETGet all tags for a feature.
      • POSTAdds a tag to a feature.
      • PUTUpdates multiple tags for a feature.
      • DELRemoves a tag from a feature.
      • GETGet a feature environment
      • POSTDisable a feature flag
      • POSTEnable a feature flag
      • POSTBulk enable a list of features
      • POSTBulk disable a list of features
      • GETGet feature flag strategies
      • POSTAdd a strategy to a feature flag
      • GETGet a strategy configuration
      • PUTUpdate a strategy
      • DELDelete a strategy from a feature flag
      • PATCHChange specific properties of a strategy
      • POSTSet strategy sort order
      • GETGet all features in a project
      • POSTAdd a new feature flag
      • POSTClone a feature flag
      • GETGet a feature
      • PUTUpdate a feature flag
      • DELArchive a feature flag
      • PATCHModify a feature flag
      • POSTMark features as stale / not stale
      • GETGet variants for a feature in an environment
      • PUTCreate (overwrite) variants for a feature in an environment
      • PATCHPatch a feature's variants in an environment
      • PUTCreate (overwrite) variants for a feature flag in multiple environments
      • POSTValidates archive features
      • POSTArchives a list of features
      • GET[BETA] Get feature lifecycle
      • POST[BETA] Set feature completed
      • POST[BETA] Set feature uncompleted
      • POST[BETA] Create a feature link
      • PUT[BETA] Update a feature link
      • DEL[BETA] Delete a feature link
      • GET[BETA] Get all features lifecycle stage count
      • POSTValidate constraint
      • POSTAdd feature to favorites
      • DELRemove feature from favorites
      • POSTAdd project to favorites
      • DELRemove project from favorites

Unleash reduces the risk of releasing new features, drives innovation by streamlining the software release process, and increases revenue by optimizing end-user experience. While we serve the needs of the world's largest, most security-conscious organizations, we are also rated the “Easiest Feature Management system to use” by G2.

GitHubGitHubLinkedInLinkedInX (Twitter)X (Twitter)SlackSlackStack OverflowStack OverflowYouTubeYouTube

Server SDKs

  • Node.js
  • Java
  • Go
  • Rust
  • Ruby
  • Python
  • .NET
  • PHP
  • All SDKs

Frontend SDKs

  • JavaScript
  • React
  • Next.js
  • Vue
  • iOS
  • Android
  • Flutter

Feature Flag use cases

  • Secure, scalable feature flags
  • Rollbacks
  • FedRAMP, SOC2, ISO2700 compliance
  • Progressive or gradual rollouts
  • Trunk-based development
  • Software kill switches
  • A/B testing
  • Feature management
  • Canary releases

Product

  • Quickstart
  • Unleash architecture
  • Pricing
  • Product vision
  • Open live demo
  • Open source
  • Enterprise feature management platform
  • Unleash vs LaunchDarkly

Support

  • Help center
  • Status
  • Changelog
Made in a cosy atmosphere in the Nordic countries.Copyright © 2026 Unleash
LogoLogo
13.5kProductPricingSign inStart free trialBook a demo
Admin APIFeature flags

Create (overwrite) variants for a feature in an environment

||View as Markdown|
PUT
https://app.unleash-instance.example.com/api/admin/projects/:projectId/features/:featureName/environments/:environment/variants
PUT
/api/admin/projects/:projectId/features/:featureName/environments/:environment/variants
$curl -X PUT https://app.unleash-instance.example.com/api/admin/projects/projectId/features/featureName/environments/environment/variants \
> -H "Authorization: <apiKey>" \
> -H "Content-Type: application/json" \
> -d '[
> {
> "name": "blue_group",
> "weight": 1.1
> }
>]'
1{
2 "version": 1,
3 "variants": [
4 {
5 "name": "blue_group",
6 "weight": 1.1,
7 "weightType": "variable",
8 "stickiness": "custom.context.field",
9 "payload": {
10 "type": "json",
11 "value": "{\"color\": \"red\"}"
12 },
13 "overrides": [
14 {
15 "contextName": "userId",
16 "values": [
17 "red",
18 "blue"
19 ]
20 }
21 ]
22 }
23 ]
24}
This overwrites the current variants for the feature flag in the :featureName parameter for the :environment parameter. The backend will validate the input for the following invariants: * If there are variants, there needs to be at least one variant with `weightType: variable` * The sum of the weights of variants with `weightType: fix` must be strictly less than 1000 (< 1000) The backend will also distribute remaining weight up to 1000 after adding the variants with `weightType: fix` together amongst the variants of `weightType: variable`
Was this page helpful?
Previous

Patch a feature's variants in an environment

Next
Built with

This overwrites the current variants for the feature flag in the :featureName parameter for the :environment parameter.

The backend will validate the input for the following invariants:

  • If there are variants, there needs to be at least one variant with weightType: variable

  • The sum of the weights of variants with weightType: fix must be strictly less than 1000 (< 1000)

The backend will also distribute remaining weight up to 1000 after adding the variants with weightType: fix together amongst the variants of weightType: variable

Authentication

Authorizationstring
API key needed to access this API
OR
AuthorizationBearer
API key needed to access this API, in Bearer token format

Path parameters

projectIdstringRequired
featureNamestringRequired
environmentstringRequired

Request

variantsSchema
namestringRequired
The variants name. Is unique for this feature flag
weightdoubleRequired0-1000

The weight is the likelihood of any one user getting this variant. It is a number between 0 and 1000. See the section on variant weights for more information

weightTypeenumOptional
Set to fix if this variant must have exactly the weight allocated to it. If the type is variable, the weight will adjust so that the total weight of all variants adds up to 1000
Allowed values:
stickinessstringOptional

Stickiness is how Unleash guarantees that the same user gets the same variant every time

payloadobjectOptional
Extra data configured for this variant
overrideslist of objectsOptional
Overrides assigning specific variants to specific users. The weighting system automatically assigns users to specific groups for you, but any overrides in this list will take precedence.

Response

featureVariantsSchema
versioninteger
The version of the feature variants schema.
variantslist of objects
All variants defined for a specific feature flag.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error