from line 1
1---
2title: Update Work Item
3url: https://platform.claude.com/docs/en/api/beta/environments/work/update
4---
1# Update Work Item
52
6## Update Work Item
3**POST** `/v1/environments/{environment_id}/work/{work_id}`
74
8**post** `/v1/environments/{environment_id}/work/{work_id}`
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
127Update work item metadata with merge semantics.
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- `metadata: map[string]`
10196
10297 Metadata patch. Set a key to a string to upsert it, or to null to delete it. Omit the field to preserve existing metadata.
10398
104### Returns
99## Returns
105100
106- `BetaSelfHostedWork object { id, acknowledged_at, created_at, 10 more }`
101- `BetaSelfHostedWork object`
107102
108103 Work resource representing a unit of work in a self-hosted environment.
109104
from line 130
135130
136131 Type of work data
137132
138 - `"session"`
139
140133 - `environment_id: string`
141134
142135 Environment identifier this work belongs to (e.g., `env_...`)
from line 176
183176
184177 The type of object (always 'work')
185178
186 - `"work"`
179 default: work
187180
188### Example
181## Example
189182
190```http
183```bash
191184curl https://api.anthropic.com/v1/environments/$ENVIRONMENT_ID/work/$WORK_ID \
192185 -H 'Content-Type: application/json' \
193186 -H 'anthropic-version: 2023-06-01' \
from line 193
200193 }'
201194```
202195
203#### Response
196### Response (200)
204197
205198```json
206199{
No line in this hunk matches that.