Skip to main content
POST
/
sandboxes
/
{sandbox_id}
/
commands
/
{pid}
/
stdin
Send Stdin
curl --request POST \
  --url https://api.declaw.ai/sandboxes/{sandbox_id}/commands/{pid}/stdin \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "data": "<string>"
}
'
Sends a string to the standard input of a background process. The target process must have been started with stdin: true in the run command request so that a stdin pipe was reserved. Returns an empty {} body.
This endpoint is a stub in the current release. Full interactive stdin support (with back-pressure and pipe coordination) is coming in a future version.

Path Parameters

sandbox_id
string
required
The sandbox identifier. Format: sbx-<8 chars>.
pid
integer
required
Process ID of the background command to write to.Example: 42

Request Body

data
string
required
String data to write to the process stdin. Include a newline (\n) to simulate pressing Enter.Example: "yes\n"

Response

Returns an empty JSON object {}.

Example

curl -X POST https://api.declaw.ai/sandboxes/sbx-a1b2c3d4/commands/42/stdin \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "data": "yes\n" }'
Response
{}

Error Responses

StatusCause
401Missing or invalid API key