v1

latestOpenAPI 3.1.02026-08-04151221521.2 KB
Environments

Update Environment

Update an existing environment.

All fields are optional - only provided fields will be updated.

**Production Environment Constraints:**
- branch_rules must be exactly one literal string (no wildcards)
- is_prod cannot be changed via API
put/agents/{namespace_slug}/{agent_name}/environments/{env_name}

Path parameters

namespace_slugstring required
agent_namestring required
env_namestring required

Request body

branch_rulesstring[] nullable

Branch patterns for matching

Response

Successful Response

agent_idstring required

Parent agent ID

branch_rulesstring[] required

Branch patterns for matching (e.g., ['main'], ['feature/*'])

created_atstring date-time nullable

Creation timestamp

idstring required

Unique identifier

is_prodboolean required

Whether this is the production environment (protected)

namestring required

Environment name (e.g., 'production', 'staging')

updated_atstring date-time nullable

Last update timestamp