---
title: "Create a new environment"
method: POST
path: "/api/v2/environments"
tags: ["Hosting"]
---

# Create a new environment

`POST /api/v2/environments`

## Request

- Base URL: `https://api.simplelocalize.io`
- URL: `https://api.simplelocalize.io/api/v2/environments`
- Auth: API key in header `X-SimpleLocalize-Token`
- TypeScript: <https://skmtc.dev/simplelocalize/apis/simplelocalize-api/docs/api/v2/environments/post.ts> (a function with typed inputs; its response is checked against the schema)

The endpoint is used for creating a new environment in the project.
- You can create a custom environment with a unique key, name, and color.
- The created environment can be used for publishing translations.
- The environment key must be unique within the project and cannot be one of the reserved keys: `_latest`, `_production`.

## Request body

- CdnEnvironmentCreateApiRequest
  - `key` string, required: Unique key for the environment. Must be lowercase, contain only letters, numbers, and dashes.
  - `name` string, required: Name of the environment. Can contain letters, numbers, spaces, underscores, and dashes.
  - `color` string, required: Color of the environment in hex format for Web UI. Must be 6 characters long and valid hex color.

## Response `200`

OK

## Other responses

- `400`: Bad Request
- `402`: Payment Required
- `403`: Forbidden
- `404`: Not Found
- `409`: Conflict
- `429`: Too Many Requests
- `500`: Internal Server Error

## Changes

- **2025-11-12** `0329534cd557`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/simplelocalize/apis/simplelocalize-api/changes/api/v2/environments/post.md)

---

[API](https://skmtc.dev/simplelocalize/apis/simplelocalize-api.md) - [All operations](https://skmtc.dev/simplelocalize/apis/simplelocalize-api/llms.txt) - [OpenAPI document](https://skmtc.dev/simplelocalize/apis/simplelocalize-api/revisions/67a25a25863a?raw)
