# POST /v1/tasks/{task_id}/stop

> Stop this piece of work only.

In [Work API](https://vestra.ai/developers/reference/api/work.md): The work Bash does on its computer: list it, read it, stop it or delete it.

Send `Authorization: Bearer vk_test_...` on every call.

Stop this piece of work only.

Your API key, scope `runtime` or `all`. On the card: [`ask`](https://vestra.ai/developers/ask.md). Over HTTP it is made from the contract: fill in each {…} and every value.

## Request

Path:

- `task_id` (`string`, required): The piece of work's id (`task_...`).

Headers:

- `Idempotency-Key` (`string`): Send the same key to retry this call safely for 24 hours.

## Answers 200

- `task` (`object`): The task, after the stop.
  - `id` (`string`): The task: one piece of work Bash started (task_...). Example: `task_91d`.
  - `object` (`"task"`): Always task.
  - `user_id` (`string | null`): Your id for its user; null on your company's own Bash.
  - `conversation_id` (`string | null`): The conversation that started it (conv_...); null when none did.
  - `deployment_id` (`string | null`): The deployment it runs on (dep_...); null when none.
  - `deployment_version` (`integer | null`): The version of that deployment it runs on; null when none.
  - `status` (`"queued" | "working" | "waiting" | "done" | "failed"`): queued: not started yet. working: running on the user's computer. waiting: it waits on an approval or a question. done or failed: it has ended.
  - `title` (`string | null`): What the work is, in a few words; null until Bash names it.
  - `progress` (`object[]`): Its plan, as its latest to-do list; empty when it has none.
    - `content` (`string`): One step of its plan.
    - `status` (`string`): Where that step is: pending, in_progress or completed.
  - `result` (`object`): What the work came to.
    - `text` (`string | null`): The work's answer: its final reply. Read one task for all of it; a list cuts it to 280 characters, as does a task that ended before its answer was recorded. Null until it has any, or when the work ended with no final reply.
    - `data` (`any | null`): Data it returned for an output_schema; null when it returned none.
  - `outcome` (`object | null`): Whether it met the success criteria of its message; null when there were none.
    - `met` (`boolean`): Whether it met the success criteria.
    - `reason` (`string`): Why, in a sentence.
  - `cost_usd` (`number`): What it has cost so far, in billed US dollars; the last charges can land a few seconds after it ends. Example: `0.0412`.
  - `cost_breakdown` (`object`): The same cost, by kind of spend.
    - `orchestrator` (`number`): Bash's own replies in the conversation, in billed US dollars; 0 on a piece of work.
    - `intelligence` (`number`): The thinking Bash did while it worked, in billed US dollars.
    - `tools` (`number`): The tools and apps Bash used, in billed US dollars.
    - `compute` (`number`): Time on Bash's computer, in billed US dollars.
    - `background` (`number`): Work Bash did in the background, such as remembering and tidying, in billed US dollars.
    - `voice` (`number`): Voice call time, in billed US dollars.
  - `created_at` (`string`): When it started, as an ISO 8601 time.
  - `updated_at` (`string`): When it last changed, as an ISO 8601 time.
- `delivered` (`boolean`): Whether the stop surely reached the work.
- `reason` (`"local_relay_down" | "nothing_to_kill" | "kill_not_permitted" | "not_running" | null`): Why the stop did not land; null when it did. not_running: it was at rest, so nothing was sent. nothing_to_kill: nothing was running. local_relay_down: it runs on the user's own computer, which cannot be reached. kill_not_permitted: it could not be reached, so it may still be running.

## Code

**HTTP**

```bash
curl -X POST "$VESTRA_BASE_URL/v1/tasks/{task_id}/stop" \
  -H "Authorization: Bearer $VESTRA_API_KEY"
```

**TypeScript, Python, CLI, MCP**: No sample in your language for this route, so here it is over HTTP.
