---
title: "PUT /api/v1/namespaces/{namespaceKey}/flags/{flagKey}/variants/{id}"
method: PUT
path: "/api/v1/namespaces/{namespaceKey}/flags/{flagKey}/variants/{id}"
tags: ["Flipt", "VariantsService"]
---

# PUT /api/v1/namespaces/{namespaceKey}/flags/{flagKey}/variants/{id}

`PUT /api/v1/namespaces/{namespaceKey}/flags/{flagKey}/variants/{id}`

## Request

- Base URL: `http://localhost:8080`
- URL: `http://localhost:8080/api/v1/namespaces/{namespaceKey}/flags/{flagKey}/variants/{id}`
- Auth: HTTP bearer

## Path parameters

- `namespaceKey` string, required
- `flagKey` string, required
- `id` string, required

## Request body

- UpdateVariantRequest
  - `id` string
  - `flagKey` string
  - `key` string, required
  - `name` string
  - `description` string
  - `attachment` string
  - `namespaceKey` string

## Response `200`

OK

- Variant
  - `id` string
  - `flagKey` string
  - `key` string
  - `name` string
  - `description` string
  - `createdAt` string, date-time
  - `updatedAt` string, date-time
  - `attachment` string
  - `namespaceKey` string

---

[API](https://skmtc.dev/flipt-io/apis/flipt-api.md) - [All operations](https://skmtc.dev/flipt-io/apis/flipt-api/llms.txt) - [OpenAPI document](https://skmtc.dev/flipt-io/apis/flipt-api/revisions/6fe4caf26f13?raw)
