---
search:
  tags:
    - environments
    - POST
seo:
  description: >-
    Creates an environment in a project, on one of the organization's… Reference
    for the POST /project/{project_id}/environment endpoint in the Platform API.
sidebar:
  label: Create an environment
  badge: POST
title: Create an environment
type: openapi-operation
---
Creates an environment in a project, on one of the organization's clusters.

`POST /project/{project_id}/environment`

**Request body** (`application/json`, required)

- `cluster_id` (uuid, required) — A universally unique identifier (UUID) string
- `name` (string, required) — The name of the environment.
- `type` (environment_type, required) — The type of the environment.

Request body example:

```json
{
  "cluster_id": "d3d1bfdf-67c4-41fa-b065-858242731616",
  "name": "string",
  "type": "development"
}
```

**Responses**

- `200` — Environment created successfully
- `default` — Error

Response example, 200:

```json
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",
  "project_id": "405d8375-3514-403b-8c43-83ae74cfe0e9",
  "cluster_id": "d3d1bfdf-67c4-41fa-b065-858242731616",
  "name": "string",
  "type": "development",
  "created_at": "2019-08-24T14:15:22Z",
  "updated_at": "2019-08-24T14:15:22Z",
  "deleted_at": "2019-08-24T14:15:22Z"
}
```
