from line 1
1---
2title: Stop Work
3url: https://platform.claude.com/docs/en/api/beta/environments/work/stop
4---
1# Stop Work
52
6## Stop Work
3**POST** `/v1/environments/{environment_id}/work/{work_id}/stop`
74
8**post** `/v1/environments/{environment_id}/work/{work_id}/stop`
9
105Note: these endpoints are called automatically by the pre-built environment worker provided in the SDKs and CLI, for orchestrating sessions with self-hosted sandbox environments. They are included here as a reference; you do not need to invoke them directly.
116
127Stop a work item, initiating graceful or forced shutdown.
138
14### Path Parameters
9## Path parameters
1510
1611- `environment_id: string`
1712
1813- `work_id: string`
1914
20### Header Parameters
15## Headers
2116
2217- `"anthropic-beta": optional array of AnthropicBeta`
2318
from line 90
9590
9691 - `"mid-conversation-tool-changes-2026-07-01"`
9792
98### Body Parameters
93## Body parameters
9994
10095- `force: optional boolean`
10196
10297 If true, immediately stop work without graceful shutdown
10398
104### Returns
99 default: false
105100
106- `BetaSelfHostedWork object { id, acknowledged_at, created_at, 10 more }`
101## Returns
107102
103- `BetaSelfHostedWork object`
104
108105 Work resource representing a unit of work in a self-hosted environment.
109106
110107 Work items are queued when sessions are created or when long-dormant sessions
from line 132
135132
136133 Type of work data
137134
138 - `"session"`
139
140135 - `environment_id: string`
141136
142137 Environment identifier this work belongs to (e.g., `env_...`)
from line 178
183178
184179 The type of object (always 'work')
185180
186 - `"work"`
181 default: work
187182
188### Example
183## Example
189184
190```http
185```bash
191186curl https://api.anthropic.com/v1/environments/$ENVIRONMENT_ID/work/$WORK_ID/stop \
192187 -H 'Content-Type: application/json' \
193188 -H 'anthropic-version: 2023-06-01' \
from line 191
196191 -d '{}'
197192```
198193
199#### Response
194### Response (200)
200195
201196```json
202197{
No line in this hunk matches that.