Skip to main content
POST
JavaScript

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

The Devbox ID.

Body

application/json
command
string
required

The command to execute via the Devbox shell. By default, commands are run from the user home directory unless shell_name is specified. If shell_name is specified the command is run from the directory based on the recent state of the persistent shell.

shell_name
string | null

The name of the persistent shell to create or use if already created. When using a persistent shell, the command will run from the directory at the end of the previous command and environment variables will be preserved.

attach_stdin
boolean | null

Whether to attach stdin streaming for async commands. Not valid for execute_sync endpoint. Defaults to false if not specified.

Response

200 - application/json

OK

devbox_id
string
required

Devbox id where command was executed.

stdout
string
required

Standard out generated by command.

stderr
string
required

Standard error generated by command.

exit_status
integer<int32>
required

Exit status of command execution.

shell_name
string | null

Shell name.