Skip to main content
PATCH
Change an environment's settings
An absent field stays.
  • auto_repair: production’s repairs always run.
  • daily_cap: tool calls a UTC day this environment’s runs may make, or null to remove it. A change holds from the next run. At the cap, new runs here are refused with quota_exceeded (details.limit_source environment_cap) until the UTC day resets, and runs already started finish. Only runs count; builds never do. Your team’s daily cap still counts these calls too, and whichever cap is lower refuses first. Production has none: your team’s daily cap holds it.
  • protected: with it on, only Owners and Admins push, merge or roll back into production, publish from the Code editor, request a change or build there. Automatic repairs still publish.
  • An API key or MCP URL limited to environments changes only its own environments’ settings, and production’s only when it may be used there.
  • off_categories, off_sites and off_tools, on any environment: catalog categories, sites by domain (each with its subdomains) and single tools that API keys and connected agents working here don’t find, and whose builds and runs here are refused with environment_turned_off. A key with no environments works in production. A team without environments sets production’s lists alone, which leaves environments off. Each list you send replaces this environment’s own. An API key or connected agent may only add entries: leaving one out is refused with forbidden. People on the Dashboard are never held by them.
  • Callers: an API key, an MCP OAuth token or a Dashboard session.
  • Permission: team:manage; an API key also needs team:manage.
  • Effect: Creates or changes something.
  • Errors: environment_not_found, environments_unavailable, and the errors any request can get.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

key
string
required

a string matching the pattern ^a-z [blocked]?$

Body

application/json
auto_repair
boolean
protected
boolean
daily_cap
integer | null

a number between 1 and 1000000000

Required range: 1 <= x <= 1000000000
off_categories
enum<string>[]

Catalog categories to turn off, such as flights: API keys and connected agents working here don't find their sites' tools, and their builds and runs there are refused

Maximum array length: 27
Available options:
retail,
travel,
flights,
events,
dev,
sales,
real_estate,
learning,
job_boards,
finance,
groceries,
services,
dining,
sports,
health,
suppliers,
logistics,
cars,
government,
news,
marketing,
business_tools,
games,
design,
social,
productivity,
other
Example:
off_sites
string[]

Sites to turn off by domain, such as delta.com, up to 200: no scheme, path or port. A domain covers its subdomains and tools built there later

Maximum array length: 200

a string matching the pattern ^(?=.{1,253}$)(?:A-Za-z0-9 [blocked]?.)+A-Za-z [blocked]?$

Pattern: ^(?=.{1,253}$)(?:[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?\.)+[A-Za-z](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?$
Example:
off_tools
string[]

Tools to turn off by ID, up to 500, such as a site's buy tool while its search tool stays on

Maximum array length: 500

a tool ID: tool_ and 32 lowercase hex digits

Response

The team's environments

The team's environments, production first; empty before it adds one

data
object[]
required