Skip to main content
Start a durable background command

Authorizations

Authorization
string
header
required

BoxRouter API key; never an upstream provider key.

Headers

Idempotency-Key
string

Optional for this operation. Preserve the same stable identifier when retrying an uncertain response; never reuse it for new work. If omitted where allowed, Cloud generates a request-scoped key that cannot reconcile a later retry. Do not include credentials or payloads. Stable identifier for one logical mutation.

Required string length: 1 - 128

Path Parameters

sandbox_id
string
required

Workspace-owned BoxRouter sandbox ID, not an upstream ID.

Minimum string length: 1
Pattern: ^[^\u0000]*$

Body

application/json
command
string
required

Bash source run in a login shell.

Pattern: ^[^\u0000]*$
env
object | null

Environment overrides for the command.

cwd
string | null

Absolute working directory within the sandbox.

Pattern: ^/[^\u0000]*$
stdin
boolean
default:false

Keep stdin open for subsequent input requests. Requires named processes.input and selected-route reattached_stdin metadata; otherwise stdin: true is refused as unsupported_feature before process launch.

wait_for_port
integer | null

Return only after this port accepts TCP connections inside the sandbox, so the caller needs no readiness loop. Waits at most 30 seconds. If the process exits first, or the port is still closed after the wait, the process is ended and the answer is 409 port_not_listening with the output so far in details. Null returns as soon as the process starts.

Required range: 1 <= x <= 65535

Response

Durable process handle created.

id
string
required
Minimum string length: 1