v1

latestOpenAPI 3.0.02026-07-141,4077,1665.2 MB
Feature Flags

Update a variant

Updates the name and value of an existing variant on a feature flag.

When backend approvals are enabled and the flag requires approval, this endpoint creates and returns a FlagSuggestion with 201 Created instead of applying the change immediately. Use the returned suggestion id to approve or reject the change. If a pending suggestion already exists for this flag's variant property, the endpoint returns 409 Conflict.

put/api/v2/feature-flags/{feature_flag_id}/variants/{variant_id}

Path parameters

feature_flag_idstring uuid required
Example:550e8400-e29b-41d4-a716-446655440000

The ID of the feature flag.

variant_idstring uuid required
Example:550e8400-e29b-41d4-a716-446655440002

The ID of the variant.

Request body

namestring

The display name of the variant.

valuestring

The value of the variant as a string.

Example request

{
  "name": "Variant ABC123 Updated",
  "value": "new_value"
}

Response

OK

created_atstring date-time

The timestamp when the variant was created.

idstring uuid required

The unique identifier of the variant.

keystring required

The unique key of the variant.

namestring required

The name of the variant.

updated_atstring date-time

The timestamp when the variant was last updated.

valuestring required

The value of the variant as a string.

Example response

{
  "created_at": "2023-01-01T00:00:00Z",
  "id": "550e8400-e29b-41d4-a716-446655440002",
  "key": "variant-abc123",
  "name": "Variant ABC123",
  "updated_at": "2023-01-01T00:00:00Z",
  "value": "true"
}