Skip to main content
POST
Create environment

Path Parameters

applicationShortId
string
required
Pattern: ^app(-.+_.+|_.+)$

Body

application/json

Add an environment to a web or API application, e.g. staging next to production.

name
string
required

Environment name, unique within the application.

Required string length: 1 - 100
url
string<uri>
required

Public http(s) start URL.

isProduction
boolean

Mark the environment as production. Defaults to false. The agent avoids destructive actions on production.

projectShortId
string

Target a specific project by its prefixed short ID (proj-slug_shortId or proj_shortId), as returned by the projects API. Required for organization-scoped API keys; project-scoped keys may only pass their own project's short ID.

Pattern: ^proj(-.+_.+|_.+)$

Response

200 - application/json

The request has succeeded.

created
boolean
required

False when an unarchived environment with this name already existed and was returned unchanged.

environment
object
required