POST /v1/sandboxes/{sandbox_id}/processes/{pid}/kill
Sends a signal (default `TERM`) to a background process and its process group, and returns the process.

Authentication

Bearer Token (b3os_sk_ API key or b3os_pat_ token) API Key (cookie: __Host-b3os_session)

Path Parameters

sandbox_id string required path
The sandbox ID (`sbx_…`).
Example: "sbx_01m5t68q1b590rj801nbzsqzkk"
pid integer required path
Process ID inside the sandbox.
Example: 812

Request Body

application/json
signal string
Enum: TERM, KILL, INT, HUP

Responses

200 The signaled process.
application/json
object string REQUIRED
Enum: process
pid integer REQUIRED
cmd string REQUIRED
The command as started (argv arrays are joined with spaces).
cwd string
status string REQUIRED
Enum: running, exited
exit_code integer | null REQUIRED
signal string | null
started_at string (date-time) REQUIRED
exited_at string (date-time) | null REQUIRED
400 The request failed validation (`invalid_request`, `invalid_url`).
401 Missing, malformed, expired or revoked credentials (`unauthorized`).
403 Authenticated but not allowed (`forbidden`, `egress_denied`).
404 No such background process (`process_not_found`).
413 The request body exceeds this operation's limit.
415 The Content-Type is not accepted by this operation.
429 A rate, concurrency or quota limit applies (`rate_limited`, `concurrency_limited`, `quota_exceeded`).
500 Something failed inside B3OS (`internal`). Retry with backoff.
502 The agent inside the microVM did not answer (`guest_unreachable`).
503 The node or the product is not available right now (`node_unavailable`, `product_unavailable`, `capacity_unavailable`).
curl -X POST 'https://beta-api.b3os.org/v1/sandboxes/sbx_01m5t68q1b590rj801nbzsqzkk/processes/812/kill' \  -H 'Authorization: Bearer YOUR_API_TOKEN' \  -H 'Content-Type: application/json' \  -d '{  "signal": "KILL"}'
const response = await fetch('https://beta-api.b3os.org/v1/sandboxes/sbx_01m5t68q1b590rj801nbzsqzkk/processes/812/kill', {  method: 'POST',  headers: {      "Authorization": "Bearer YOUR_API_TOKEN",      "Content-Type": "application/json"  },  body: JSON.stringify({    "signal": "KILL"  })});const data = await response.json();console.log(data);
import requestsheaders = {    'Authorization': 'Bearer YOUR_API_TOKEN'}response = requests.post('https://beta-api.b3os.org/v1/sandboxes/sbx_01m5t68q1b590rj801nbzsqzkk/processes/812/kill', headers=headers, json={  "signal": "KILL"})print(response.json())
200 Response
{  "object": "process",  "pid": 812,  "cmd": "npm run dev",  "cwd": "/workspace/app",  "status": "exited",  "exit_code": null,  "signal": "KILL",  "started_at": "2026-10-25T19:01:00.000Z",  "exited_at": "2026-10-25T19:06:00.031Z"}
Ask a question... ⌘I