Skip to main content
POST
/
context
/
runtime
/
execute
Execute in runtime sandbox
curl --request POST \
  --url https://api.getcargo.io/v1/context/runtime/execute \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "command": "<string>",
  "args": [
    "<string>"
  ]
}
'
{
  "exitCode": 123,
  "stdout": "<string>",
  "stderr": "<string>",
  "dirty": true
}

Documentation Index

Fetch the complete documentation index at: https://docs.getcargo.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

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

Body

application/json

Run a shell command in the workspace runtime sandbox. Changes are persisted in the snapshot but not pushed to GitHub.

command
string
required

Shell command to run inside the runtime sandbox.

Minimum string length: 1
args
string[]

Optional arguments passed to the command.

Response

Successful response

exitCode
number
required
stdout
string
required
stderr
string
required
dirty
boolean
required

True when git status --porcelain reported uncommitted changes after the command finished.