Skip to main content
PUT
Update a sandbox environment

Authorizations

Authorization
string
header
required

Boat bearer token in the form boat_.... Service API keys authenticate sandbox operations.

Path Parameters

environmentId
string<uuid>
required

Environment id returned by GET /environments.

Query Parameters

org
string

Billing wallet for this request: an organization you belong to, by id (team_…) or by name as GET /orgs lists it (case-insensitive), or personal. Omitted, the account's active wallet applies (PATCH /orgs/active; personal until set). Two organizations sharing the name answer 409 ambiguous_org and need the id. Sandboxes and snapshots stay creator-private. On /environments routes, only this query parameter selects the organization's shared environments; the X-Boat-Org header and the active wallet do not apply there. Members read them, owners and admins change them.

Body

application/json

Rename, set-default, and/or edit flags and contents. Any flag or content change mints a new immutable version; existing sandboxes are not touched until you call upgrade.

name
string

New environment name.

isDefault
boolean

Set to true to make this the default environment (clears the flag on the previous default).

safeForThirdParties
boolean
passGithub
boolean
passSecrets
boolean
passSandboxCredentials
boolean
passAgentsCredentials
boolean
credentialProfileId
string | null

Id or name of a credential profile you can use, or null for the sandbox owner's default profile. Unknown profiles return 404 credential_profile_not_found.

proxyAiCredentials
boolean

With safeForThirdParties true, pass AI credentials as proxy placeholders. Setting true needs the AI credentials proxy on for the profile owner, else 400 ai_proxy_off.

access
object

Set who can use an organization environment (owner or admin) or profile (owner). A change does not touch running sandboxes. A bad list returns 400 invalid_access.

envContents
string

Full .env-style content for the new version.

secretFiles
object[]
repositories
object[]

Full replacement of the version's repository selection. Each item selects one repository by its internal databaseId (from GET /repos).

Response

Updated environment.

success
boolean
required
environment
object | null

A named sandbox environment. All flags/contents reflect the latest version.