---
title: "POST /api/v1/namespaces/{namespaceKey}/flags/{flagKey}/rules/{ruleId}/distributions"
method: POST
path: "/api/v1/namespaces/{namespaceKey}/flags/{flagKey}/rules/{ruleId}/distributions"
tags: ["Flipt", "DistributionsService"]
---

# POST /api/v1/namespaces/{namespaceKey}/flags/{flagKey}/rules/{ruleId}/distributions

`POST /api/v1/namespaces/{namespaceKey}/flags/{flagKey}/rules/{ruleId}/distributions`

## Request

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

## Path parameters

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

## Request body

- CreateDistributionRequest
  - `flagKey` string
  - `ruleId` string
  - `variantId` string, required
  - `rollout` number, float, required
  - `namespaceKey` string

## Response `200`

OK

- Distribution
  - `id` string
  - `ruleId` string
  - `variantId` string
  - `rollout` number, float
  - `createdAt` string, date-time
  - `updatedAt` string, date-time

---

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