Grant access to a sandbox
Gives a Workspace member, an OpenCode Server, or every current Workspace member permissions on the sandbox. For subject_type workspace, subject_id may be omitted and must match this Workspace if supplied. One grant per subject; change permissions by deleting and granting again. Requires manage.
Authorizations
workspace API token (sk_akua_...) or OAuth2 JWT. Create tokens at https://akua.dev/developers/api-tokens
Headers
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.
1 - 53"ws_j572abc123def456"
Path Parameters
Sandbox id (sbx_...).
^sbx_[A-Za-z0-9]{1,64}$"sbx_j572abc123def456"
Body
- Option 1
- Option 2
user: a workspace member. opencode: an OpenCode Server (oc_...).
user, opencode 1 - 1001 - 5 elementsrun_commands: commands. files: files. terminal: terminals. previews: previews. manage: all permissions, lifecycle, settings and access grants.
run_commands, files, terminal, previews, manage Response
Access granted
Sandbox access grant id (sbxg_...).
^sbxg_[A-Za-z0-9]{1,64}$"sbxg_j572abc123def456"
Sandbox id (sbx_...).
^sbx_[A-Za-z0-9]{1,64}$"sbx_j572abc123def456"
A Workspace member, an OpenCode Server, or every current member of this sandbox's Workspace.
user, opencode, workspace run_commands: commands. files: files. terminal: terminals. previews: previews. manage: all permissions, lifecycle, settings and access grants.
run_commands, files, terminal, previews, manage Grant time (Unix seconds).
x >= 0