# Create environment

```http
POST /projects/{project_reference}/environments
```

Create an environment. Requires project.environments.manage.

## Parameters

| Name                | In   | Required | Description                                                |
| ------------------- | ---- | -------- | ---------------------------------------------------------- |
| `project_reference` | path | Yes      | Project slug, UUID, or domain that identifies the project. |

## Request body

| Field  | Type   | Required | Description                                                                 |
| ------ | ------ | -------- | --------------------------------------------------------------------------- |
| `name` | string | Yes      | Environment name (e.g., staging, production). New environments are private. |

## Responses

| Status | Description                      |
| ------ | -------------------------------- |
| 201    | Environment created successfully |
| 400    | Bad request                      |
| 401    | Unauthorized                     |
| 403    | Forbidden                        |
| 404    | Not found                        |
| 500    | Server error                     |
