Hosting

Create a new environment

Changed on

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.
post/api/v2/environments

Request

Request body

keystring required

Unique key for the environment. Must be lowercase, contain only letters, numbers, and dashes.

namestring required

Name of the environment. Can contain letters, numbers, spaces, underscores, and dashes.

colorstring required

Color of the environment in hex format for Web UI. Must be 6 characters long and valid hex color.

Example request

{
  "key": "staging",
  "name": "Staging Environment",
  "color": "ff5733"
}

Response

OK

Changes