---
title: "Create Environment"
method: POST
path: "/v1/products/{productId}/environments"
tags: ["Environments"]
---

# Create Environment

`POST /v1/products/{productId}/environments`

## Request

- Base URL: `https://api.configcat.com`
- URL: `https://api.configcat.com/v1/products/{productId}/environments`
- Auth: HTTP basic
- TypeScript: <https://skmtc.dev/configcat/apis/configcat-public-management-api/docs/v1/products/:productId/environments/post.ts> (a function with typed inputs; its response is checked against the schema)

This endpoint creates a new Environment in a specified Product 
identified by the `productId` parameter, which can be obtained from the [List Products](#operation/get-products) endpoint.

## Path parameters

- `productId` string, uuid, required

## Request body

- CreateEnvironmentModel
  - `name` string, required: The name of the Environment.
  - `color` string, nullable: The color of the Environment. RGB or HTML color codes are allowed.
  - `description` string, nullable: The description of the Environment.
  - `order` integer, nullable: The order of the Environment represented on the ConfigCat Dashboard. Determined from an ascending sequence of integers.

## Response `201`

When the creation was successful.

- EnvironmentModel: Details of the Environment.
  - `product` ProductModel, required: Details of the Product.
    - `organization` OrganizationModel, required: Details of the Organization.
      - `organizationId` string, uuid, required: Identifier of the Organization.
      - `name` string, required: Name of the Organization.
    - `productId` string, uuid, required: Identifier of the Product.
    - `name` string, required: Name of the Product.
    - `description` string, nullable, required: Description of the Product.
    - `order` integer, required: The order of the Product represented on the ConfigCat Dashboard. Determined from an ascending sequence of integers.
    - `reasonRequired` boolean, required: Determines whether a mandatory reason must be given every time when the Feature Flags or Settings within a Product are saved.
    - `approveRequired` boolean, required: Determines whether changes must be approved before they are applied within a Product.
  - `environmentId` string, uuid, required: Identifier of the Environment.
  - `name` string, required: Name of the Environment.
  - `color` string, nullable, required: The configured color of the Environment.
  - `description` string, nullable, required: Description of the Environment.
  - `order` integer, required: The order of the Environment represented on the ConfigCat Dashboard.
  - `reasonRequired` boolean, required: Determines whether a mandatory reason must be given every time when the Feature Flags or Settings in the given Environment are saved.
  - `approveRequired` boolean, required: Determines whether changes must be approved before they are applied in the given Environment.

## Other responses

- `400`: Bad request.
- `404`: Not found.
- `429`: Too many requests. In case of the request rate exceeds the rate limits.

## Changes

- **2026-06-08** `fc2e575e2bd3`: 2 info
  - added the required property `approveRequired` to the response with the `201` status
  - added the required property `product/approveRequired` to the response with the `201` status
- **2025-10-09** `8b8a102e5ed1`: 3 info
  - the response property `color` became required for the status `201`
  - the response property `description` became required for the status `201`
  - the response property `product/description` became required for the status `201`
- **2025-05-16** `2949501eef38`: 12 info
  - the response property `environmentId` became required for the status `201`
  - the response property `name` became required for the status `201`
  - the response property `order` became required for the status `201`
  - the response property `product` became required for the status `201`
  - …8 more
- **2024-05-18** `f14408c16a8c`: 4 breaking, 4 info
  - the `name` request property's minLength was increased from `0` to `1` (media type: application/json)
  - the `name` request property's minLength was increased from `0` to `1` (media type: text/json)
  - the `name` request property's minLength was increased from `0` to `1` (media type: application/*+json)
  - removed the media type `application/hal+json` for the response with the status `201`
  - …4 more

[Operation history](https://skmtc.dev/configcat/apis/configcat-public-management-api/changes/v1/products/:productId/environments/post.md)

---

[API](https://skmtc.dev/configcat/apis/configcat-public-management-api.md) - [All operations](https://skmtc.dev/configcat/apis/configcat-public-management-api/llms.txt) - [OpenAPI document](https://skmtc.dev/configcat/apis/configcat-public-management-api/revisions/0f143561d265?raw)
