Tenancy
Create an environment
POST /v1/environments · SDK createEnvironment · CLI deployments env create
POST
platformBearerheader
AuthorizationBearer <token>Platform bearer credential accepted as an opaque API key or JWT.
x-deployments-project*stringMatch
^[0-7][0-9A-HJKMNP-TV-Z]{25}$idempotency-key*stringLength
1 <= length <= 512application/json- body
name*stringMatch
^\S[\s\S]*\S$|^\S$|^$Length
1 <= length <= 120slug?stringMatch
^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$type*stringValue in
"custom""development""production""staging"EnvironmentResponse
application/json- response
createdAt*stringMatch
^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$Format
date-timeupdatedAt*stringMatch
^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$Format
date-timeversion*integerRange
1 <= valueid*stringMatch
^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$metadata?name*stringMatch
^\S[\s\S]*\S$|^\S$|^$Length
1 <= length <= 120organizationId*stringMatch
^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$projectId*stringMatch
^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$slug*stringMatch
^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$status*stringValue in
"active""archived""disabled"type*stringValue in
"custom""development""production""staging"curl -X POST "https://example.com/v1/environments" \ -H "x-deployments-project: string" \ -H "idempotency-key: string" \ -H "Content-Type: application/json" \ -d '{ "name": "string", "type": "custom" }'{ "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "version": 1, "id": "string", "metadata": { "property1": null, "property2": null }, "name": "string", "organizationId": "string", "projectId": "string", "slug": "string", "status": "active", "type": "custom"}