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

# Create Environment

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

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.

---

[API](https://skmtc.net/configcat/apis/configcat-public-management-api.md) · [All operations](https://skmtc.net/configcat/apis/configcat-public-management-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/configcat/configcat-public-management-api/revisions/88fd971944d7/schema)
