---
title: "Create an Environment"
method: POST
path: "/environments"
tags: ["environments"]
---

# Create an Environment

`POST /environments`

Create a new environment in the account.

## Query parameters

- `fields` object
  - `accounts` string — The comma-separated list of fields to return in response for Account resource.
  - `agent-pools` string — The comma-separated list of fields to return in response for AgentPool resource.
  - `drift-detection-schedule` string — The comma-separated list of fields to return in response for DriftDetectionSchedule resource.
  - `environments` string — The comma-separated list of fields to return in response for Environment resource.
  - `policy-groups` string — The comma-separated list of fields to return in response for PolicyGroup resource.
  - `provider-configurations` string — The comma-separated list of fields to return in response for ProviderConfiguration resource.
  - `storage-profiles` string — The comma-separated list of fields to return in response for StorageProfile resource.
  - `tags` string — The comma-separated list of fields to return in response for Tag resource.
  - `users` string — The comma-separated list of fields to return in response for User resource.

## Response `201`

The environment was created.

## Other responses

- `404` — Account relationship not found, or user unauthorized to perform action.
- `422` — Invalid arguments.
- `4XX` — Client error.
- `5XX` — Server error.

---

[API](https://skmtc.net/scalr/apis/scalr-iacp-api.md) · [All operations](https://skmtc.net/scalr/apis/scalr-iacp-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/scalr/scalr-iacp-api/revisions/fc927526ad12/schema)
