---
title: "POST /api/v1/namespaces/{namespaceKey}/flags/{flagKey}/rollouts"
method: POST
path: "/api/v1/namespaces/{namespaceKey}/flags/{flagKey}/rollouts"
tags: ["Flipt", "RolloutsService"]
---

# POST /api/v1/namespaces/{namespaceKey}/flags/{flagKey}/rollouts

`POST /api/v1/namespaces/{namespaceKey}/flags/{flagKey}/rollouts`

## Request

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

## Path parameters

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

## Request body

- CreateRolloutRequest
  - `namespaceKey` string
  - `flagKey` string
  - `rank` integer, required
  - `description` string
  - `segment` RolloutSegment
    - `segmentKey` string
    - `value` boolean
    - `segmentKeys` string[]
    - `segmentOperator` 'OR_SEGMENT_OPERATOR' | 'AND_SEGMENT_OPERATOR', enum
  - `threshold` RolloutThreshold
    - `percentage` number, float
    - `value` boolean

## Response `200`

OK

- Rollout
  - `id` string
  - `namespaceKey` string
  - `flagKey` string
  - `type` 'UNKNOWN_ROLLOUT_TYPE' | 'SEGMENT_ROLLOUT_TYPE' | 'THRESHOLD_ROLLOUT_TYPE', enum
  - `rank` integer
  - `description` string
  - `createdAt` string, date-time
  - `updatedAt` string, date-time
  - `segment` RolloutSegment
    - `segmentKey` string
    - `value` boolean
    - `segmentKeys` string[]
    - `segmentOperator` 'OR_SEGMENT_OPERATOR' | 'AND_SEGMENT_OPERATOR', enum
  - `threshold` RolloutThreshold
    - `percentage` number, float
    - `value` boolean

## Changes

- **2024-08-08** `594afc3dbe2e`: 4 breaking, 5 warning, 2 info
  - request property `segment/segmentOperator` was restricted to a list of enum values
  - the `segment/segmentOperator` request property type changed from `integer` to `string`
  - the `segment/segmentOperator` response's property type changed from `integer` to `string` for status `200`
  - the `type` response's property type changed from `integer` to `string` for status `200`
  - …7 more
- **2024-08-07** `291b2f802c58`: 5 breaking, 5 info
  - removed the enum value `AND_SEGMENT_OPERATOR` of the request property `segment/segmentOperator`
  - removed the enum value `OR_SEGMENT_OPERATOR` of the request property `segment/segmentOperator`
  - the `segment/segmentOperator` request property type changed from `string` to `integer`
  - the `segment/segmentOperator` response's property type changed from `string` to `integer` for status `200`
  - …6 more

[Operation history](https://skmtc.dev/flipt-io/apis/flipt-api/changes/api/v1/namespaces/:namespaceKey/flags/:flagKey/rollouts/post.md)

---

[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)
