---
title: "Create environment"
method: POST
path: "/applications/{application}/environments"
tags: ["Environments"]
---

# Create environment

`POST /applications/{application}/environments`

## Request

- Base URL: `https://cloud.laravel.com/api`
- URL: `https://cloud.laravel.com/api/applications/{application}/environments`
- Auth: HTTP bearer

Create a new environment.

## Path parameters

- `application` string, required

## Request body

- CreateEnvironmentRequest
  - `build_command` string, nullable: Optional build command. Omit it or send null to skip the build command for a static website.
  - `branch` string, required
  - `name` string, required
  - `cluster_id` string, nullable: The identifier of a dedicated cluster to deploy to. Only fill it if your organization has a dedicated cluster and you want to use it for this environment.
  - `edge_network_id` string, nullable: The identifier of the edge network the environment should be created in. Only fill it if your organization has a dedicated edge network and you want to use it for this environment. Defaults to the edge network preferred by your organization.

## Response `200`

- object

## Other responses

- `403`: Authorization error
- `404`: Not found
- `422`: Validation error

---

[API](https://skmtc.dev/laravel/apis/laravel-cloud.md) - [All operations](https://skmtc.dev/laravel/apis/laravel-cloud/llms.txt) - [OpenAPI document](https://skmtc.dev/laravel/apis/laravel-cloud/revisions/af603f54ff33?raw)
