POST/projects/{uuid}/environments

Create an environment

Creates an environment in a project. Supply name to identify the environment within the project. A 409 response indicates that an environment with the same name already exists.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

1 parameter · 1 body field
uuidstringrequired
The UUID of the project in which to create the environment.

Environment details to create.

namestringoptional
The name of the environment.

6 status codes
201Returns an object containing the UUID of the created environment.
uuidstringoptional
The UUID of the environment.
400Returned when the token is invalid.
messagestringoptional
401Returned when the request is unauthenticated.
messagestringoptional
404Returned when the project is not found.
409Returned when an environment with the requested name already exists in the project.
422Returned when the submitted data fails validation; the response includes a message and validation errors.
errorsobjectoptional
messagestringoptional

Error handling

A 400 is returned for an invalid token; a 401 when authentication is missing; a 404 when the project is not found; a 409 when an environment with the same name already exists; and a 422 when the submitted data fails validation. Check the name value and choose a name that is not already used in the project.