End a command
Sends `signal` to the command's process.
DELETE/v1/sandboxes/{sandbox_id}/exec/{operation_id}
Sends signal to the command's process. A command that has already ended is a no-op.
A key with the sandboxes:exec scope.
Request
curl -X DELETE "https://api.pod.mapier.ai/v1/sandboxes/sbx_3ahrz6dmv29gqy5ckt18fpx4b/exec/op_3ahrz6dmv29gqy5ckt18fpx4b" \
-H "Authorization: Bearer $POD_API_KEY"Parameters
| Name | In | Type | Required | What it is |
|---|---|---|---|---|
sandbox_id | path | string | Yes | |
operation_id | path | string | Yes | |
Pod-End-User | header | string | No | Narrows a project key to one of its end users: the call sees only that end user's sandboxes and usage, any other answering not_found, and a create is labelled with it. An end user of another project, or one that is not there, is not_found; a suspended one refuses creates and wakes (account_restricted). |
Idempotency-Key | header | string | No | Makes a repeat of this call safe for 24 hours. |
signal | query | "TERM" | "KILL" | "INT" | "HUP" | No |
Answer
200. The exec operation after the signal was sent.
{
"id": "op_3ahrz6dmv29gqy5ckt18fpx4b",
"sandbox": "sbx_3ahrz6dmv29gqy5ckt18fpx4b",
"state": "running",
"detached": false,
"tty": false,
"exit_code": null,
"signal": null,
"started_at": "2026-11-23T12:00:00.000Z",
"ended_at": null,
"stream_url": "wss://api.pod.mapier.ai/v1/sandboxes/sbx_3ahrz6dmv29gqy5ckt18fpx4b/exec/op_3ahrz6dmv29gqy5ckt18fpx4b/stream",
"oom_killed": false
}| Field | Type | Always | What it is |
|---|---|---|---|
id | string | Yes | |
sandbox | string | Yes | |
state | "running" | "exited" | "killed" | "timed_out" | "failed" | Yes | |
detached | boolean | Yes | |
tty | boolean | Yes | |
exit_code | integer | null | Yes | |
signal | "TERM" | "KILL" | "INT" | "HUP" | null | Yes | |
started_at | string | Yes | RFC 3339 in UTC with milliseconds, for example 2026-11-23T17:04:05.123Z. |
ended_at | string | null | Yes | |
stream_url | string | Yes | The address of the stream, always on the host that answered the call. Clients send their key or a stream ticket to it, so they refuse any other address. |
oom_killed | boolean | No | The sandbox's out-of-memory killer ended the command: its state is killed with signal KILL (timed_out when the out-of-memory killer ended it after its timeout asked it to stop), or, when a shell ran it, exited with code 137. Sent only once the command has ended and only when true; a missing field means the out-of-memory killer did not end it. A KILL sent through DELETE or a timeout is never reported as the out-of-memory killer's. |
Errors
The refusals this call is known for: not_found, guest_unavailable, in_other_cell. Any call can also answer unauthorized, rate_limited, unavailable or internal; the error list says what each means and when to send the call again.
In the SDKs
| Client | Call |
|---|---|
| TypeScript | proc.kill(signal) |
| Python | proc.kill(signal) |
| mpod | mpod sandboxes commands kill <sandbox> <operation> |