Skip to main content
POST
Create an environment

Authorizations

Authorization
string
header
required

Access token issued by WorkOS AuthKit.

Body

application/json
name
string

Display name of the new environment. Generated when omitted.

Required string length: 1 - 100
twins
(string | CreateEnvironmentTwinRequest · object)[] | null

Provider twins to provision, as slugs or objects with an optional seed. Omitted when a scenario supplies the twins.

Required array length: 1 - 25 elements
Required string length: 1 - 100
scenario
string<uuid> | null

A saved environment definition to start from, instead of listing twins. Its twins are used as they were saved.

save_as_scenario
boolean
default:false

Also save this environment's definition, so another environment can be started from it later.

Response

Successful Response

id
string<uuid>
required
slug
string
required
name
string
required
status
string
required
twins
EnvironmentTwinResponse · object[]
required
created_at
string<date-time>
required
expires_at
string<date-time> | null