Skip to content

Environment

View as Markdown
Field Type Description
id * string
project_id * string
name * string
kind * production, staging, preview, development
branch string or null
pull_requests boolean Create a preview environment per pull request (preview template environments only).
pull_request object or null Set on an environment created for one pull request.
parent_environment_id string or null The template environment a preview was created from.
ttl string or null
expires_at string (date-time) or null
protection EnvironmentProtection
databases_mode new, branch, branch-masked How databases are provided in new preview environments.
spend_cap Money or any or null
status * provisioning, active, sleeping, deleting
created_at * string (date-time)
updated_at string (date-time)

* always present

{
"id": "env_01jbx2m9k7q4r8t5v6w3y0z1en",
"project_id": "prj_01jbx2m9k7q4r8t5v6w3y0z1pr",
"name": "production",
"kind": "production",
"branch": "main",
"pull_requests": false,
"pull_request": null,
"parent_environment_id": null,
"ttl": null,
"expires_at": null,
"protection": {
"require_approval": true,
"approver_roles": [
"owner",
"admin"
],
"allowed_branches": [
"main"
]
},
"databases_mode": "new",
"spend_cap": null,
"status": "active",
"created_at": "2026-10-22T09:30:00Z",
"updated_at": "2026-10-22T09:30:00Z"
}