# Create an environment `POST /v1/environments` **In this build:** Real. **Scope:** `environment.write` **CLI:** `harebox env new` Send an `Idempotency-Key` header. A retry with the same key never repeats the action. ## Request: `EnvironmentInput` | Field | Type | Notes | |---|---|---| | `name` (required) | `string` | | | `third_party_safe` | `boolean` | | | `include_github` | `boolean` | | | `include_api_key` | `boolean` | | | `include_agent_logins` | `boolean` | | | `credential_profile` | `string or null` | | | `allowed_members` | `array or null` | | ## Response: 201 `Environment` | Field | Type | Notes | |---|---|---| | `id` (required) | `string` | | | `name` (required) | `string` | | | `version` (required) | `integer` | | | `third_party_safe` | `boolean` | | | `effective` | `object` | What sandboxes really receive after all switches. | | `vars` | `array` | Names only. | | `secret_files` | `array` | | | `repos` | `array` | | | `credential_profile` | `string or null` | | Errors follow [one format](../errors.html).