Skip to main content
PATCH
Update Environment Version

Authorizations

Authorization
string
header
required

Workspace API key as a bearer token: Authorization: Bearer ish_sk_live_.... Keys are workspace-scoped machine principals minted in Settings > Developers (shown once at mint). Scopes: sessions:run (create a session, submit turns, close), sessions:read (read the session and its decision trace), environments:read and environments:write (manage the workspace's registered environments), tasks:read and tasks:write (manage the workspace's registered tasks), people:read and people:write (the people the workspace can run a session for), and usage:read (the workspace's own consumption, spend limits and rate-limit budgets). A key is minted with sessions:run, sessions:read, and tasks:read by default; every other scope must be requested, people:read and usage:read included. An ish user access token also works on the same header for personal scripts.

Path Parameters

version_id
string<uuid>
required

Body

application/json

Partial update: an omitted field is left alone.

config and example_actions are FROZEN once any session references this version (409 environment_version_config_frozen); metadata stays editable for the life of the row. is_default is not here; the set-default operation moves it.

config
EnvironmentConfig · object | null

The per-kind configuration of an environment.

Every field is optional at the type level and required by KIND at validation time: a web environment needs url, and so on. Unknown keys are REJECTED on write, so a typo surfaces as a 422 instead of a target that was silently never set.

description
string | null
Maximum string length: 8000
example_actions
Example Actions · object[] | null
label
string | null
Required string length: 1 - 120

Response

Successful Response

A declared variant as the caller sees it.

archived_at
string<date-time> | null
required

Set when the variant is archived. An archived version stays readable and comparable so its stored runs keep resolving, is hidden from the default list, refuses new sessions, and frees its label for reuse.

config
StoredEnvironmentConfig · object | null
required

This variant's own config, or null when it inherits the environment's. Replaces (never merges with) the environment's.

created_at
string<date-time>
required
description
string | null
required
effective_config
StoredEnvironmentConfig · object
required

The config a run pinned to this version operates under: this version's config when set, otherwise the environment's. Provided so callers never re-implement the replace rule.

environment_id
string<uuid>
required
example_actions
Example Actions · object[] | null
required
id
string<uuid>
required
is_default
boolean
required

Whether a session that names this environment WITHOUT pinning a version resolves here. At most one live default per environment; an environment with no default resolves unversioned.

label
string
required
updated_at
string<date-time>
required
version
integer
required

Monotonic per environment, server-assigned, and never reused, even after the variant is archived.