EndpointsCreate a sandbox

Sandboxes

Create a sandbox

Creates a Workspace sandbox and returns an Operation; the sandbox is PROVISIONING until the Operation finishes and ACTIVE afterwards. The caller gets the manage permission. With source.type: "sandbox" the new sandbox is a copy of that sandbox from its latest snapshot; the source must be SUSPENDED. Retrying with the same Idempotency-Key returns the same Operation.

POST/sandboxes
Authorizationstringheaderrequired

Bearer token for the authenticated caller.

Optional workspace/scope context for the request. Carries a single workspace wire id (ws_…) today. Only needed for broad tokens - a workspace-owned token implies its workspace.

Required string length: 1 - 53

Example: "ws_j572abc123def4"

Optional caller-supplied idempotency key. Any non-empty key up to 64 characters is accepted. Endpoint-specific documentation describes how the key is used.

Required string length: 1 - 64

Example: "create-prod-2026-05-07"

Body

application/json
namestringrequired

Display name.

Required string length: 1 - 100

Example: "checkout-service"

sizeenum<string>

Compute size. standard is the only size today; larger sizes are added as new values.

Available options: standard

sourceobject

Where the sandbox content comes from. sandbox: a copy of another sandbox from its latest snapshot (a fork). Repository, snapshot and template sources are added as new type values.

child attributes
source.typeenum<string>required

Available options: sandbox

source.sandbox_idstringrequired

Sandbox id (sbx_...).

Pattern: ^sbx_[A-Za-z0-9]{1,64}$

Example: "sbx_j572abc123def456"

Outbound network access. allow_all means public internet only: HTTP on TCP port 80, TLS on TCP port 443 (including HTTPS), and public DNS. Private, link-local, cluster-internal and execution-cluster node addresses are blocked. Cluster DNS names and other ports or protocols are unavailable.

child attributes
network_policy.modeenum<string>required

Available options: allow_all

idle_timeout_secondsintegerdefault:600

Seconds without API activity after which the sandbox suspends itself. Commands that are still running keep it awake. 300 to 86400; default 600.

Required range: 300 <= x <= 86400

Example: 600

envrecord<string, string>
labelsrecord<string, string>
sharingenum<string>default:private

Explicit creation is private by default. workspace grants access to every current Workspace member.

Available options: private, workspace

sharing_permissionsenum<string>[]

Workspace-sharing permissions; defaults to run_commands and files. manage stays with the owner unless explicitly included.

Required array length: 1 - 5 elements

Response

application/json

Sandbox creation started

idstringrequired

Required string length: 2 - 192

workspace_idstring | nullrequired

Required string length: 1 - 53

organization_idstring | nullrequired

Required string length: 1 - 54

owner_typeenum<string>required

Domain entity collection the operation acts on.

Available options: install, repository_change_request, repository, workspace, machine, cluster, node_pool, package, sandbox, opencode

owner_idstringrequired

Prefixed ID of the entity this operation acts on. Prefix matches owner_type (ws_, mch_, clu_, pkg_, inst_, rcr_, repo_, sbx_, oc_); a node pool is clu_<id>/node_pools/<node pool id>.

parent_operation_idstring | nullrequired

ID of the chained parent operation, when present.

Required string length: 2 - 192

stateenum<string>required

Lifecycle state. Past-participle terminal states per AIP-216.

Available options: RUNNING, SUCCEEDED, FAILED, CANCELLED

donebooleanrequired

True iff state is a terminal value.

html_urlstring<uri>required

Deep link to the dashboard view of this operation's owning resource when available, otherwise the operation detail page.

Maximum string length: 2048

Example: "https://akua.dev/installs/inst_j572abc123def456?tab=operations"

metadataobjectrequired
metadata.typeenum<string>required

Available options: cluster.join_token.revoke

metadata.workspace_idstringrequired

Required string length: 1 - 53

metadata.cluster_idstringrequired

Required string length: 1 - 54

metadata.token_idstringrequired

Pattern: ^[a-z0-9]{6}$

responseobject | nullrequired

Populated only when done && state === "SUCCEEDED". Discriminated by type.

response.typeenum<string>required

Available options: cluster.join_token.revoke

response.cluster_idstringrequired

Required string length: 1 - 54

response.token_idstringrequired

Pattern: ^[a-z0-9]{6}$

errorobject | nullrequired

Populated when state is FAILED or CANCELLED.

child attributes
error.codeinteger
error.messagestringrequired

Why it failed, stable for clients to branch on. Node pool and Machine creates use billing-required, quota-exceeded, service-disabled, capacity-unavailable, provider-refused, provider-unavailable and abandoned; most Operations omit it.

Example: "billing-required"

Each precondition that failed, like google.rpc.PreconditionFailure. A Package version that fails with image-unresolvable lists every image it could not resolve.

child attributes
error.violations.typestringrequired

The kind of violation, stable for clients to branch on.

Example: "image-unresolvable"

What failed it, for image-unresolvable the image reference.

Example: "pkg.akua.dev/ws_xxx/images/ghcr-acme/web:1.2.3"

Why it failed, safe to show.

last_errorobject | nullrequired

Latest error from any failed step. Populated even mid-flight; cleared when the step succeeds on retry.

child attributes
started_atintegerrequired

Unix timestamp (seconds)

Required range: x >= 0

completed_atinteger | nullrequired

Unix timestamp (seconds)

Required range: x >= 0

stepsobject[]
child attributes
steps.namestringrequired

User-visible milestone name.

steps.statusenum<string>required

Step lifecycle state.

Available options: pending, running, completed, failed, skipped

steps.execution_typeenum<string>required

Step execution kind. user/approval mean the workflow is blocked on a human action. Internal bookkeeping steps are filtered from public responses.

Available options: system, user, approval, skipped

steps.started_atintegerrequired

Unix timestamp (seconds)

Required range: x >= 0

steps.completed_atinteger | nullrequired

Unix timestamp (seconds)

Required range: x >= 0

steps.error_messagestring | nullrequired
steps.retryablebooleanrequired
steps.skippablebooleanrequired