---
title: "Kill a running command (`@vercel/sandbox`-compatible). The SDK calls `POST /v1/sandboxes/{id}/{cmdId}/kill` — note the path has the command ID directly under the sandbox, NOT under `/jobs/` or `/cmd/`."
method: POST
path: "/v1/sandboxes/{id}/{cmd_id}/kill"
tags: ["Sandboxes"]
---

# Kill a running command (\`@vercel/sandbox\`-compatible). The SDK calls \`POST /v1/sandboxes/{id}/{cmdId}/kill\` — note the path has the command ID directly under the sandbox, NOT under \`/jobs/\` or \`/cmd/\`.

`POST /v1/sandboxes/{id}/{cmd_id}/kill`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/v1/sandboxes/{id}/{cmd_id}/kill`
- Auth: HTTP bearer

## Path parameters

- `id` string, required
- `cmd_id` string, required

## Request body

- CmdKillBody: SDK-shaped kill body. The SDK sends `{signal: AbortSignal}` but only uses the signal for HTTP request abortion client-side; there's no signal name on the wire.
  - `force` boolean: Optional: when true, SIGKILL instead of SIGTERM.

## Response `200`

Command killed; returns final snapshot

- CmdResponse: `@vercel/sandbox` envelope: `{ command: {...} }`.
  - `command` CmdInner, required: Inner `command` object — matches the SDK's zod validator exactly. `exitCode` is `null` until the command terminates; `startedAt` is Unix epoch milliseconds.
    - `args` string[], required
    - `cwd` string, required
    - `exitCode` integer, nullable
    - `id` string, required
    - `name` string, required
    - `sandboxId` string, required
    - `startedAt` integer, required

## Other responses

- `404`: Sandbox or command not found

## Changes

- **2026-04-25** `774be20905f2`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/v1/sandboxes/:id/:cmd_id/kill/post.md)

---

[API](https://skmtc.dev/gotempsh/apis/temps.md) - [All operations](https://skmtc.dev/gotempsh/apis/temps/llms.txt) - [OpenAPI document](https://skmtc.dev/gotempsh/apis/temps/revisions/3b040526eb43?raw)
