v7

latestOpenAPI 3.0.3raw.githubusercontent.com2026-08-013764062.2 MB
Features

Create (overwrite) variants for a feature flag in multiple environments

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

put/api/admin/projects/{projectId}/features/{featureName}/variants-batch

Path parameters

projectIdstring required
featureNamestring required

Request body

environmentsstring[]

The enviromnents to write the provided variants to

Example request

{
  "variants": [
    {
      "name": "blue_group",
      "weightType": "variable",
      "stickiness": "custom.context.field",
      "payload": {
        "type": "json",
        "value": "{\"color\": \"red\"}"
      },
      "overrides": [
        {
          "contextName": "userId",
          "values": [
            "red",
            "blue"
          ]
        }
      ]
    }
  ]
}

Response

featureVariantsSchema

versioninteger required

The version of the feature variants schema.

Example response

{
  "version": 1,
  "variants": [
    {
      "name": "blue_group",
      "weightType": "variable",
      "stickiness": "custom.context.field",
      "payload": {
        "type": "json",
        "value": "{\"color\": \"red\"}"
      },
      "overrides": [
        {
          "contextName": "userId",
          "values": [
            "red",
            "blue"
          ]
        }
      ]
    }
  ]
}