Skip to main content
POST
Grant access to 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"

Path Parameters

id
string
required

Sandbox id (sbx_...).

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

"sbx_j572abc123def456"

Body

application/json
subject_type
enum<string>
required

user: a workspace member. opencode: an OpenCode Server (oc_...).

Available options:
user,
opencode
subject_id
string
required
Required string length: 1 - 100
permissions
enum<string>[]
required
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

Access granted

id
string
required

Sandbox access grant id (sbxg_...).

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

"sbxg_j572abc123def456"

sandbox_id
string
required

Sandbox id (sbx_...).

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

"sbx_j572abc123def456"

subject_type
enum<string>
required

A Workspace member, an OpenCode Server, or every current member of this sandbox's Workspace.

Available options:
user,
opencode,
workspace
subject_id
string
required
permissions
enum<string>[]
required

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
created_by
object
required
created_at
integer
required

Grant time (Unix seconds).

Required range: x >= 0