Skip to main content
POST
Create a sandbox

Authorizations

Authorization
string
header
required

workspace API token (sk_akua_...) or OAuth2 JWT. Create tokens at https://akua.dev/developers/api-tokens

Headers

akua-context
string

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_j572abc123def456"

idempotency-key
string

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
name
string
required

Display name.

Required string length: 1 - 100
Example:

"checkout-service"

size
enum<string>

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

Available options:
standard
source
object

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.

network_policy
object

Outbound network access. allow_all: HTTP and HTTPS to public internet addresses; private, link-local and cluster-internal addresses are always blocked, and other protocols except DNS are not forwarded. Restrictive modes are added as new values.

idle_timeout_seconds
integer
default: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

env
object
labels
object
sharing
enum<string>
default:private

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

Available options:
private,
workspace
sharing_permissions
enum<string>[]

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

Required array length: 1 - 5 elements

run_commands: commands. files: files. terminal: terminals. previews: previews. manage: all permissions, lifecycle, settings and access grants.

Available options:
run_commands,
files,
terminal,
previews,
manage

Response

Sandbox creation started

id
string
required
Required string length: 1 - 53
workspace_id
string | null
required
Required string length: 1 - 53
organization_id
string | null
required
Required string length: 1 - 54
owner_type
enum<string>
required

Domain entity collection the operation acts on.

Available options:
install,
repository_change_request,
repository,
workspace,
machine,
cluster,
package,
sandbox
owner_id
string
required

Prefixed ID of the entity this operation acts on. Prefix matches owner_type (ws_, mch_, clu_, pkg_, inst_, rcr_, repo_, sbx_).

parent_operation_id
string | null
required

ID of the chained parent operation, when present.

Required string length: 1 - 53
state
enum<string>
required

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

Available options:
RUNNING,
SUCCEEDED,
FAILED,
CANCELLED
done
boolean
required

True iff state is a terminal value.

html_url
string<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"

metadata
object
required
response
object
required

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

error
object | null
required

Populated when state is FAILED or CANCELLED.

last_error
object | null
required

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

started_at
integer
required

Unix timestamp (seconds)

Required range: x >= 0
completed_at
integer | null
required

Unix timestamp (seconds)

Required range: x >= 0
steps
object[]