What this read moved
151–175 of 519This capture is too large to show at once. Changes 151-175 of 519 are below, significant first; the rest are on the following screens.
api/beta/deployments/retrieve Changed · +198 / -189 lines
from line 1
1---
2title: Get Deployment
3url: https://platform.claude.com/docs/en/api/beta/deployments/retrieve
4---
5
16# Get Deployment
27
38**GET** `/v1/deployments/{deployment_id}`
from line 21
1621
1722 - `string`
1823
19 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
24 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
2025
2126 - `"message-batches-2024-09-24"`
2227
from line 69
6469
6570 - `"user-profiles-2026-08-18"`
6671
72 - `"user-profiles-2026-09-04"`
73
6774 - `"advisor-tool-2026-03-01"`
6875
6976 - `"managed-agents-2026-04-01"`
from line 113
106113
107114 - `"mid-conversation-system-clear-at-2026-08-21"`
108115
116- `"anthropic-workspace-id": optional string`
117
109118## Returns
110119
111120- `BetaManagedAgentsDeployment object`
from line 121
112121
113122 A deployment is a configured instance of an agent — it binds the agent to everything needed to run it autonomously: an environment, credentials, initial events, and an optional schedule.
114123
124 - `type: "deployment"`
125
115126 - `id: string`
116127
117128 Unique identifier for this deployment.
from line 131
120131
121132 A resolved agent reference with a concrete version.
122133
123 - `id: string`
124
125134 - `type: "agent"`
126135
136 - `id: string`
137
127138 - `version: number`
128139
129140 format: int32
from line 167
156167
157168 A user message sent to the session.
158169
170 - `type: "user.message"`
171
159172 - `content: array of BetaManagedAgentsTextBlock or BetaManagedAgentsImageBlock or BetaManagedAgentsDocumentBlock or BetaManagedAgentsRedactedBlock`
160173
161174 Array of content blocks for the user message.
from line 177
164177
165178 Regular text content.
166179
180 - `type: "text"`
181
167182 - `text: string`
168183
169184 The text content.
from line 185
170185
171186 minLength: 1
172187
173 - `type: "text"`
174
175188 - `BetaManagedAgentsImageBlock object`
176189
177190 Image content specified directly as base64 data or as a reference via a URL.
178191
192 - `type: "image"`
193
179194 - `source: BetaManagedAgentsBase64ImageSource or BetaManagedAgentsURLImageSource or BetaManagedAgentsFileImageSource`
180195
181196 Union type for image source variants.
from line 199
184199
185200 Base64-encoded image data.
186201
202 - `type: "base64"`
203
187204 - `data: string`
188205
189206 Base64-encoded image data.
from line 213
196213
197214 minLength: 1
198215
199 - `type: "base64"`
200
201216 - `BetaManagedAgentsURLImageSource object`
202217
203218 Image referenced by URL.
from line 229
214229
215230 Image referenced by file ID.
216231
232 - `type: "file"`
233
217234 - `file_id: string`
218235
219236 ID of a previously uploaded file.
from line 237
220237
221238 minLength: 1
222239
223 - `type: "file"`
224
225 - `type: "image"`
226
227240 - `BetaManagedAgentsDocumentBlock object`
228241
229242 Document content, either specified directly as base64 data, as text, or as a reference via a URL.
230243
244 - `type: "document"`
245
231246 - `source: BetaManagedAgentsBase64DocumentSource or BetaManagedAgentsPlainTextDocumentSource or BetaManagedAgentsURLDocumentSource or BetaManagedAgentsFileDocumentSource`
232247
233248 Union type for document source variants.
from line 251
236251
237252 Base64-encoded document data.
238253
254 - `type: "base64"`
255
239256 - `data: string`
240257
241258 Base64-encoded document data.
from line 265
248265
249266 minLength: 1
250267
251 - `type: "base64"`
252
253268 - `BetaManagedAgentsPlainTextDocumentSource object`
254269
255270 Plain text document content.
256271
272 - `type: "text"`
273
257274 - `data: string`
258275
259276 The plain text content.
from line 281
264281
265282 MIME type of the text content. Must be "text/plain".
266283
267 - `type: "text"`
268
269284 - `BetaManagedAgentsURLDocumentSource object`
270285
271286 Document referenced by URL.
from line 297
282297
283298 Document referenced by file ID.
284299
300 - `type: "file"`
301
285302 - `file_id: string`
286303
287304 ID of a previously uploaded file.
from line 305
288305
289306 minLength: 1
290307
291 - `type: "file"`
292
293 - `type: "document"`
294
295308 - `context: optional string or null`
296309
297310 Additional context about the document for the model.
from line 319
306319
307320 - `type: "redacted"`
308321
309 - `type: "user.message"`
310
311322 - `BetaManagedAgentsDeploymentUserDefineOutcomeEvent object`
312323
313324 An outcome the agent should work toward. The agent begins work on receipt.
314325
326 - `type: "user.define_outcome"`
327
315328 - `description: string`
316329
317330 What the agent should produce. This is the task specification.
from line 337
324337
325338 Rubric referenced by a file uploaded via the Files API.
326339
340 - `type: "file"`
341
327342 - `file_id: string`
328343
329344 ID of the rubric file.
330345
331 - `type: "file"`
332
333346 - `BetaManagedAgentsTextRubric object`
334347
335348 Rubric content provided inline as text.
336349
350 - `type: "text"`
351
337352 - `content: string`
338353
339354 Rubric content. Plain text or markdown — the grader treats it as freeform text.
340355
341 - `type: "text"`
342
343 - `type: "user.define_outcome"`
344
345356 - `max_iterations: optional number or null`
346357
347358 Eval→revision cycles before giving up. Default 3, max 20.
from line 363
352363
353364 Privileged context for the accompanying turn and all subsequent turns, appended to the session's system context as a `role: "system"` turn rather than replacing the top-level system prompt.
354365
366 - `type: "system.message"`
367
355368 - `content: array of BetaManagedAgentsSystemContentBlock`
356369
357370 System content blocks to append. Text-only.
358371
372 - `type: "text"`
373
359374 - `text: string`
360375
361376 The text content.
from line 377
362377
363378 minLength: 1
364379
365 - `type: "text"`
366
367 - `type: "system.message"`
368
369380 - `metadata: map[string]`
370381
371382 Arbitrary key-value metadata. Maximum 16 pairs.
from line 399
388399
389400 A scheduled fire recorded a failed run whose error auto-pauses the deployment.
390401
402 - `type: "error"`
403
391404 - `error: BetaManagedAgentsDeploymentPausedReasonError`
392405
393406 The error that triggered an auto-pause. Matches the failed run's `error.type`.
from line 489
476489
477490 - `type: "mcp_egress_blocked_error"`
478491
479 - `type: "error"`
480
481492 - `resources: array of BetaManagedAgentsSessionResourceConfig`
482493
483494 Resources attached to sessions created from this deployment. Echoes the input minus write-only credentials.
from line 509
498509
499510 - `BetaManagedAgentsBranchCheckout object`
500511
512 - `type: "branch"`
513
501514 - `name: string`
502515
503516 Branch name to check out.
from line 517
504517
505518 minLength: 1, maxLength: 255
506519
507 - `type: "branch"`
508
509520 - `BetaManagedAgentsCommitCheckout object`
510521
522 - `type: "commit"`
523
511524 - `sha: string`
512525
513526 Full commit SHA to check out.
from line 527
514527
515528 minLength: 7, maxLength: 64
516529
517 - `type: "commit"`
518
519530 - `mount_path: optional string or null`
520531
521532 Mount path in the container. Defaults to `/workspace/<repo-name>`.
from line 535
524535
525536 A file mounted into each session's container.
526537
538 - `type: "file"`
539
527540 - `file_id: string`
528541
529542 ID of a previously uploaded file.
530543
531 - `type: "file"`
532
533544 - `mount_path: optional string or null`
534545
535546 Mount path in the container. Defaults to `/mnt/session/uploads/<file_id>`.
from line 549
538549
539550 A memory store attached to each session created from this deployment.
540551
552 - `type: "memory_store"`
553
541554 - `memory_store_id: string`
542555
543556 The memory store ID (memstore_...). Must belong to the caller's organization and workspace.
544557
545 - `type: "memory_store"`
546
547558 - `access: optional "read_write" or "read_only" or null`
548559
549560 Access mode for an attached memory store.
from line 571
560571
561572 5-field POSIX cron schedule with computed runtime timestamps.
562573
574 - `type: "cron"`
575
563576 - `expression: string`
564577
565578 5-field POSIX cron expression: minute hour day-of-month month day-of-week (e.g., "0 9 * * 1-5" for weekdays at 9am). Day-of-week is 0-7 where 0 and 7 both mean Sunday. Extended cron syntax - seconds or year fields, and the special characters L, W, #, and ? - is not supported, nor are predefined shortcuts (@daily).
from line 585
572585
573586 minLength: 1
574587
575 - `type: "cron"`
576
577588 - `last_run_at: optional string or null`
578589
579590 A timestamp in RFC 3339 format
from line 603
592603
593604 - `"paused"`
594605
595 - `type: "deployment"`
596
597606 - `updated_at: string`
598607
599608 A timestamp in RFC 3339 format
from line 617
608617
609618 A hard spend ceiling. The session stops issuing new model requests once the tracked list cost reaches `max_list_cost`.
610619
620 - `type: "limit"`
621
611622 - `max_list_cost: BetaMonetaryAmount`
612623
613624 A monetary amount in a specific currency.
from line 630
619630 - `currency: BetaCurrency`
620631
621632 Uppercase ISO-4217 currency code. `USD` is the only currency currently supported; the accepted set is closed and grows only when a new currency is priced.
622
623 - `type: "limit"`
624633
625634## Example
626635
api/beta/deployments/run Changed · +80 / -71 lines
from line 1
1---
2title: Run Deployment Now
3url: https://platform.claude.com/docs/en/api/beta/deployments/run
4---
5
16# Run Deployment Now
27
38**POST** `/v1/deployments/{deployment_id}/run`
from line 21
1621
1722 - `string`
1823
19 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
24 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
2025
2126 - `"message-batches-2024-09-24"`
2227
from line 69
6469
6570 - `"user-profiles-2026-08-18"`
6671
72 - `"user-profiles-2026-09-04"`
73
6774 - `"advisor-tool-2026-03-01"`
6875
6976 - `"managed-agents-2026-04-01"`
from line 113
106113
107114 - `"mid-conversation-system-clear-at-2026-08-21"`
108115
116- `"anthropic-workspace-id": optional string`
117
109118## Returns
110119
111120- `BetaManagedAgentsDeploymentRun object`
from line 121
112121
113122 A persistent, append-only record of a single deployment execution. Records session creation success or failure — no session lifecycle tracking.
114123
124 - `type: "deployment_run"`
125
115126 - `id: string`
116127
117128 Unique identifier for this run (`drun_...`).
from line 131
120131
121132 A resolved agent reference with a concrete version.
122133
123 - `id: string`
124
125134 - `type: "agent"`
126135
136 - `id: string`
137
127138 - `version: number`
128139
129140 format: int32
from line 157
146157
147158 The deployment's environment was archived.
148159
160 - `type: "environment_archived_error"`
161
149162 - `message: string`
150163
151164 Human-readable error description.
152165
153 - `type: "environment_archived_error"`
154
155166 - `BetaManagedAgentsAgentArchivedRunError object`
156167
157168 The deployment's agent was archived.
158169
170 - `type: "agent_archived_error"`
171
159172 - `message: string`
160173
161174 Human-readable error description.
162175
163 - `type: "agent_archived_error"`
164
165176 - `BetaManagedAgentsEnvironmentNotFoundRunError object`
166177
167178 The deployment's environment no longer exists.
168179
180 - `type: "environment_not_found_error"`
181
169182 - `message: string`
170183
171184 Human-readable error description.
172185
173 - `type: "environment_not_found_error"`
174
175186 - `BetaManagedAgentsVaultNotFoundRunError object`
176187
177188 A vault referenced by the deployment no longer exists.
178189
190 - `type: "vault_not_found_error"`
191
179192 - `message: string`
180193
181194 Human-readable error description.
182195
183 - `type: "vault_not_found_error"`
184
185196 - `BetaManagedAgentsVaultArchivedRunError object`
186197
187198 A vault referenced by the deployment is archived.
188199
200 - `type: "vault_archived_error"`
201
189202 - `message: string`
190203
191204 Human-readable error description.
192205
193 - `type: "vault_archived_error"`
194
195206 - `BetaManagedAgentsFileNotFoundRunError object`
196207
197208 A file resource referenced by the deployment no longer exists.
198209
210 - `type: "file_not_found_error"`
211
199212 - `message: string`
200213
201214 Human-readable error description.
202215
203 - `type: "file_not_found_error"`
204
205216 - `BetaManagedAgentsMemoryStoreArchivedRunError object`
206217
207218 A memory store referenced by the deployment is archived.
208219
220 - `type: "memory_store_archived_error"`
221
209222 - `message: string`
210223
211224 Human-readable error description.
212225
213 - `type: "memory_store_archived_error"`
214
215226 - `BetaManagedAgentsSkillNotFoundRunError object`
216227
217228 A skill referenced by the deployment's agent no longer exists.
218229
230 - `type: "skill_not_found_error"`
231
219232 - `message: string`
220233
221234 Human-readable error description.
222235
223 - `type: "skill_not_found_error"`
224
225236 - `BetaManagedAgentsSessionResourceNotFoundRunError object`
226237
227238 A referenced resource no longer exists and its kind was not reported.
228239
240 - `type: "session_resource_not_found_error"`
241
229242 - `message: string`
230243
231244 Human-readable error description.
232245
233 - `type: "session_resource_not_found_error"`
234
235246 - `BetaManagedAgentsWorkspaceArchivedRunError object`
236247
237248 The deployment's workspace was archived.
238249
250 - `type: "workspace_archived_error"`
251
239252 - `message: string`
240253
241254 Human-readable error description.
242255
243 - `type: "workspace_archived_error"`
244
245256 - `BetaManagedAgentsOrganizationDisabledRunError object`
246257
247258 The deployment's organization is disabled.
248259
260 - `type: "organization_disabled_error"`
261
249262 - `message: string`
250263
251264 Human-readable error description.
252265
253 - `type: "organization_disabled_error"`
254
255266 - `BetaManagedAgentsSessionRateLimitedRunError object`
256267
257268 Session creation was rejected due to rate limiting. The schedule keeps firing; subsequent runs may succeed.
258269
270 - `type: "session_rate_limited_error"`
271
259272 - `message: string`
260273
261274 Human-readable error description.
262275
263 - `type: "session_rate_limited_error"`
264
265276 - `BetaManagedAgentsSessionCreationRejectedRunError object`
266277
267278 The session create request was rejected with a non-retryable validation error.
268279
280 - `type: "session_creation_rejected_error"`
281
269282 - `message: string`
270283
271284 Human-readable error description.
272285
273 - `type: "session_creation_rejected_error"`
274
275286 - `BetaManagedAgentsUnknownRunError object`
276287
277288 An unknown or unexpected error caused the run to fail. A fallback variant; clients that do not recognize a new error type can match on message alone.
278289
290 - `type: "unknown_error"`
291
279292 - `message: string`
280293
281294 Human-readable error description.
282295
283 - `type: "unknown_error"`
284
285296 - `BetaManagedAgentsSelfHostedResourcesUnsupportedRunError object`
286297
287298 The deployment configures resources, but its environment is self-hosted and cannot mount them.
288299
300 - `type: "self_hosted_resources_unsupported_error"`
301
289302 - `message: string`
290303
291304 Human-readable error description.
292305
293 - `type: "self_hosted_resources_unsupported_error"`
294
295306 - `BetaManagedAgentsMCPEgressBlockedRunError object`
296307
297308 An MCP server host used by the deployment's agent is blocked by the environment's network policy.
298309
310 - `type: "mcp_egress_blocked_error"`
311
299312 - `message: string`
300313
301314 Human-readable error description.
302315
303 - `type: "mcp_egress_blocked_error"`
304
305316 - `session_id: string or null`
306317
307318 Populated on success. Null on creation failure. Exactly one of `session_id` or `error` is non-null.
from line 325
314325
315326 The run was fired by the deployment's cron schedule.
316327
328 - `type: "schedule"`
329
317330 - `scheduled_at: string`
318331
319332 A timestamp in RFC 3339 format
from line 333
320333
321334 format: date-time
322335
323 - `type: "schedule"`
324
325336 - `BetaManagedAgentsManualTriggerContext object`
326337
327338 The run was started manually by creating a session directly against the deployment.
328339
329340 - `type: "manual"`
330
331 - `type: "deployment_run"`
332341
333342## Example
334343
api/beta/deployments/unpause Changed · +198 / -189 lines
from line 1
1---
2title: Unpause Deployment
3url: https://platform.claude.com/docs/en/api/beta/deployments/unpause
4---
5
16# Unpause Deployment
27
38**POST** `/v1/deployments/{deployment_id}/unpause`
from line 21
1621
1722 - `string`
1823
19 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
24 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
2025
2126 - `"message-batches-2024-09-24"`
2227
from line 69
6469
6570 - `"user-profiles-2026-08-18"`
6671
72 - `"user-profiles-2026-09-04"`
73
6774 - `"advisor-tool-2026-03-01"`
6875
6976 - `"managed-agents-2026-04-01"`
from line 113
106113
107114 - `"mid-conversation-system-clear-at-2026-08-21"`
108115
116- `"anthropic-workspace-id": optional string`
117
109118## Returns
110119
111120- `BetaManagedAgentsDeployment object`
from line 121
112121
113122 A deployment is a configured instance of an agent — it binds the agent to everything needed to run it autonomously: an environment, credentials, initial events, and an optional schedule.
114123
124 - `type: "deployment"`
125
115126 - `id: string`
116127
117128 Unique identifier for this deployment.
from line 131
120131
121132 A resolved agent reference with a concrete version.
122133
123 - `id: string`
124
125134 - `type: "agent"`
126135
136 - `id: string`
137
127138 - `version: number`
128139
129140 format: int32
from line 167
156167
157168 A user message sent to the session.
158169
170 - `type: "user.message"`
171
159172 - `content: array of BetaManagedAgentsTextBlock or BetaManagedAgentsImageBlock or BetaManagedAgentsDocumentBlock or BetaManagedAgentsRedactedBlock`
160173
161174 Array of content blocks for the user message.
from line 177
164177
165178 Regular text content.
166179
180 - `type: "text"`
181
167182 - `text: string`
168183
169184 The text content.
from line 185
170185
171186 minLength: 1
172187
173 - `type: "text"`
174
175188 - `BetaManagedAgentsImageBlock object`
176189
177190 Image content specified directly as base64 data or as a reference via a URL.
178191
192 - `type: "image"`
193
179194 - `source: BetaManagedAgentsBase64ImageSource or BetaManagedAgentsURLImageSource or BetaManagedAgentsFileImageSource`
180195
181196 Union type for image source variants.
from line 199
184199
185200 Base64-encoded image data.
186201
202 - `type: "base64"`
203
187204 - `data: string`
188205
189206 Base64-encoded image data.
from line 213
196213
197214 minLength: 1
198215
199 - `type: "base64"`
200
201216 - `BetaManagedAgentsURLImageSource object`
202217
203218 Image referenced by URL.
from line 229
214229
215230 Image referenced by file ID.
216231
232 - `type: "file"`
233
217234 - `file_id: string`
218235
219236 ID of a previously uploaded file.
from line 237
220237
221238 minLength: 1
222239
223 - `type: "file"`
224
225 - `type: "image"`
226
227240 - `BetaManagedAgentsDocumentBlock object`
228241
229242 Document content, either specified directly as base64 data, as text, or as a reference via a URL.
230243
244 - `type: "document"`
245
231246 - `source: BetaManagedAgentsBase64DocumentSource or BetaManagedAgentsPlainTextDocumentSource or BetaManagedAgentsURLDocumentSource or BetaManagedAgentsFileDocumentSource`
232247
233248 Union type for document source variants.
from line 251
236251
237252 Base64-encoded document data.
238253
254 - `type: "base64"`
255
239256 - `data: string`
240257
241258 Base64-encoded document data.
from line 265
248265
249266 minLength: 1
250267
251 - `type: "base64"`
252
253268 - `BetaManagedAgentsPlainTextDocumentSource object`
254269
255270 Plain text document content.
256271
272 - `type: "text"`
273
257274 - `data: string`
258275
259276 The plain text content.
from line 281
264281
265282 MIME type of the text content. Must be "text/plain".
266283
267 - `type: "text"`
268
269284 - `BetaManagedAgentsURLDocumentSource object`
270285
271286 Document referenced by URL.
from line 297
282297
283298 Document referenced by file ID.
284299
300 - `type: "file"`
301
285302 - `file_id: string`
286303
287304 ID of a previously uploaded file.
from line 305
288305
289306 minLength: 1
290307
291 - `type: "file"`
292
293 - `type: "document"`
294
295308 - `context: optional string or null`
296309
297310 Additional context about the document for the model.
from line 319
306319
307320 - `type: "redacted"`
308321
309 - `type: "user.message"`
310
311322 - `BetaManagedAgentsDeploymentUserDefineOutcomeEvent object`
312323
313324 An outcome the agent should work toward. The agent begins work on receipt.
314325
326 - `type: "user.define_outcome"`
327
315328 - `description: string`
316329
317330 What the agent should produce. This is the task specification.
from line 337
324337
325338 Rubric referenced by a file uploaded via the Files API.
326339
340 - `type: "file"`
341
327342 - `file_id: string`
328343
329344 ID of the rubric file.
330345
331 - `type: "file"`
332
333346 - `BetaManagedAgentsTextRubric object`
334347
335348 Rubric content provided inline as text.
336349
350 - `type: "text"`
351
337352 - `content: string`
338353
339354 Rubric content. Plain text or markdown — the grader treats it as freeform text.
340355
341 - `type: "text"`
342
343 - `type: "user.define_outcome"`
344
345356 - `max_iterations: optional number or null`
346357
347358 Eval→revision cycles before giving up. Default 3, max 20.
from line 363
352363
353364 Privileged context for the accompanying turn and all subsequent turns, appended to the session's system context as a `role: "system"` turn rather than replacing the top-level system prompt.
354365
366 - `type: "system.message"`
367
355368 - `content: array of BetaManagedAgentsSystemContentBlock`
356369
357370 System content blocks to append. Text-only.
358371
372 - `type: "text"`
373
359374 - `text: string`
360375
361376 The text content.
from line 377
362377
363378 minLength: 1
364379
365 - `type: "text"`
366
367 - `type: "system.message"`
368
369380 - `metadata: map[string]`
370381
371382 Arbitrary key-value metadata. Maximum 16 pairs.
from line 399
388399
389400 A scheduled fire recorded a failed run whose error auto-pauses the deployment.
390401
402 - `type: "error"`
403
391404 - `error: BetaManagedAgentsDeploymentPausedReasonError`
392405
393406 The error that triggered an auto-pause. Matches the failed run's `error.type`.
from line 489
476489
477490 - `type: "mcp_egress_blocked_error"`
478491
479 - `type: "error"`
480
481492 - `resources: array of BetaManagedAgentsSessionResourceConfig`
482493
483494 Resources attached to sessions created from this deployment. Echoes the input minus write-only credentials.
from line 509
498509
499510 - `BetaManagedAgentsBranchCheckout object`
500511
512 - `type: "branch"`
513
501514 - `name: string`
502515
503516 Branch name to check out.
from line 517
504517
505518 minLength: 1, maxLength: 255
506519
507 - `type: "branch"`
508
509520 - `BetaManagedAgentsCommitCheckout object`
510521
522 - `type: "commit"`
523
511524 - `sha: string`
512525
513526 Full commit SHA to check out.
from line 527
514527
515528 minLength: 7, maxLength: 64
516529
517 - `type: "commit"`
518
519530 - `mount_path: optional string or null`
520531
521532 Mount path in the container. Defaults to `/workspace/<repo-name>`.
from line 535
524535
525536 A file mounted into each session's container.
526537
538 - `type: "file"`
539
527540 - `file_id: string`
528541
529542 ID of a previously uploaded file.
530543
531 - `type: "file"`
532
533544 - `mount_path: optional string or null`
534545
535546 Mount path in the container. Defaults to `/mnt/session/uploads/<file_id>`.
from line 549
538549
539550 A memory store attached to each session created from this deployment.
540551
552 - `type: "memory_store"`
553
541554 - `memory_store_id: string`
542555
543556 The memory store ID (memstore_...). Must belong to the caller's organization and workspace.
544557
545 - `type: "memory_store"`
546
547558 - `access: optional "read_write" or "read_only" or null`
548559
549560 Access mode for an attached memory store.
from line 571
560571
561572 5-field POSIX cron schedule with computed runtime timestamps.
562573
574 - `type: "cron"`
575
563576 - `expression: string`
564577
565578 5-field POSIX cron expression: minute hour day-of-month month day-of-week (e.g., "0 9 * * 1-5" for weekdays at 9am). Day-of-week is 0-7 where 0 and 7 both mean Sunday. Extended cron syntax - seconds or year fields, and the special characters L, W, #, and ? - is not supported, nor are predefined shortcuts (@daily).
from line 585
572585
573586 minLength: 1
574587
575 - `type: "cron"`
576
577588 - `last_run_at: optional string or null`
578589
579590 A timestamp in RFC 3339 format
from line 603
592603
593604 - `"paused"`
594605
595 - `type: "deployment"`
596
597606 - `updated_at: string`
598607
599608 A timestamp in RFC 3339 format
from line 617
608617
609618 A hard spend ceiling. The session stops issuing new model requests once the tracked list cost reaches `max_list_cost`.
610619
620 - `type: "limit"`
621
611622 - `max_list_cost: BetaMonetaryAmount`
612623
613624 A monetary amount in a specific currency.
from line 630
619630 - `currency: BetaCurrency`
620631
621632 Uppercase ISO-4217 currency code. `USD` is the only currency currently supported; the accepted set is closed and grows only when a new currency is priced.
622
623 - `type: "limit"`
624633
625634## Example
626635
api/beta/deployments/update Changed · +873 / -864 lines
from line 1
1---
2title: Update Deployment
3url: https://platform.claude.com/docs/en/api/beta/deployments/update
4---
5
16# Update Deployment
27
38**POST** `/v1/deployments/{deployment_id}`
from line 21
1621
1722 - `string`
1823
19 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
24 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
2025
2126 - `"message-batches-2024-09-24"`
2227
from line 69
6469
6570 - `"user-profiles-2026-08-18"`
6671
72 - `"user-profiles-2026-09-04"`
73
6774 - `"advisor-tool-2026-03-01"`
6875
6976 - `"managed-agents-2026-04-01"`
from line 113
106113
107114 - `"mid-conversation-system-clear-at-2026-08-21"`
108115
116- `"anthropic-workspace-id": optional string`
117
109118## Body parameters
110119
111120- `agent: optional string or BetaManagedAgentsAgentParams`
from line 127
118127
119128 Specification for an Agent. Provide a specific `version` or use the short-form `agent="agent_id"` for the most recent version
120129
130 - `type: "agent"`
131
121132 - `id: string`
122133
123134 The `agent` ID.
from line 135
124135
125136 minLength: 1, maxLength: 128
126137
127 - `type: "agent"`
128
129138 - `version: optional number`
130139
131140 The specific `agent` version to use. Omit to use the latest version. Must be at least 1 if specified.
from line 145
136145
137146 A hard spend ceiling. The session stops issuing new model requests once the tracked list cost reaches `max_list_cost`.
138147
148 - `type: "limit"`
149
139150 - `max_list_cost: BetaMonetaryAmount`
140151
141152 A monetary amount in a specific currency.
from line 159
148159
149160 Uppercase ISO-4217 currency code. `USD` is the only currency currently supported; the accepted set is closed and grows only when a new currency is priced.
150161
151 - `type: "limit"`
152
153162- `description: optional string or null`
154163
155164 Description. Omit to preserve; send empty string or null to clear.
from line 179
170179
171180 Parameters for sending a user message to the session.
172181
182 - `type: "user.message"`
183
173184 - `content: array of BetaManagedAgentsTextBlock or BetaManagedAgentsImageBlock or BetaManagedAgentsDocumentBlock or BetaManagedAgentsRedactedBlock`
174185
175186 Array of content blocks for the user message.
from line 189
178189
179190 Regular text content.
180191
192 - `type: "text"`
193
181194 - `text: string`
182195
183196 The text content.
from line 197
184197
185198 minLength: 1
186199
187 - `type: "text"`
188
189200 - `BetaManagedAgentsImageBlock object`
190201
191202 Image content specified directly as base64 data or as a reference via a URL.
192203
204 - `type: "image"`
205
193206 - `source: BetaManagedAgentsBase64ImageSource or BetaManagedAgentsURLImageSource or BetaManagedAgentsFileImageSource`
194207
195208 Union type for image source variants.
from line 211
198211
199212 Base64-encoded image data.
200213
214 - `type: "base64"`
215
201216 - `data: string`
202217
203218 Base64-encoded image data.
from line 225
210225
211226 minLength: 1
212227
213 - `type: "base64"`
214
215228 - `BetaManagedAgentsURLImageSource object`
216229
217230 Image referenced by URL.
from line 241
228241
229242 Image referenced by file ID.
230243
244 - `type: "file"`
245
231246 - `file_id: string`
232247
233248 ID of a previously uploaded file.
from line 249
234249
235250 minLength: 1
236251
237 - `type: "file"`
238
239 - `type: "image"`
240
241252 - `BetaManagedAgentsDocumentBlock object`
242253
243254 Document content, either specified directly as base64 data, as text, or as a reference via a URL.
244255
256 - `type: "document"`
257
245258 - `source: BetaManagedAgentsBase64DocumentSource or BetaManagedAgentsPlainTextDocumentSource or BetaManagedAgentsURLDocumentSource or BetaManagedAgentsFileDocumentSource`
246259
247260 Union type for document source variants.
from line 263
250263
251264 Base64-encoded document data.
252265
266 - `type: "base64"`
267
253268 - `data: string`
254269
255270 Base64-encoded document data.
from line 277
262277
263278 minLength: 1
264279
265 - `type: "base64"`
266
267280 - `BetaManagedAgentsPlainTextDocumentSource object`
268281
269282 Plain text document content.
270283
284 - `type: "text"`
285
271286 - `data: string`
272287
273288 The plain text content.
from line 293
278293
279294 MIME type of the text content. Must be "text/plain".
280295
281 - `type: "text"`
282
283296 - `BetaManagedAgentsURLDocumentSource object`
284297
285298 Document referenced by URL.
from line 309
296309
297310 Document referenced by file ID.
298311
312 - `type: "file"`
313
299314 - `file_id: string`
300315
301316 ID of a previously uploaded file.
from line 317
302317
303318 minLength: 1
304319
305 - `type: "file"`
306
307 - `type: "document"`
308
309320 - `context: optional string or null`
310321
311322 Additional context about the document for the model.
from line 331
320331
321332 - `type: "redacted"`
322333
323 - `type: "user.message"`
324
325334 - `BetaManagedAgentsUserDefineOutcomeEventParams object`
326335
327336 Parameters for defining an outcome the agent should work toward. The agent begins work on receipt.
328337
338 - `type: "user.define_outcome"`
339
329340 - `description: string`
330341
331342 What the agent should produce. This is the task specification.
from line 349
338349
339350 Rubric referenced by a file uploaded via the Files API.
340351
352 - `type: "file"`
353
341354 - `file_id: string`
342355
343356 ID of the rubric file.
344357
345 - `type: "file"`
346
347358 - `BetaManagedAgentsTextRubricParams object`
348359
349360 Rubric content provided inline as text.
350361
362 - `type: "text"`
363
351364 - `content: string`
352365
353366 Rubric content. Plain text or markdown — the grader treats it as freeform text. Maximum 262144 characters.
from line 367
354367
355368 maxLength: 262144
356369
357 - `type: "text"`
358
359 - `type: "user.define_outcome"`
360
361370 - `max_iterations: optional number or null`
362371
363372 Eval→revision cycles before giving up. Default 3, max 20.
from line 377
368377
369378 Privileged context for the accompanying turn and all subsequent turns, appended to the session's system context as a `role: "system"` turn rather than replacing the top-level system prompt. At most one per request: it must be the final event and immediately follow the `user.message`, `user.tool_result`, or `user.custom_tool_result` it accompanies. Only supported on models that accept mid-conversation system messages.
370379
380 - `type: "system.message"`
381
371382 - `content: array of BetaManagedAgentsSystemContentBlock`
372383
373384 System content blocks to append. Text-only.
374385
386 - `type: "text"`
387
375388 - `text: string`
376389
377390 The text content.
from line 391
378391
379392 minLength: 1
380393
381 - `type: "text"`
382
383 - `type: "system.message"`
384
385394- `metadata: optional map[string] or null`
386395
387396 Metadata patch. Set a key to a string to upsert it, or to null to delete it. Omit the field to preserve. The stored bag is limited to 16 keys (up to 64 chars each) with values up to 512 chars.
from line 409
400409
401410 Mount a GitHub repository into the session's container.
402411
403 - `authorization_token: string`
404
405 GitHub authorization token used to clone the repository.
406
407 minLength: 1, maxLength: 4096
408
409412 - `type: "github_repository"`
410413
411414 - `url: string`
from line 417
414417
415418 minLength: 1, maxLength: 2048
416419
420 - `authorization_token: optional string`
421
422 GitHub authorization token used to clone the repository. Required for private repositories; optional for public ones.
423
424 minLength: 1, maxLength: 4096
425
417426 - `checkout: optional BetaManagedAgentsBranchCheckout or BetaManagedAgentsCommitCheckout or null`
418427
419428 Branch or commit to check out. Defaults to the repository's default branch.
from line 429
420429
421430 - `BetaManagedAgentsBranchCheckout object`
422431
432 - `type: "branch"`
433
423434 - `name: string`
424435
425436 Branch name to check out.
from line 437
426437
427438 minLength: 1, maxLength: 255
428439
429 - `type: "branch"`
430
431440 - `BetaManagedAgentsCommitCheckout object`
432441
442 - `type: "commit"`
443
433444 - `sha: string`
434445
435446 Full commit SHA to check out.
from line 447
436447
437448 minLength: 7, maxLength: 64
438449
439 - `type: "commit"`
440
441450 - `mount_path: optional string or null`
442451
443452 Mount path in the container. Defaults to `/workspace/<repo-name>`.
from line 457
448457
449458 Mount a file uploaded via the Files API into the session.
450459
460 - `type: "file"`
461
451462 - `file_id: string`
452463
453464 ID of a previously uploaded file.
from line 465
454465
455466 minLength: 1, maxLength: 128
456467
457 - `type: "file"`
458
459468 - `mount_path: optional string or null`
460469
461470 Mount path in the container. Defaults to `/mnt/session/uploads/<file_id>`.
from line 475
466475
467476 Parameters for attaching a memory store to an agent session.
468477
478 - `type: "memory_store"`
479
469480 - `memory_store_id: string`
470481
471482 The memory store ID (memstore_...). Must belong to the caller's organization and workspace.
472483
473 - `type: "memory_store"`
474
475484 - `access: optional "read_write" or "read_only" or null`
476485
477486 Access mode for an attached memory store.
from line 499
490499
491500 5-field POSIX cron schedule. Literal wall-clock matching in the configured timezone.
492501
502 - `type: "cron"`
503
493504 - `expression: string`
494505
495506 5-field POSIX cron expression: minute hour day-of-month month day-of-week (e.g., "0 9 * * 1-5" for weekdays at 9am). Day-of-week is 0-7 where 0 and 7 both mean Sunday. Extended cron syntax - seconds or year fields, and the special characters L, W, #, and ? - is not supported, nor are predefined shortcuts (@daily).
from line 513
502513
503514 minLength: 1
504515
505 - `type: "cron"`
506
507516- `vault_ids: optional array of string or null`
508517
509518 Vault IDs. Full replacement. Omit to preserve; send empty array or null to clear. Maximum 50.
from line 523
514523
515524 A deployment is a configured instance of an agent — it binds the agent to everything needed to run it autonomously: an environment, credentials, initial events, and an optional schedule.
516525
526 - `type: "deployment"`
527
517528 - `id: string`
518529
519530 Unique identifier for this deployment.
from line 533
522533
523534 A resolved agent reference with a concrete version.
524535
525 - `id: string`
526
527536 - `type: "agent"`
528537
538 - `id: string`
539
529540 - `version: number`
530541
531542 format: int32
from line 569
558569
559570 A user message sent to the session.
560571
572 - `type: "user.message"`
573
561574 - `content: array of BetaManagedAgentsTextBlock or BetaManagedAgentsImageBlock or BetaManagedAgentsDocumentBlock or BetaManagedAgentsRedactedBlock`
562575
563576 Array of content blocks for the user message.
from line 579
566579
567580 Regular text content.
568581
582 - `type: "text"`
583
569584 - `text: string`
570585
571586 The text content.
from line 587
572587
573588 minLength: 1
574589
575 - `type: "text"`
576
577590 - `BetaManagedAgentsImageBlock object`
578591
579592 Image content specified directly as base64 data or as a reference via a URL.
580593
594 - `type: "image"`
595
581596 - `source: BetaManagedAgentsBase64ImageSource or BetaManagedAgentsURLImageSource or BetaManagedAgentsFileImageSource`
582597
583598 Union type for image source variants.
from line 601
586601
587602 Base64-encoded image data.
588603
604 - `type: "base64"`
605
589606 - `data: string`
590607
591608 Base64-encoded image data.
from line 615
598615
599616 minLength: 1
600617
601 - `type: "base64"`
602
603618 - `BetaManagedAgentsURLImageSource object`
604619
605620 Image referenced by URL.
from line 631
616631
617632 Image referenced by file ID.
618633
634 - `type: "file"`
635
619636 - `file_id: string`
620637
621638 ID of a previously uploaded file.
from line 639
622639
623640 minLength: 1
624641
625 - `type: "file"`
626
627 - `type: "image"`
628
629642 - `BetaManagedAgentsDocumentBlock object`
630643
631644 Document content, either specified directly as base64 data, as text, or as a reference via a URL.
632645
646 - `type: "document"`
647
633648 - `source: BetaManagedAgentsBase64DocumentSource or BetaManagedAgentsPlainTextDocumentSource or BetaManagedAgentsURLDocumentSource or BetaManagedAgentsFileDocumentSource`
634649
635650 Union type for document source variants.
from line 653
638653
639654 Base64-encoded document data.
640655
656 - `type: "base64"`
657
641658 - `data: string`
642659
643660 Base64-encoded document data.
from line 667
650667
651668 minLength: 1
652669
653 - `type: "base64"`
654
655670 - `BetaManagedAgentsPlainTextDocumentSource object`
656671
657672 Plain text document content.
658673
674 - `type: "text"`
675
659676 - `data: string`
660677
661678 The plain text content.
from line 683
666683
667684 MIME type of the text content. Must be "text/plain".
668685
669 - `type: "text"`
670
671686 - `BetaManagedAgentsURLDocumentSource object`
672687
673688 Document referenced by URL.
from line 699
684699
685700 Document referenced by file ID.
686701
702 - `type: "file"`
703
687704 - `file_id: string`
688705
689706 ID of a previously uploaded file.
from line 707
690707
691708 minLength: 1
692709
693 - `type: "file"`
694
695 - `type: "document"`
696
697710 - `context: optional string or null`
698711
699712 Additional context about the document for the model.
from line 721
708721
709722 - `type: "redacted"`
710723
711 - `type: "user.message"`
712
713724 - `BetaManagedAgentsDeploymentUserDefineOutcomeEvent object`
714725
715726 An outcome the agent should work toward. The agent begins work on receipt.
716727
728 - `type: "user.define_outcome"`
729
717730 - `description: string`
718731
719732 What the agent should produce. This is the task specification.
from line 739
726739
727740 Rubric referenced by a file uploaded via the Files API.
728741
742 - `type: "file"`
743
729744 - `file_id: string`
730745
731746 ID of the rubric file.
732747
733 - `type: "file"`
734
735748 - `BetaManagedAgentsTextRubric object`
736749
737750 Rubric content provided inline as text.
738751
752 - `type: "text"`
753
739754 - `content: string`
740755
741756 Rubric content. Plain text or markdown — the grader treats it as freeform text.
742757
743 - `type: "text"`
744
745 - `type: "user.define_outcome"`
746
747758 - `max_iterations: optional number or null`
748759
749760 Eval→revision cycles before giving up. Default 3, max 20.
from line 765
754765
755766 Privileged context for the accompanying turn and all subsequent turns, appended to the session's system context as a `role: "system"` turn rather than replacing the top-level system prompt.
756767
768 - `type: "system.message"`
769
757770 - `content: array of BetaManagedAgentsSystemContentBlock`
758771
759772 System content blocks to append. Text-only.
760773
774 - `type: "text"`
775
761776 - `text: string`
762777
763778 The text content.
from line 779
764779
765780 minLength: 1
766781
767 - `type: "text"`
768
769 - `type: "system.message"`
770
771782 - `metadata: map[string]`
772783
773784 Arbitrary key-value metadata. Maximum 16 pairs.
from line 801
790801
791802 A scheduled fire recorded a failed run whose error auto-pauses the deployment.
792803
804 - `type: "error"`
805
793806 - `error: BetaManagedAgentsDeploymentPausedReasonError`
794807
795808 The error that triggered an auto-pause. Matches the failed run's `error.type`.
from line 891
878891
879892 - `type: "mcp_egress_blocked_error"`
880893
881 - `type: "error"`
882
883894 - `resources: array of BetaManagedAgentsSessionResourceConfig`
884895
885896 Resources attached to sessions created from this deployment. Echoes the input minus write-only credentials.
from line 911
900911
901912 - `BetaManagedAgentsBranchCheckout object`
902913
914 - `type: "branch"`
915
903916 - `name: string`
904917
905918 Branch name to check out.
from line 919
906919
907920 minLength: 1, maxLength: 255
908921
909 - `type: "branch"`
910
911922 - `BetaManagedAgentsCommitCheckout object`
912923
924 - `type: "commit"`
925
913926 - `sha: string`
914927
915928 Full commit SHA to check out.
from line 929
916929
917930 minLength: 7, maxLength: 64
918931
919 - `type: "commit"`
920
921932 - `mount_path: optional string or null`
922933
923934 Mount path in the container. Defaults to `/workspace/<repo-name>`.
from line 937
926937
927938 A file mounted into each session's container.
928939
940 - `type: "file"`
941
929942 - `file_id: string`
930943
931944 ID of a previously uploaded file.
932945
933 - `type: "file"`
934
935946 - `mount_path: optional string or null`
936947
937948 Mount path in the container. Defaults to `/mnt/session/uploads/<file_id>`.
from line 951
940951
941952 A memory store attached to each session created from this deployment.
942953
954 - `type: "memory_store"`
955
943956 - `memory_store_id: string`
944957
945958 The memory store ID (memstore_...). Must belong to the caller's organization and workspace.
946959
947 - `type: "memory_store"`
948
949960 - `access: optional "read_write" or "read_only" or null`
950961
951962 Access mode for an attached memory store.
from line 973
962973
963974 5-field POSIX cron schedule with computed runtime timestamps.
964975
976 - `type: "cron"`
977
965978 - `expression: string`
966979
967980 5-field POSIX cron expression: minute hour day-of-month month day-of-week (e.g., "0 9 * * 1-5" for weekdays at 9am). Day-of-week is 0-7 where 0 and 7 both mean Sunday. Extended cron syntax - seconds or year fields, and the special characters L, W, #, and ? - is not supported, nor are predefined shortcuts (@daily).
from line 987
974987
975988 minLength: 1
976989
977 - `type: "cron"`
978
979990 - `last_run_at: optional string or null`
980991
981992 A timestamp in RFC 3339 format
from line 1005
9941005
9951006 - `"paused"`
9961007
997 - `type: "deployment"`
998
9991008 - `updated_at: string`
10001009
10011010 A timestamp in RFC 3339 format
from line 1019
10101019
10111020 A hard spend ceiling. The session stops issuing new model requests once the tracked list cost reaches `max_list_cost`.
10121021
1022 - `type: "limit"`
1023
10131024 - `max_list_cost: BetaMonetaryAmount`
10141025
10151026 A monetary amount in a specific currency.
from line 1032
10211032 - `currency: BetaCurrency`
10221033
10231034 Uppercase ISO-4217 currency code. `USD` is the only currency currently supported; the accepted set is closed and grows only when a new currency is priced.
1024
1025 - `type: "limit"`
10261035
10271036## Example
10281037
api/beta/dreams Changed · +588 / -563 lines
from line 1
1---
2title: Dreams
3url: https://platform.claude.com/docs/en/api/beta/dreams
4---
5
16# Dreams
27
38## Create a Dream
from line 19
1419
1520 - `string`
1621
17 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
22 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
1823
1924 - `"message-batches-2024-09-24"`
2025
from line 67
6267
6368 - `"user-profiles-2026-08-18"`
6469
70 - `"user-profiles-2026-09-04"`
71
6572 - `"advisor-tool-2026-03-01"`
6673
6774 - `"managed-agents-2026-04-01"`
from line 111
104111
105112 - `"mid-conversation-system-clear-at-2026-08-21"`
106113
114- `"anthropic-workspace-id": optional string`
115
107116### Body parameters
108117
109118- `inputs: array of BetaDreamInput`
from line 121
112121
113122 An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place.
114123
124 - `type: "memory_store"`
125
115126 - `memory_store_id: string`
116127
117128 minLength: 1
118129
119 - `type: "memory_store"`
120
121130 - `BetaDreamSessionsInput object`
122131
123132 Input session transcripts the dream reads.
124133
125 - `session_ids: array of string`
126
127134 - `type: "sessions"`
128135
136 - `session_ids: array of string`
137
129138- `model: string or BetaDreamModelConfigParam`
130139
131140 Model identifier and configuration applied to every pipeline stage.
from line 177
168177
169178 The job writes the consolidated memories into this existing memory store instead of creating one. In EAP the store must be the job's own memory_store input, so the job consolidates the store in place.
170179
180 - `type: "update_existing"`
181
171182 - `memory_store_id: string`
172183
173184 minLength: 1
174185
175 - `type: "update_existing"`
176
177186### Returns
178187
179188- `BetaDream object`
from line 189
180189
181190 An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into an output memory store — a new store by default, or an existing store chosen via output_behavior. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints.
182191
192 - `type: "dream"`
193
183194 - `id: string`
184195
185196 - `archived_at: string or null`
from line 215
204215
205216 Failure detail for a Dream whose `status` is `failed`.
206217
207 - `message: string`
208
209218 - `type: string`
210219
220 - `message: string`
221
211222 - `inputs: array of BetaDreamInput`
212223
213224 - `BetaDreamMemoryStoreInput object`
from line 225
214225
215226 An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place.
216227
228 - `type: "memory_store"`
229
217230 - `memory_store_id: string`
218231
219232 minLength: 1
220233
221 - `type: "memory_store"`
222
223234 - `BetaDreamSessionsInput object`
224235
225236 Input session transcripts the dream reads.
226237
227 - `session_ids: array of string`
228
229238 - `type: "sessions"`
230239
240 - `session_ids: array of string`
241
231242 - `instructions: string or null`
232243
233244 - `model: BetaDreamModelConfig`
from line 273
262273
263274 The job writes the consolidated memories into this existing memory store instead of creating one. In EAP the store must be the job's own memory_store input, so the job consolidates the store in place.
264275
276 - `type: "update_existing"`
277
265278 - `memory_store_id: string`
266279
267280 minLength: 1
268281
269 - `type: "update_existing"`
270
271282 - `outputs: array of BetaDreamOutput`
272283
273 - `memory_store_id: string`
274
275284 - `type: "memory_store"`
276285
286 - `memory_store_id: string`
287
277288 - `session_id: string or null`
278289
279290 - `status: BetaDreamStatus`
from line 301
290301
291302 - `"canceled"`
292303
293 - `type: "dream"`
294
295304 - `usage: BetaDreamUsage`
296305
297306 Cumulative token usage for the dream across every pipeline stage.
from line 448
439448
440449 - `string`
441450
442 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
451 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
443452
444453 - `"message-batches-2024-09-24"`
445454
from line 496
487496
488497 - `"user-profiles-2026-08-18"`
489498
499 - `"user-profiles-2026-09-04"`
500
490501 - `"advisor-tool-2026-03-01"`
491502
492503 - `"managed-agents-2026-04-01"`
from line 540
529540
530541 - `"mid-conversation-system-clear-at-2026-08-21"`
531542
543- `"anthropic-workspace-id": optional string`
544
532545### Returns
533546
534547- `data: array of BetaDream`
535548
549 - `type: "dream"`
550
536551 - `id: string`
537552
538553 - `archived_at: string or null`
from line 572
557572
558573 Failure detail for a Dream whose `status` is `failed`.
559574
560 - `message: string`
561
562575 - `type: string`
563576
577 - `message: string`
578
564579 - `inputs: array of BetaDreamInput`
565580
566581 - `BetaDreamMemoryStoreInput object`
from line 582
567582
568583 An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place.
569584
585 - `type: "memory_store"`
586
570587 - `memory_store_id: string`
571588
572589 minLength: 1
573590
574 - `type: "memory_store"`
575
576591 - `BetaDreamSessionsInput object`
577592
578593 Input session transcripts the dream reads.
579594
580 - `session_ids: array of string`
581
582595 - `type: "sessions"`
583596
597 - `session_ids: array of string`
598
584599 - `instructions: string or null`
585600
586601 - `model: BetaDreamModelConfig`
from line 630
615630
616631 The job writes the consolidated memories into this existing memory store instead of creating one. In EAP the store must be the job's own memory_store input, so the job consolidates the store in place.
617632
633 - `type: "update_existing"`
634
618635 - `memory_store_id: string`
619636
620637 minLength: 1
621638
622 - `type: "update_existing"`
623
624639 - `outputs: array of BetaDreamOutput`
625640
626 - `memory_store_id: string`
627
628641 - `type: "memory_store"`
629642
643 - `memory_store_id: string`
644
630645 - `session_id: string or null`
631646
632647 - `status: BetaDreamStatus`
from line 658
643658
644659 - `"canceled"`
645660
646 - `type: "dream"`
647
648661 - `usage: BetaDreamUsage`
649662
650663 Cumulative token usage for the dream across every pipeline stage.
from line 764
751764
752765 - `string`
753766
754 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
767 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
755768
756769 - `"message-batches-2024-09-24"`
757770
from line 812
799812
800813 - `"user-profiles-2026-08-18"`
801814
815 - `"user-profiles-2026-09-04"`
816
802817 - `"advisor-tool-2026-03-01"`
803818
804819 - `"managed-agents-2026-04-01"`
from line 856
841856
842857 - `"mid-conversation-system-clear-at-2026-08-21"`
843858
859- `"anthropic-workspace-id": optional string`
860
844861### Returns
845862
846863- `BetaDream object`
from line 864
847864
848865 An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into an output memory store — a new store by default, or an existing store chosen via output_behavior. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints.
849866
867 - `type: "dream"`
868
850869 - `id: string`
851870
852871 - `archived_at: string or null`
from line 890
871890
872891 Failure detail for a Dream whose `status` is `failed`.
873892
874 - `message: string`
875
876893 - `type: string`
877894
895 - `message: string`
896
878897 - `inputs: array of BetaDreamInput`
879898
880899 - `BetaDreamMemoryStoreInput object`
from line 900
881900
882901 An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place.
883902
903 - `type: "memory_store"`
904
884905 - `memory_store_id: string`
885906
886907 minLength: 1
887908
888 - `type: "memory_store"`
889
890909 - `BetaDreamSessionsInput object`
891910
892911 Input session transcripts the dream reads.
893912
894 - `session_ids: array of string`
895
896913 - `type: "sessions"`
897914
915 - `session_ids: array of string`
916
898917 - `instructions: string or null`
899918
900919 - `model: BetaDreamModelConfig`
from line 948
929948
930949 The job writes the consolidated memories into this existing memory store instead of creating one. In EAP the store must be the job's own memory_store input, so the job consolidates the store in place.
931950
951 - `type: "update_existing"`
952
932953 - `memory_store_id: string`
933954
934955 minLength: 1
935956
936 - `type: "update_existing"`
937
938957 - `outputs: array of BetaDreamOutput`
939958
940 - `memory_store_id: string`
941
942959 - `type: "memory_store"`
943960
961 - `memory_store_id: string`
962
944963 - `session_id: string or null`
945964
946965 - `status: BetaDreamStatus`
from line 976
957976
958977 - `"canceled"`
959978
960 - `type: "dream"`
961
962979 - `usage: BetaDreamUsage`
963980
964981 Cumulative token usage for the dream across every pipeline stage.
from line 1075
10581075
10591076 - `string`
10601077
1061 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
1078 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
10621079
10631080 - `"message-batches-2024-09-24"`
10641081
from line 1123
11061123
11071124 - `"user-profiles-2026-08-18"`
11081125
1126 - `"user-profiles-2026-09-04"`
1127
11091128 - `"advisor-tool-2026-03-01"`
11101129
11111130 - `"managed-agents-2026-04-01"`
from line 1167
11481167
11491168 - `"mid-conversation-system-clear-at-2026-08-21"`
11501169
1170- `"anthropic-workspace-id": optional string`
1171
11511172### Returns
11521173
11531174- `BetaDream object`
from line 1175
11541175
11551176 An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into an output memory store — a new store by default, or an existing store chosen via output_behavior. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints.
11561177
1178 - `type: "dream"`
1179
11571180 - `id: string`
11581181
11591182 - `archived_at: string or null`
from line 1201
11781201
11791202 Failure detail for a Dream whose `status` is `failed`.
11801203
1181 - `message: string`
1182
11831204 - `type: string`
11841205
1206 - `message: string`
1207
11851208 - `inputs: array of BetaDreamInput`
11861209
11871210 - `BetaDreamMemoryStoreInput object`
from line 1211
11881211
11891212 An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place.
11901213
1214 - `type: "memory_store"`
1215
11911216 - `memory_store_id: string`
11921217
11931218 minLength: 1
11941219
1195 - `type: "memory_store"`
1196
11971220 - `BetaDreamSessionsInput object`
11981221
11991222 Input session transcripts the dream reads.
12001223
1201 - `session_ids: array of string`
1202
12031224 - `type: "sessions"`
12041225
1226 - `session_ids: array of string`
1227
12051228 - `instructions: string or null`
12061229
12071230 - `model: BetaDreamModelConfig`
from line 1259
12361259
12371260 The job writes the consolidated memories into this existing memory store instead of creating one. In EAP the store must be the job's own memory_store input, so the job consolidates the store in place.
12381261
1262 - `type: "update_existing"`
1263
12391264 - `memory_store_id: string`
12401265
12411266 minLength: 1
12421267
1243 - `type: "update_existing"`
1244
12451268 - `outputs: array of BetaDreamOutput`
12461269
1247 - `memory_store_id: string`
1248
12491270 - `type: "memory_store"`
12501271
1272 - `memory_store_id: string`
1273
12511274 - `session_id: string or null`
12521275
12531276 - `status: BetaDreamStatus`
from line 1287
12641287
12651288 - `"canceled"`
12661289
1267 - `type: "dream"`
1268
12691290 - `usage: BetaDreamUsage`
12701291
12711292 Cumulative token usage for the dream across every pipeline stage.
from line 1387
13661387
13671388 - `string`
13681389
1369 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
1390 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
13701391
13711392 - `"message-batches-2024-09-24"`
13721393
from line 1435
14141435
14151436 - `"user-profiles-2026-08-18"`
14161437
1438 - `"user-profiles-2026-09-04"`
1439
14171440 - `"advisor-tool-2026-03-01"`
14181441
14191442 - `"managed-agents-2026-04-01"`
from line 1479
14561479
14571480 - `"mid-conversation-system-clear-at-2026-08-21"`
14581481
1482- `"anthropic-workspace-id": optional string`
1483
14591484### Returns
14601485
14611486- `BetaDream object`
from line 1487
14621487
14631488 An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into an output memory store — a new store by default, or an existing store chosen via output_behavior. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints.
14641489
1490 - `type: "dream"`
1491
14651492 - `id: string`
14661493
14671494 - `archived_at: string or null`
from line 1513
14861513
14871514 Failure detail for a Dream whose `status` is `failed`.
14881515
1489 - `message: string`
1490
14911516 - `type: string`
14921517
1518 - `message: string`
1519
14931520 - `inputs: array of BetaDreamInput`
14941521
14951522 - `BetaDreamMemoryStoreInput object`
from line 1523
14961523
14971524 An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place.
14981525
1526 - `type: "memory_store"`
1527
14991528 - `memory_store_id: string`
15001529
15011530 minLength: 1
15021531
1503 - `type: "memory_store"`
1504
15051532 - `BetaDreamSessionsInput object`
15061533
15071534 Input session transcripts the dream reads.
15081535
1509 - `session_ids: array of string`
1510
15111536 - `type: "sessions"`
15121537
1538 - `session_ids: array of string`
1539
15131540 - `instructions: string or null`
15141541
15151542 - `model: BetaDreamModelConfig`
from line 1571
15441571
15451572 The job writes the consolidated memories into this existing memory store instead of creating one. In EAP the store must be the job's own memory_store input, so the job consolidates the store in place.
15461573
1574 - `type: "update_existing"`
1575
15471576 - `memory_store_id: string`
15481577
15491578 minLength: 1
15501579
1551 - `type: "update_existing"`
1552
15531580 - `outputs: array of BetaDreamOutput`
15541581
1555 - `memory_store_id: string`
1556
15571582 - `type: "memory_store"`
15581583
1584 - `memory_store_id: string`
1585
15591586 - `session_id: string or null`
15601587
15611588 - `status: BetaDreamStatus`
from line 1599
15721599
15731600 - `"canceled"`
15741601
1575 - `type: "dream"`
1576
15771602 - `usage: BetaDreamUsage`
15781603
15791604 Cumulative token usage for the dream across every pipeline stage.
from line 1689
16641689
16651690 An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into an output memory store — a new store by default, or an existing store chosen via output_behavior. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints.
16661691
1692 - `type: "dream"`
1693
16671694 - `id: string`
16681695
16691696 - `archived_at: string or null`
from line 1715
16881715
16891716 Failure detail for a Dream whose `status` is `failed`.
16901717
1691 - `message: string`
1692
16931718 - `type: string`
16941719
1720 - `message: string`
1721
16951722 - `inputs: array of BetaDreamInput`
16961723
16971724 - `BetaDreamMemoryStoreInput object`
from line 1725
16981725
16991726 An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place.
17001727
1728 - `type: "memory_store"`
1729
17011730 - `memory_store_id: string`
17021731
17031732 minLength: 1
17041733
1705 - `type: "memory_store"`
1706
17071734 - `BetaDreamSessionsInput object`
17081735
17091736 Input session transcripts the dream reads.
17101737
1711 - `session_ids: array of string`
1712
17131738 - `type: "sessions"`
17141739
1740 - `session_ids: array of string`
1741
17151742 - `instructions: string or null`
17161743
17171744 - `model: BetaDreamModelConfig`
from line 1773
17461773
17471774 The job writes the consolidated memories into this existing memory store instead of creating one. In EAP the store must be the job's own memory_store input, so the job consolidates the store in place.
17481775
1776 - `type: "update_existing"`
1777
17491778 - `memory_store_id: string`
17501779
17511780 minLength: 1
17521781
1753 - `type: "update_existing"`
1754
17551782 - `outputs: array of BetaDreamOutput`
17561783
1757 - `memory_store_id: string`
1758
17591784 - `type: "memory_store"`
17601785
1786 - `memory_store_id: string`
1787
17611788 - `session_id: string or null`
17621789
17631790 - `status: BetaDreamStatus`
from line 1801
17741801
17751802 - `"canceled"`
17761803
1777 - `type: "dream"`
1778
17791804 - `usage: BetaDreamUsage`
17801805
17811806 Cumulative token usage for the dream across every pipeline stage.
from line 1835
18101835
18111836 Failure detail for a Dream whose `status` is `failed`.
18121837
1813 - `message: string`
1814
18151838 - `type: string`
18161839
1840 - `message: string`
1841
18171842### Beta Dream Input
18181843
18191844- `BetaDreamInput = BetaDreamMemoryStoreInput or BetaDreamSessionsInput`
from line 1849
18241849
18251850 An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place.
18261851
1852 - `type: "memory_store"`
1853
18271854 - `memory_store_id: string`
18281855
18291856 minLength: 1
18301857
1831 - `type: "memory_store"`
1832
18331858 - `BetaDreamSessionsInput object`
18341859
18351860 Input session transcripts the dream reads.
18361861
1837 - `session_ids: array of string`
1838
18391862 - `type: "sessions"`
18401863
1864 - `session_ids: array of string`
1865
18411866### Beta Dream Memory Store Input
18421867
18431868- `BetaDreamMemoryStoreInput object`
from line 1869
18441869
18451870 An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place.
18461871
1872 - `type: "memory_store"`
1873
18471874 - `memory_store_id: string`
18481875
18491876 minLength: 1
18501877
1851 - `type: "memory_store"`
1852
18531878### Beta Dream Memory Store Output
18541879
18551880- `BetaDreamMemoryStoreOutput object`
from line 1881
18561881
18571882 An output memory store the dream writes consolidated memories into.
18581883
1859 - `memory_store_id: string`
1860
18611884 - `type: "memory_store"`
18621885
1886 - `memory_store_id: string`
1887
18631888### Beta Dream Model Config
18641889
18651890- `BetaDreamModelConfig object`
from line 1931
19061931
19071932 An output memory store the dream writes consolidated memories into.
19081933
1909 - `memory_store_id: string`
1910
19111934 - `type: "memory_store"`
19121935
1936 - `memory_store_id: string`
1937
19131938### Beta Dream Sessions Input
19141939
19151940- `BetaDreamSessionsInput object`
from line 1941
19161941
19171942 Input session transcripts the dream reads.
19181943
1919 - `session_ids: array of string`
1920
19211944 - `type: "sessions"`
19221945
1946 - `session_ids: array of string`
1947
19231948### Beta Dream Status
19241949
19251950- `BetaDreamStatus = "pending" or "running" or "completed" or 2 more`
from line 1999
19741999
19752000 - `BetaInvalidRequestError object`
19762001
1977 - `message: string`
1978
1979 default: Invalid request
1980
19812002 - `type: "invalid_request_error"`
19822003
19832004 default: invalid_request_error
19842005
1985 - `BetaAuthenticationError object`
1986
19872006 - `message: string`
19882007
1989 default: Authentication error
2008 default: Invalid request
19902009
2010 - `BetaAuthenticationError object`
2011
19912012 - `type: "authentication_error"`
19922013
19932014 default: authentication_error
19942015
1995 - `BetaBillingError object`
1996
19972016 - `message: string`
19982017
1999 default: Billing error
2018 default: Authentication error
20002019
2020 - `BetaBillingError object`
2021
20012022 - `type: "billing_error"`
20022023
20032024 default: billing_error
20042025
2005 - `BetaPermissionError object`
2006
20072026 - `message: string`
20082027
2009 default: Permission denied
2028 default: Billing error
20102029
2030 - `BetaPermissionError object`
2031
20112032 - `type: "permission_error"`
20122033
20132034 default: permission_error
20142035
2015 - `BetaNotFoundError object`
2016
20172036 - `message: string`
20182037
2019 default: Not found
2038 default: Permission denied
20202039
2040 - `BetaNotFoundError object`
2041
20212042 - `type: "not_found_error"`
20222043
20232044 default: not_found_error
20242045
2025 - `BetaRateLimitError object`
2026
20272046 - `message: string`
20282047
2029 default: Rate limited
2048 default: Not found
20302049
2050 - `BetaRateLimitError object`
2051
20312052 - `type: "rate_limit_error"`
20322053
20332054 default: rate_limit_error
20342055
2035 - `BetaGatewayTimeoutError object`
2036
20372056 - `message: string`
20382057
2039 default: Request timeout
2058 default: Rate limited
20402059
2060 - `BetaGatewayTimeoutError object`
2061
20412062 - `type: "timeout_error"`
20422063
20432064 default: timeout_error
20442065
2045 - `BetaAPIError object`
2046
20472066 - `message: string`
20482067
2049 default: Internal server error
2068 default: Request timeout
20502069
2070 - `BetaAPIError object`
2071
20512072 - `type: "api_error"`
20522073
20532074 default: api_error
20542075
2055 - `BetaOverloadedError object`
2056
20572076 - `message: string`
20582077
2059 default: Overloaded
2078 default: Internal server error
20602079
2080 - `BetaOverloadedError object`
2081
20612082 - `type: "overloaded_error"`
20622083
20632084 default: overloaded_error
20642085
2086 - `message: string`
2087
2088 default: Overloaded
2089
20652090 - `BetaTargetStoreHeldError object`
20662091
20672092 The `output_behavior.memory_store_id` target is still held by a prior `{type: "update_existing"}` dream — one that is `pending` or `running`, or was canceled with its final writes still landing. Rarely the named dream has just finished (`completed`/`failed`) and its execution is still closing; an immediate retry then almost always succeeds. The message names the holding dream when the server can identify it (rarely omitted); poll it to a terminal state or cancel it, then retry. Carried with `x-should-retry: false`.
from line 2113
20882113
20892114 The job writes the consolidated memories into this existing memory store instead of creating one. In EAP the store must be the job's own memory_store input, so the job consolidates the store in place.
20902115
2116 - `type: "update_existing"`
2117
20912118 - `memory_store_id: string`
20922119
20932120 minLength: 1
20942121
2095 - `type: "update_existing"`
2096
20972122### Beta Output Behavior Create New
20982123
20992124- `BetaOutputBehaviorCreateNew object`
from line 2133
21082133
21092134 The job writes the consolidated memories into this existing memory store instead of creating one. In EAP the store must be the job's own memory_store input, so the job consolidates the store in place.
21102135
2136 - `type: "update_existing"`
2137
21112138 - `memory_store_id: string`
21122139
21132140 minLength: 1
2114
2115 - `type: "update_existing"`
21162141
21172142### Beta Target Store Held Error
21182143
api/beta/dreams/archive Changed · +22 / -13 lines
from line 1
1---
2title: Archive a Dream
3url: https://platform.claude.com/docs/en/api/beta/dreams/archive
4---
5
16# Archive a Dream
27
38**POST** `/v1/dreams/{dream_id}/archive`
from line 21
1621
1722 - `string`
1823
19 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
24 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
2025
2126 - `"message-batches-2024-09-24"`
2227
from line 69
6469
6570 - `"user-profiles-2026-08-18"`
6671
72 - `"user-profiles-2026-09-04"`
73
6774 - `"advisor-tool-2026-03-01"`
6875
6976 - `"managed-agents-2026-04-01"`
from line 113
106113
107114 - `"mid-conversation-system-clear-at-2026-08-21"`
108115
116- `"anthropic-workspace-id": optional string`
117
109118## Returns
110119
111120- `BetaDream object`
from line 121
112121
113122 An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into an output memory store — a new store by default, or an existing store chosen via output_behavior. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints.
114123
124 - `type: "dream"`
125
115126 - `id: string`
116127
117128 - `archived_at: string or null`
from line 147
136147
137148 Failure detail for a Dream whose `status` is `failed`.
138149
139 - `message: string`
140
141150 - `type: string`
142151
152 - `message: string`
153
143154 - `inputs: array of BetaDreamInput`
144155
145156 - `BetaDreamMemoryStoreInput object`
from line 157
146157
147158 An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place.
148159
160 - `type: "memory_store"`
161
149162 - `memory_store_id: string`
150163
151164 minLength: 1
152165
153 - `type: "memory_store"`
154
155166 - `BetaDreamSessionsInput object`
156167
157168 Input session transcripts the dream reads.
158169
159 - `session_ids: array of string`
160
161170 - `type: "sessions"`
162171
172 - `session_ids: array of string`
173
163174 - `instructions: string or null`
164175
165176 - `model: BetaDreamModelConfig`
from line 205
194205
195206 The job writes the consolidated memories into this existing memory store instead of creating one. In EAP the store must be the job's own memory_store input, so the job consolidates the store in place.
196207
208 - `type: "update_existing"`
209
197210 - `memory_store_id: string`
198211
199212 minLength: 1
200213
201 - `type: "update_existing"`
202
203214 - `outputs: array of BetaDreamOutput`
204215
205 - `memory_store_id: string`
206
207216 - `type: "memory_store"`
208217
218 - `memory_store_id: string`
219
209220 - `session_id: string or null`
210221
211222 - `status: BetaDreamStatus`
from line 232
221232 - `"failed"`
222233
223234 - `"canceled"`
224
225 - `type: "dream"`
226235
227236 - `usage: BetaDreamUsage`
228237
api/beta/dreams/cancel Changed · +22 / -13 lines
from line 1
1---
2title: Cancel a Dream
3url: https://platform.claude.com/docs/en/api/beta/dreams/cancel
4---
5
16# Cancel a Dream
27
38**POST** `/v1/dreams/{dream_id}/cancel`
from line 21
1621
1722 - `string`
1823
19 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
24 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
2025
2126 - `"message-batches-2024-09-24"`
2227
from line 69
6469
6570 - `"user-profiles-2026-08-18"`
6671
72 - `"user-profiles-2026-09-04"`
73
6774 - `"advisor-tool-2026-03-01"`
6875
6976 - `"managed-agents-2026-04-01"`
from line 113
106113
107114 - `"mid-conversation-system-clear-at-2026-08-21"`
108115
116- `"anthropic-workspace-id": optional string`
117
109118## Returns
110119
111120- `BetaDream object`
from line 121
112121
113122 An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into an output memory store — a new store by default, or an existing store chosen via output_behavior. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints.
114123
124 - `type: "dream"`
125
115126 - `id: string`
116127
117128 - `archived_at: string or null`
from line 147
136147
137148 Failure detail for a Dream whose `status` is `failed`.
138149
139 - `message: string`
140
141150 - `type: string`
142151
152 - `message: string`
153
143154 - `inputs: array of BetaDreamInput`
144155
145156 - `BetaDreamMemoryStoreInput object`
from line 157
146157
147158 An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place.
148159
160 - `type: "memory_store"`
161
149162 - `memory_store_id: string`
150163
151164 minLength: 1
152165
153 - `type: "memory_store"`
154
155166 - `BetaDreamSessionsInput object`
156167
157168 Input session transcripts the dream reads.
158169
159 - `session_ids: array of string`
160
161170 - `type: "sessions"`
162171
172 - `session_ids: array of string`
173
163174 - `instructions: string or null`
164175
165176 - `model: BetaDreamModelConfig`
from line 205
194205
195206 The job writes the consolidated memories into this existing memory store instead of creating one. In EAP the store must be the job's own memory_store input, so the job consolidates the store in place.
196207
208 - `type: "update_existing"`
209
197210 - `memory_store_id: string`
198211
199212 minLength: 1
200213
201 - `type: "update_existing"`
202
203214 - `outputs: array of BetaDreamOutput`
204215
205 - `memory_store_id: string`
206
207216 - `type: "memory_store"`
208217
218 - `memory_store_id: string`
219
209220 - `session_id: string or null`
210221
211222 - `status: BetaDreamStatus`
from line 232
221232 - `"failed"`
222233
223234 - `"canceled"`
224
225 - `type: "dream"`
226235
227236 - `usage: BetaDreamUsage`
228237
api/beta/dreams/create Changed · +166 / -157 lines
from line 1
1---
2title: Create a Dream
3url: https://platform.claude.com/docs/en/api/beta/dreams/create
4---
5
16# Create a Dream
27
38**POST** `/v1/dreams`
from line 17
1217
1318 - `string`
1419
15 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
20 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
1621
1722 - `"message-batches-2024-09-24"`
1823
from line 65
6065
6166 - `"user-profiles-2026-08-18"`
6267
68 - `"user-profiles-2026-09-04"`
69
6370 - `"advisor-tool-2026-03-01"`
6471
6572 - `"managed-agents-2026-04-01"`
from line 109
102109
103110 - `"mid-conversation-system-clear-at-2026-08-21"`
104111
112- `"anthropic-workspace-id": optional string`
113
105114## Body parameters
106115
107116- `inputs: array of BetaDreamInput`
from line 119
110119
111120 An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place.
112121
122 - `type: "memory_store"`
123
113124 - `memory_store_id: string`
114125
115126 minLength: 1
116127
117 - `type: "memory_store"`
118
119128 - `BetaDreamSessionsInput object`
120129
121130 Input session transcripts the dream reads.
122131
123 - `session_ids: array of string`
124
125132 - `type: "sessions"`
126133
134 - `session_ids: array of string`
135
127136- `model: string or BetaDreamModelConfigParam`
128137
129138 Model identifier and configuration applied to every pipeline stage.
from line 175
166175
167176 The job writes the consolidated memories into this existing memory store instead of creating one. In EAP the store must be the job's own memory_store input, so the job consolidates the store in place.
168177
178 - `type: "update_existing"`
179
169180 - `memory_store_id: string`
170181
171182 minLength: 1
172183
173 - `type: "update_existing"`
174
175184## Returns
176185
177186- `BetaDream object`
from line 187
178187
179188 An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into an output memory store — a new store by default, or an existing store chosen via output_behavior. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints.
180189
190 - `type: "dream"`
191
181192 - `id: string`
182193
183194 - `archived_at: string or null`
from line 213
202213
203214 Failure detail for a Dream whose `status` is `failed`.
204215
205 - `message: string`
206
207216 - `type: string`
208217
218 - `message: string`
219
209220 - `inputs: array of BetaDreamInput`
210221
211222 - `BetaDreamMemoryStoreInput object`
from line 223
212223
213224 An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place.
214225
226 - `type: "memory_store"`
227
215228 - `memory_store_id: string`
216229
217230 minLength: 1
218231
219 - `type: "memory_store"`
220
221232 - `BetaDreamSessionsInput object`
222233
223234 Input session transcripts the dream reads.
224235
225 - `session_ids: array of string`
226
227236 - `type: "sessions"`
228237
238 - `session_ids: array of string`
239
229240 - `instructions: string or null`
230241
231242 - `model: BetaDreamModelConfig`
from line 271
260271
261272 The job writes the consolidated memories into this existing memory store instead of creating one. In EAP the store must be the job's own memory_store input, so the job consolidates the store in place.
262273
274 - `type: "update_existing"`
275
263276 - `memory_store_id: string`
264277
265278 minLength: 1
266279
267 - `type: "update_existing"`
268
269280 - `outputs: array of BetaDreamOutput`
270281
271 - `memory_store_id: string`
272
273282 - `type: "memory_store"`
274283
284 - `memory_store_id: string`
285
275286 - `session_id: string or null`
276287
277288 - `status: BetaDreamStatus`
from line 298
287298 - `"failed"`
288299
289300 - `"canceled"`
290
291 - `type: "dream"`
292301
293302 - `usage: BetaDreamUsage`
294303
api/beta/dreams/list Changed · +22 / -13 lines
from line 1
1---
2title: List Dreams
3url: https://platform.claude.com/docs/en/api/beta/dreams/list
4---
5
16# List Dreams
27
38**GET** `/v1/dreams`
from line 59
5459
5560 - `string`
5661
57 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
62 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
5863
5964 - `"message-batches-2024-09-24"`
6065
from line 107
102107
103108 - `"user-profiles-2026-08-18"`
104109
110 - `"user-profiles-2026-09-04"`
111
105112 - `"advisor-tool-2026-03-01"`
106113
107114 - `"managed-agents-2026-04-01"`
from line 151
144151
145152 - `"mid-conversation-system-clear-at-2026-08-21"`
146153
154- `"anthropic-workspace-id": optional string`
155
147156## Returns
148157
149158- `data: array of BetaDream`
150159
160 - `type: "dream"`
161
151162 - `id: string`
152163
153164 - `archived_at: string or null`
from line 183
172183
173184 Failure detail for a Dream whose `status` is `failed`.
174185
175 - `message: string`
176
177186 - `type: string`
178187
188 - `message: string`
189
179190 - `inputs: array of BetaDreamInput`
180191
181192 - `BetaDreamMemoryStoreInput object`
from line 193
182193
183194 An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place.
184195
196 - `type: "memory_store"`
197
185198 - `memory_store_id: string`
186199
187200 minLength: 1
188201
189 - `type: "memory_store"`
190
191202 - `BetaDreamSessionsInput object`
192203
193204 Input session transcripts the dream reads.
194205
195 - `session_ids: array of string`
196
197206 - `type: "sessions"`
198207
208 - `session_ids: array of string`
209
199210 - `instructions: string or null`
200211
201212 - `model: BetaDreamModelConfig`
from line 241
230241
231242 The job writes the consolidated memories into this existing memory store instead of creating one. In EAP the store must be the job's own memory_store input, so the job consolidates the store in place.
232243
244 - `type: "update_existing"`
245
233246 - `memory_store_id: string`
234247
235248 minLength: 1
236249
237 - `type: "update_existing"`
238
239250 - `outputs: array of BetaDreamOutput`
240251
241 - `memory_store_id: string`
242
243252 - `type: "memory_store"`
244253
254 - `memory_store_id: string`
255
245256 - `session_id: string or null`
246257
247258 - `status: BetaDreamStatus`
from line 268
257268 - `"failed"`
258269
259270 - `"canceled"`
260
261 - `type: "dream"`
262271
263272 - `usage: BetaDreamUsage`
264273
api/beta/dreams/retrieve Changed · +22 / -13 lines
from line 1
1---
2title: Get a Dream
3url: https://platform.claude.com/docs/en/api/beta/dreams/retrieve
4---
5
16# Get a Dream
27
38**GET** `/v1/dreams/{dream_id}`
from line 21
1621
1722 - `string`
1823
19 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
24 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
2025
2126 - `"message-batches-2024-09-24"`
2227
from line 69
6469
6570 - `"user-profiles-2026-08-18"`
6671
72 - `"user-profiles-2026-09-04"`
73
6774 - `"advisor-tool-2026-03-01"`
6875
6976 - `"managed-agents-2026-04-01"`
from line 113
106113
107114 - `"mid-conversation-system-clear-at-2026-08-21"`
108115
116- `"anthropic-workspace-id": optional string`
117
109118## Returns
110119
111120- `BetaDream object`
from line 121
112121
113122 An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into an output memory store — a new store by default, or an existing store chosen via output_behavior. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints.
114123
124 - `type: "dream"`
125
115126 - `id: string`
116127
117128 - `archived_at: string or null`
from line 147
136147
137148 Failure detail for a Dream whose `status` is `failed`.
138149
139 - `message: string`
140
141150 - `type: string`
142151
152 - `message: string`
153
143154 - `inputs: array of BetaDreamInput`
144155
145156 - `BetaDreamMemoryStoreInput object`
from line 157
146157
147158 An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place.
148159
160 - `type: "memory_store"`
161
149162 - `memory_store_id: string`
150163
151164 minLength: 1
152165
153 - `type: "memory_store"`
154
155166 - `BetaDreamSessionsInput object`
156167
157168 Input session transcripts the dream reads.
158169
159 - `session_ids: array of string`
160
161170 - `type: "sessions"`
162171
172 - `session_ids: array of string`
173
163174 - `instructions: string or null`
164175
165176 - `model: BetaDreamModelConfig`
from line 205
194205
195206 The job writes the consolidated memories into this existing memory store instead of creating one. In EAP the store must be the job's own memory_store input, so the job consolidates the store in place.
196207
208 - `type: "update_existing"`
209
197210 - `memory_store_id: string`
198211
199212 minLength: 1
200213
201 - `type: "update_existing"`
202
203214 - `outputs: array of BetaDreamOutput`
204215
205 - `memory_store_id: string`
206
207216 - `type: "memory_store"`
208217
218 - `memory_store_id: string`
219
209220 - `session_id: string or null`
210221
211222 - `status: BetaDreamStatus`
from line 232
221232 - `"failed"`
222233
223234 - `"canceled"`
224
225 - `type: "dream"`
226235
227236 - `usage: BetaDreamUsage`
228237
api/beta/environments Changed · +354 / -301 lines
The two sides of this change are more than 400 edits apart, too far apart to line up, so this is the differ's own diff of it and the words inside a line are not marked.
from line 1
1---
2title: Environments
3url: https://platform.claude.com/docs/en/api/beta/environments
4---
5
16# Environments
27
38## Create Environment
from line 19
1419
1520 - `string`
1621
17 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
22 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
1823
1924 - `"message-batches-2024-09-24"`
2025
from line 67
6267
6368 - `"user-profiles-2026-08-18"`
6469
70 - `"user-profiles-2026-09-04"`
71
6572 - `"advisor-tool-2026-03-01"`
6673
6774 - `"managed-agents-2026-04-01"`
from line 110
103110 - `"thinking-binding-controls-2026-08-01"`
104111
105112 - `"mid-conversation-system-clear-at-2026-08-21"`
113
114- `"anthropic-workspace-id": optional string`
106115
107116### Body parameters
108117
from line 179
170179
171180 Under `limited` networking, requires `networking.allow_package_managers` to be `true`.
172181
182 - `type: optional "packages"`
183
184 Package configuration type
185
186 default: packages
187
173188 - `apt: optional array of string or null`
174189
175190 Ubuntu/Debian packages to install
from line 209
194209
195210 Python packages to install
196211
197 - `type: optional "packages"`
198
199 Package configuration type
200
201 default: packages
202
203212 - `BetaSelfHostedConfigParams object`
204213
205214 Request params for `self_hosted` environment configuration.
from line 229
220229
221230- `scope: optional "organization" or "account" or null`
222231
223 The visibility scope for this environment. 'organization' makes the environment visible to all accounts. 'account' restricts visibility to the owning account only. Only applicable for self-hosted environments. If not specified, defaults based on organization type.
232 The visibility scope for this environment. 'organization' makes the environment visible to all accounts. 'account' restricts visibility to the owning account only. API organizations support only 'organization'; 'account' is rejected. If not specified, defaults based on organization type.
224233
225234 - `"organization"`
226235
from line 241
232241
233242 Unified Environment resource for both cloud and self-hosted environments.
234243
244 - `type: "environment"`
245
246 The type of object (always 'environment')
247
248 default: environment
249
235250 - `id: string`
236251
237252 Environment identifier (e.g., 'env_...')
from line 263
248263
249264 `cloud` environment configuration.
250265
266 - `type: "cloud"`
267
268 Environment type
269
251270 - `networking: BetaUnrestrictedNetwork or BetaLimitedNetwork`
252271
253272 Network configuration policy.
from line 283
264283
265284 Limited network access.
266285
286 - `type: "limited"`
287
288 Network policy type
289
267290 - `allow_mcp_servers: boolean`
268291
269292 Permits outbound access to MCP server endpoints configured on the agent, beyond those listed in the `allowed_hosts` array.
from line 299
276299
277300 Specifies domains the container can reach.
278301
279 - `type: "limited"`
280
281 Network policy type
282
283302 - `packages: BetaPackages`
284303
285304 Package manager configuration.
286305
306 - `type: optional "packages"`
307
308 Package configuration type
309
310 default: packages
311
287312 - `apt: array of string`
288313
289314 Ubuntu/Debian packages to install
from line 333
308333
309334 Python packages to install
310335
311 - `type: optional "packages"`
312
313 Package configuration type
314
315 default: packages
316
317 - `type: "cloud"`
336 - `BetaSelfHostedConfig object`
337
338 Configuration for self-hosted environments.
339
340 - `type: "self_hosted"`
318341
319342 Environment type
320343
321 - `BetaSelfHostedConfig object`
322
323 Configuration for self-hosted environments.
324
325 - `type: "self_hosted"`
326
327 Environment type
328
329344 - `created_at: string`
330345
331346 RFC 3339 timestamp when environment was created
from line 356
341356 - `name: string`
342357
343358 Human-readable name for the environment
344
345 - `type: "environment"`
346
347 The type of object (always 'environment')
348
349 default: environment
350359
351360 - `updated_at: string`
352361
from line 480
471480
472481 - `string`
473482
474 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
483 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
475484
476485 - `"message-batches-2024-09-24"`
477486
from line 528
519528
520529 - `"user-profiles-2026-08-18"`
521530
531 - `"user-profiles-2026-09-04"`
532
522533 - `"advisor-tool-2026-03-01"`
523534
524535 - `"managed-agents-2026-04-01"`
from line 572
561572
562573 - `"mid-conversation-system-clear-at-2026-08-21"`
563574
575- `"anthropic-workspace-id": optional string`
576
564577### Returns
565578
566579- `data: array of BetaEnvironment`
567580
568581 List of environments.
569582
583 - `type: "environment"`
584
585 The type of object (always 'environment')
586
587 default: environment
588
570589 - `id: string`
571590
572591 Environment identifier (e.g., 'env_...')
from line 602
583602
584603 `cloud` environment configuration.
585604
605 - `type: "cloud"`
606
607 Environment type
608
586609 - `networking: BetaUnrestrictedNetwork or BetaLimitedNetwork`
587610
588611 Network configuration policy.
from line 622
599622
600623 Limited network access.
601624
625 - `type: "limited"`
626
627 Network policy type
628
602629 - `allow_mcp_servers: boolean`
603630
604631 Permits outbound access to MCP server endpoints configured on the agent, beyond those listed in the `allowed_hosts` array.
from line 638
611638
612639 Specifies domains the container can reach.
613640
614 - `type: "limited"`
615
616 Network policy type
617
618641 - `packages: BetaPackages`
619642
620643 Package manager configuration.
621644
645 - `type: optional "packages"`
646
647 Package configuration type
648
649 default: packages
650
622651 - `apt: array of string`
623652
624653 Ubuntu/Debian packages to install
from line 672
643672
644673 Python packages to install
645674
646 - `type: optional "packages"`
647
648 Package configuration type
649
650 default: packages
651
652 - `type: "cloud"`
675 - `BetaSelfHostedConfig object`
676
677 Configuration for self-hosted environments.
678
679 - `type: "self_hosted"`
653680
654681 Environment type
655682
656 - `BetaSelfHostedConfig object`
657
658 Configuration for self-hosted environments.
659
660 - `type: "self_hosted"`
661
662 Environment type
663
664683 - `created_at: string`
665684
666685 RFC 3339 timestamp when environment was created
from line 695
676695 - `name: string`
677696
678697 Human-readable name for the environment
679
680 - `type: "environment"`
681
682 The type of object (always 'environment')
683
684 default: environment
685698
686699 - `updated_at: string`
687700
from line 793
780793
781794 - `string`
782795
783 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
796 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
784797
785798 - `"message-batches-2024-09-24"`
786799
from line 841
828841
829842 - `"user-profiles-2026-08-18"`
830843
844 - `"user-profiles-2026-09-04"`
845
831846 - `"advisor-tool-2026-03-01"`
832847
833848 - `"managed-agents-2026-04-01"`
from line 885
870885
871886 - `"mid-conversation-system-clear-at-2026-08-21"`
872887
888- `"anthropic-workspace-id": optional string`
889
873890### Returns
874891
875892- `BetaEnvironment object`
876893
877894 Unified Environment resource for both cloud and self-hosted environments.
878895
896 - `type: "environment"`
897
898 The type of object (always 'environment')
899
900 default: environment
901
879902 - `id: string`
880903
881904 Environment identifier (e.g., 'env_...')
from line 915
892915
893916 `cloud` environment configuration.
894917
918 - `type: "cloud"`
919
920 Environment type
921
895922 - `networking: BetaUnrestrictedNetwork or BetaLimitedNetwork`
896923
897924 Network configuration policy.
from line 935
908935
909936 Limited network access.
910937
938 - `type: "limited"`
939
940 Network policy type
941
911942 - `allow_mcp_servers: boolean`
912943
913944 Permits outbound access to MCP server endpoints configured on the agent, beyond those listed in the `allowed_hosts` array.
from line 951
920951
921952 Specifies domains the container can reach.
922953
923 - `type: "limited"`
924
925 Network policy type
926
927954 - `packages: BetaPackages`
928955
929956 Package manager configuration.
930957
958 - `type: optional "packages"`
959
960 Package configuration type
961
962 default: packages
963
931964 - `apt: array of string`
932965
933966 Ubuntu/Debian packages to install
from line 985
952985
953986 Python packages to install
954987
955 - `type: optional "packages"`
956
957 Package configuration type
958
959 default: packages
960
961 - `type: "cloud"`
988 - `BetaSelfHostedConfig object`
989
990 Configuration for self-hosted environments.
991
992 - `type: "self_hosted"`
962993
963994 Environment type
964995
965 - `BetaSelfHostedConfig object`
966
967 Configuration for self-hosted environments.
968
969 - `type: "self_hosted"`
970
971 Environment type
972
973996 - `created_at: string`
974997
975998 RFC 3339 timestamp when environment was created
from line 1008
9851008 - `name: string`
9861009
9871010 Human-readable name for the environment
988
989 - `type: "environment"`
990
991 The type of object (always 'environment')
992
993 default: environment
9941011
9951012 - `updated_at: string`
9961013
from line 1097
10801097
10811098 - `string`
10821099
1083 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
1100 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
10841101
10851102 - `"message-batches-2024-09-24"`
10861103
from line 1145
11281145
11291146 - `"user-profiles-2026-08-18"`
11301147
1148 - `"user-profiles-2026-09-04"`
1149
11311150 - `"advisor-tool-2026-03-01"`
11321151
11331152 - `"managed-agents-2026-04-01"`
from line 1188
11691188 - `"thinking-binding-controls-2026-08-01"`
11701189
11711190 - `"mid-conversation-system-clear-at-2026-08-21"`
1191
1192- `"anthropic-workspace-id": optional string`
11721193
11731194### Body parameters
11741195
from line 1251
12301251
12311252 Under `limited` networking, requires `networking.allow_package_managers` to be `true`.
12321253
1254 - `type: optional "packages"`
1255
1256 Package configuration type
1257
1258 default: packages
1259
12331260 - `apt: optional array of string or null`
12341261
12351262 Ubuntu/Debian packages to install
from line 1281
12541281
12551282 Python packages to install
12561283
1257 - `type: optional "packages"`
1258
1259 Package configuration type
1260
1261 default: packages
1262
12631284 - `BetaSelfHostedConfigParams object`
12641285
12651286 Request params for `self_hosted` environment configuration.
from line 1319
12981319
12991320 Unified Environment resource for both cloud and self-hosted environments.
13001321
1322 - `type: "environment"`
1323
1324 The type of object (always 'environment')
1325
1326 default: environment
1327
13011328 - `id: string`
13021329
13031330 Environment identifier (e.g., 'env_...')
from line 1341
13141341
13151342 `cloud` environment configuration.
13161343
1344 - `type: "cloud"`
1345
1346 Environment type
1347
13171348 - `networking: BetaUnrestrictedNetwork or BetaLimitedNetwork`
13181349
13191350 Network configuration policy.
from line 1361
13301361
13311362 Limited network access.
13321363
1364 - `type: "limited"`
1365
1366 Network policy type
1367
13331368 - `allow_mcp_servers: boolean`
13341369
13351370 Permits outbound access to MCP server endpoints configured on the agent, beyond those listed in the `allowed_hosts` array.
from line 1377
13421377
13431378 Specifies domains the container can reach.
13441379
1345 - `type: "limited"`
1346
1347 Network policy type
1348
13491380 - `packages: BetaPackages`
13501381
13511382 Package manager configuration.
13521383
1384 - `type: optional "packages"`
1385
1386 Package configuration type
1387
1388 default: packages
1389
13531390 - `apt: array of string`
13541391
13551392 Ubuntu/Debian packages to install
from line 1411
13741411
13751412 Python packages to install
13761413
1377 - `type: optional "packages"`
1378
1379 Package configuration type
1380
1381 default: packages
1382
1383 - `type: "cloud"`
1414 - `BetaSelfHostedConfig object`
1415
1416 Configuration for self-hosted environments.
1417
1418 - `type: "self_hosted"`
13841419
13851420 Environment type
13861421
1387 - `BetaSelfHostedConfig object`
1388
1389 Configuration for self-hosted environments.
1390
1391 - `type: "self_hosted"`
1392
1393 Environment type
1394
13951422 - `created_at: string`
13961423
13971424 RFC 3339 timestamp when environment was created
from line 1434
14071434 - `name: string`
14081435
14091436 Human-readable name for the environment
1410
1411 - `type: "environment"`
1412
1413 The type of object (always 'environment')
1414
1415 default: environment
14161437
14171438 - `updated_at: string`
14181439
from line 1527
15061527
15071528 - `string`
15081529
1509 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
1530 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
15101531
15111532 - `"message-batches-2024-09-24"`
15121533
from line 1575
15541575
15551576 - `"user-profiles-2026-08-18"`
15561577
1578 - `"user-profiles-2026-09-04"`
1579
15571580 - `"advisor-tool-2026-03-01"`
15581581
15591582 - `"managed-agents-2026-04-01"`
from line 1619
15961619
15971620 - `"mid-conversation-system-clear-at-2026-08-21"`
15981621
1622- `"anthropic-workspace-id": optional string`
1623
15991624### Returns
16001625
16011626- `BetaEnvironmentDeleteResponse object`
16021627
16031628 Response after deleting an environment.
16041629
1630 - `type: "environment_deleted"`
1631
1632 The type of response
1633
1634 default: environment_deleted
1635
16051636 - `id: string`
16061637
16071638 Environment identifier
1608
1609 - `type: "environment_deleted"`
1610
1611 The type of response
1612
1613 default: environment_deleted
16141639
16151640### Example
16161641
from line 1674
16491674
16501675 - `string`
16511676
1652 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
1677 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
16531678
16541679 - `"message-batches-2024-09-24"`
16551680
from line 1722
16971722
16981723 - `"user-profiles-2026-08-18"`
16991724
1725 - `"user-profiles-2026-09-04"`
1726
17001727 - `"advisor-tool-2026-03-01"`
17011728
17021729 - `"managed-agents-2026-04-01"`
from line 1766
17391766
17401767 - `"mid-conversation-system-clear-at-2026-08-21"`
17411768
1769- `"anthropic-workspace-id": optional string`
1770
17421771### Returns
17431772
17441773- `BetaEnvironment object`
17451774
17461775 Unified Environment resource for both cloud and self-hosted environments.
17471776
1777 - `type: "environment"`
1778
1779 The type of object (always 'environment')
1780
1781 default: environment
1782
17481783 - `id: string`
17491784
17501785 Environment identifier (e.g., 'env_...')
from line 1796
17611796
17621797 `cloud` environment configuration.
17631798
1799 - `type: "cloud"`
1800
1801 Environment type
1802
17641803 - `networking: BetaUnrestrictedNetwork or BetaLimitedNetwork`
17651804
17661805 Network configuration policy.
from line 1816
17771816
17781817 Limited network access.
17791818
1819 - `type: "limited"`
1820
1821 Network policy type
1822
17801823 - `allow_mcp_servers: boolean`
17811824
17821825 Permits outbound access to MCP server endpoints configured on the agent, beyond those listed in the `allowed_hosts` array.
from line 1832
17891832
17901833 Specifies domains the container can reach.
17911834
1792 - `type: "limited"`
1793
1794 Network policy type
1795
17961835 - `packages: BetaPackages`
17971836
17981837 Package manager configuration.
17991838
1839 - `type: optional "packages"`
1840
1841 Package configuration type
1842
1843 default: packages
1844
18001845 - `apt: array of string`
18011846
18021847 Ubuntu/Debian packages to install
from line 1866
18211866
18221867 Python packages to install
18231868
1824 - `type: optional "packages"`
1825
1826 Package configuration type
1827
1828 default: packages
1829
1830 - `type: "cloud"`
1869 - `BetaSelfHostedConfig object`
1870
1871 Configuration for self-hosted environments.
1872
1873 - `type: "self_hosted"`
18311874
18321875 Environment type
18331876
1834 - `BetaSelfHostedConfig object`
1835
1836 Configuration for self-hosted environments.
1837
1838 - `type: "self_hosted"`
1839
1840 Environment type
1841
18421877 - `created_at: string`
18431878
18441879 RFC 3339 timestamp when environment was created
from line 1889
18541889 - `name: string`
18551890
18561891 Human-readable name for the environment
1857
1858 - `type: "environment"`
1859
1860 The type of object (always 'environment')
1861
1862 default: environment
18631892
18641893 - `updated_at: string`
18651894
from line 1969
19401969
19411970 `cloud` environment configuration.
19421971
1972 - `type: "cloud"`
1973
1974 Environment type
1975
19431976 - `networking: BetaUnrestrictedNetwork or BetaLimitedNetwork`
19441977
19451978 Network configuration policy.
from line 1989
19561989
19571990 Limited network access.
19581991
1992 - `type: "limited"`
1993
1994 Network policy type
1995
19591996 - `allow_mcp_servers: boolean`
19601997
19611998 Permits outbound access to MCP server endpoints configured on the agent, beyond those listed in the `allowed_hosts` array.
from line 2005
19682005
19692006 Specifies domains the container can reach.
19702007
1971 - `type: "limited"`
1972
1973 Network policy type
1974
19752008 - `packages: BetaPackages`
19762009
19772010 Package manager configuration.
19782011
2012 - `type: optional "packages"`
2013
2014 Package configuration type
2015
2016 default: packages
2017
19792018 - `apt: array of string`
19802019
19812020 Ubuntu/Debian packages to install
from line 2038
19992038 - `pip: array of string`
20002039
20012040 Python packages to install
2002
2003 - `type: optional "packages"`
2004
2005 Package configuration type
2006
2007 default: packages
2008
2009 - `type: "cloud"`
2010
2011 Environment type
20122041
20132042### Beta Cloud Config Params
20142043
from line 2095
20662095
20672096 Under `limited` networking, requires `networking.allow_package_managers` to be `true`.
20682097
2098 - `type: optional "packages"`
2099
2100 Package configuration type
2101
2102 default: packages
2103
20692104 - `apt: optional array of string or null`
20702105
20712106 Ubuntu/Debian packages to install
from line 2125
20902125
20912126 Python packages to install
20922127
2093 - `type: optional "packages"`
2094
2095 Package configuration type
2096
2097 default: packages
2098
20992128### Beta Environment
21002129
21012130- `BetaEnvironment object`
21022131
21032132 Unified Environment resource for both cloud and self-hosted environments.
21042133
2134 - `type: "environment"`
2135
2136 The type of object (always 'environment')
2137
2138 default: environment
2139
21052140 - `id: string`
21062141
21072142 Environment identifier (e.g., 'env_...')
from line 2153
21182153
21192154 `cloud` environment configuration.
21202155
2156 - `type: "cloud"`
2157
2158 Environment type
2159
21212160 - `networking: BetaUnrestrictedNetwork or BetaLimitedNetwork`
21222161
21232162 Network configuration policy.
from line 2173
21342173
21352174 Limited network access.
21362175
2176 - `type: "limited"`
2177
2178 Network policy type
2179
21372180 - `allow_mcp_servers: boolean`
21382181
21392182 Permits outbound access to MCP server endpoints configured on the agent, beyond those listed in the `allowed_hosts` array.
from line 2189
21462189
21472190 Specifies domains the container can reach.
21482191
2149 - `type: "limited"`
2150
2151 Network policy type
2152
21532192 - `packages: BetaPackages`
21542193
21552194 Package manager configuration.
21562195
2196 - `type: optional "packages"`
2197
2198 Package configuration type
2199
2200 default: packages
2201
21572202 - `apt: array of string`
21582203
21592204 Ubuntu/Debian packages to install
from line 2223
21782223
21792224 Python packages to install
21802225
2181 - `type: optional "packages"`
2182
2183 Package configuration type
2184
2185 default: packages
2186
2187 - `type: "cloud"`
2226 - `BetaSelfHostedConfig object`
2227
2228 Configuration for self-hosted environments.
2229
2230 - `type: "self_hosted"`
21882231
21892232 Environment type
21902233
2191 - `BetaSelfHostedConfig object`
2192
2193 Configuration for self-hosted environments.
2194
2195 - `type: "self_hosted"`
2196
2197 Environment type
2198
21992234 - `created_at: string`
22002235
22012236 RFC 3339 timestamp when environment was created
from line 2247
22122247
22132248 Human-readable name for the environment
22142249
2215 - `type: "environment"`
2216
2217 The type of object (always 'environment')
2218
2219 default: environment
2220
22212250 - `updated_at: string`
22222251
22232252 RFC 3339 timestamp when environment was last updated
from line 2265
22362265
22372266 Response after deleting an environment.
22382267
2268 - `type: "environment_deleted"`
2269
2270 The type of response
2271
2272 default: environment_deleted
2273
22392274 - `id: string`
22402275
22412276 Environment identifier
22422277
2243 - `type: "environment_deleted"`
2244
2245 The type of response
2246
2247 default: environment_deleted
2248
22492278### Beta Limited Network
22502279
22512280- `BetaLimitedNetwork object`
22522281
22532282 Limited network access.
22542283
2284 - `type: "limited"`
2285
2286 Network policy type
2287
22552288 - `allow_mcp_servers: boolean`
22562289
22572290 Permits outbound access to MCP server endpoints configured on the agent, beyond those listed in the `allowed_hosts` array.
from line 2296
22632296 - `allowed_hosts: array of string`
22642297
22652298 Specifies domains the container can reach.
2266
2267 - `type: "limited"`
2268
2269 Network policy type
22702299
22712300### Beta Limited Network Params
22722301
from line 2328
22992328
23002329 Packages (and their versions) available in this environment.
23012330
2331 - `type: optional "packages"`
2332
2333 Package configuration type
2334
2335 default: packages
2336
23022337 - `apt: array of string`
23032338
23042339 Ubuntu/Debian packages to install
from line 2358
23232358
23242359 Python packages to install
23252360
2361### Beta Packages Params
2362
2363- `BetaPackagesParams object`
2364
2365 Specify packages (and optionally their versions) available in this environment.
2366
2367 When versioning, use the version semantics relevant for the package manager, e.g. for `pip` use `package==1.0.0`. You are responsible for validating the package and version exist. Unversioned installs the latest.
2368
2369 Under `limited` networking, requires `networking.allow_package_managers` to be `true`.
2370
23262371 - `type: optional "packages"`
23272372
23282373 Package configuration type
23292374
23302375 default: packages
23312376
2332### Beta Packages Params
2333
2334- `BetaPackagesParams object`
2335
2336 Specify packages (and optionally their versions) available in this environment.
2337
2338 When versioning, use the version semantics relevant for the package manager, e.g. for `pip` use `package==1.0.0`. You are responsible for validating the package and version exist. Unversioned installs the latest.
2339
2340 Under `limited` networking, requires `networking.allow_package_managers` to be `true`.
2341
23422377 - `apt: optional array of string or null`
23432378
23442379 Ubuntu/Debian packages to install
from line 2398
23632398
23642399 Python packages to install
23652400
2366 - `type: optional "packages"`
2367
2368 Package configuration type
2369
2370 default: packages
2371
23722401### Beta Self Hosted Config
23732402
23742403- `BetaSelfHostedConfig object`
from line 2452
24232452
24242453 - `string`
24252454
2426 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
2455 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
24272456
24282457 - `"message-batches-2024-09-24"`
24292458
from line 2500
24712500
24722501 - `"user-profiles-2026-08-18"`
24732502
2503 - `"user-profiles-2026-09-04"`
2504
24742505 - `"advisor-tool-2026-03-01"`
24752506
24762507 - `"managed-agents-2026-04-01"`
from line 2543
25122543 - `"thinking-binding-controls-2026-08-01"`
25132544
25142545 - `"mid-conversation-system-clear-at-2026-08-21"`
2546
2547- `"anthropic-workspace-id": optional string`
25152548
25162549#### Returns
25172550
from line 2556
25232556 receive new messages. The environment worker polls for work to execute in a
25242557 self-hosted sandbox.
25252558
2559 - `type: "work"`
2560
2561 The type of object (always 'work')
2562
2563 default: work
2564
25262565 - `id: string`
25272566
25282567 Work identifier (e.g., 'work_...')
from line 2578
25392578
25402579 The actual work to be performed
25412580
2581 - `type: "session"`
2582
2583 Type of work data
2584
25422585 - `id: string`
25432586
25442587 Session identifier (e.g., 'session_...')
25452588
2546 - `type: "session"`
2547
2548 Type of work data
2549
25502589 - `environment_id: string`
25512590
25522591 Environment identifier this work belongs to (e.g., `env_...`)
from line 2627
25882627 - `stopped_at: string or null`
25892628
25902629 RFC 3339 timestamp when work execution stopped
2591
2592 - `type: "work"`
2593
2594 The type of object (always 'work')
2595
2596 default: work
25972630
25982631#### Example
25992632
from line 2696
26632696
26642697 - `string`
26652698
2666 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
2699 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
26672700
26682701 - `"message-batches-2024-09-24"`
26692702
from line 2743
27102743 - `"user-profiles-2026-03-24"`
27112744
27122745 - `"user-profiles-2026-08-18"`
2746
2747 - `"user-profiles-2026-09-04"`
27132748
27142749 - `"advisor-tool-2026-03-01"`
27152750
from line 2802
27672802 receive new messages. The environment worker polls for work to execute in a
27682803 self-hosted sandbox.
27692804
2805 - `type: "work"`
2806
2807 The type of object (always 'work')
2808
2809 default: work
2810
27702811 - `id: string`
27712812
27722813 Work identifier (e.g., 'work_...')
from line 2824
27832824
27842825 The actual work to be performed
27852826
2827 - `type: "session"`
2828
2829 Type of work data
2830
27862831 - `id: string`
27872832
27882833 Session identifier (e.g., 'session_...')
27892834
2790 - `type: "session"`
2791
2792 Type of work data
2793
27942835 - `environment_id: string`
27952836
27962837 Environment identifier this work belongs to (e.g., `env_...`)
from line 2873
28322873 - `stopped_at: string or null`
28332874
28342875 RFC 3339 timestamp when work execution stopped
2835
2836 - `type: "work"`
2837
2838 The type of object (always 'work')
2839
2840 default: work
28412876
28422877#### Example
28432878
from line 2930
28952930
28962931 - `string`
28972932
2898 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
2933 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
28992934
29002935 - `"message-batches-2024-09-24"`
29012936
from line 2977
29422977 - `"user-profiles-2026-03-24"`
29432978
29442979 - `"user-profiles-2026-08-18"`
2980
2981 - `"user-profiles-2026-09-04"`
29452982
29462983 - `"advisor-tool-2026-03-01"`
29472984
from line 3032
29953032 receive new messages. The environment worker polls for work to execute in a
29963033 self-hosted sandbox.
29973034
3035 - `type: "work"`
3036
3037 The type of object (always 'work')
3038
3039 default: work
3040
29983041 - `id: string`
29993042
30003043 Work identifier (e.g., 'work_...')
from line 3054
30113054
30123055 The actual work to be performed
30133056
3057 - `type: "session"`
3058
3059 Type of work data
3060
30143061 - `id: string`
30153062
30163063 Session identifier (e.g., 'session_...')
30173064
3018 - `type: "session"`
3019
3020 Type of work data
3021
30223065 - `environment_id: string`
30233066
30243067 Environment identifier this work belongs to (e.g., `env_...`)
from line 3103
30603103 - `stopped_at: string or null`
30613104
30623105 RFC 3339 timestamp when work execution stopped
3063
3064 - `type: "work"`
3065
3066 The type of object (always 'work')
3067
3068 default: work
30693106
30703107#### Example
30713108
from line 3171
31343171
31353172 - `string`
31363173
3137 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
3174 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
31383175
31393176 - `"message-batches-2024-09-24"`
31403177
from line 3219
31823219
31833220 - `"user-profiles-2026-08-18"`
31843221
3222 - `"user-profiles-2026-09-04"`
3223
31853224 - `"advisor-tool-2026-03-01"`
31863225
31873226 - `"managed-agents-2026-04-01"`
from line 3269
32303269
32313270 Response after recording a heartbeat for a work item.
32323271
3272 - `type: "work_heartbeat"`
3273
3274 The type of response
3275
3276 default: work_heartbeat
3277
32333278 - `last_heartbeat: string`
32343279
32353280 RFC 3339 timestamp of the actual heartbeat from DB
from line 3300
32553300 - `ttl_seconds: number`
32563301
32573302 Effective TTL applied to the lease
3258
3259 - `type: "work_heartbeat"`
3260
3261 The type of response
3262
3263 default: work_heartbeat
32643303
32653304#### Example
32663305
from line 3345
33063345
33073346 - `string`
33083347
3309 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
3348 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
33103349
33113350 - `"message-batches-2024-09-24"`
33123351
from line 3393
33543393
33553394 - `"user-profiles-2026-08-18"`
33563395
3396 - `"user-profiles-2026-09-04"`
3397
33573398 - `"advisor-tool-2026-03-01"`
33583399
33593400 - `"managed-agents-2026-04-01"`
from line 3436
33953436 - `"thinking-binding-controls-2026-08-01"`
33963437
33973438 - `"mid-conversation-system-clear-at-2026-08-21"`
3439
3440- `"anthropic-workspace-id": optional string`
33983441
33993442#### Body parameters
34003443
from line 3457
34143457 receive new messages. The environment worker polls for work to execute in a
34153458 self-hosted sandbox.
34163459
3460 - `type: "work"`
3461
3462 The type of object (always 'work')
3463
3464 default: work
3465
34173466 - `id: string`
34183467
34193468 Work identifier (e.g., 'work_...')
from line 3479
34303479
34313480 The actual work to be performed
34323481
3482 - `type: "session"`
3483
3484 Type of work data
3485
34333486 - `id: string`
34343487
34353488 Session identifier (e.g., 'session_...')
34363489
3437 - `type: "session"`
3438
3439 Type of work data
3440
34413490 - `environment_id: string`
34423491
34433492 Environment identifier this work belongs to (e.g., `env_...`)
from line 3528
34793528 - `stopped_at: string or null`
34803529
34813530 RFC 3339 timestamp when work execution stopped
3482
3483 - `type: "work"`
3484
3485 The type of object (always 'work')
3486
3487 default: work
34883531
34893532#### Example
34903533
from line 3597
35543597
35553598 - `string`
35563599
3557 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
3600 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
35583601
35593602 - `"message-batches-2024-09-24"`
35603603
from line 3645
36023645
36033646 - `"user-profiles-2026-08-18"`
36043647
3648 - `"user-profiles-2026-09-04"`
3649
36053650 - `"advisor-tool-2026-03-01"`
36063651
36073652 - `"managed-agents-2026-04-01"`
from line 3699
36543699
36553700 List of work items
36563701
3702 - `type: "work"`
3703
3704 The type of object (always 'work')
3705
3706 default: work
3707
36573708 - `id: string`
36583709
36593710 Work identifier (e.g., 'work_...')
from line 3721
36703721
36713722 The actual work to be performed
36723723
3724 - `type: "session"`
3725
3726 Type of work data
3727
36733728 - `id: string`
36743729
36753730 Session identifier (e.g., 'session_...')
36763731
3677 - `type: "session"`
3678
3679 Type of work data
3680
36813732 - `environment_id: string`
36823733
36833734 Environment identifier this work belongs to (e.g., `env_...`)
from line 3770
37193770 - `stopped_at: string or null`
37203771
37213772 RFC 3339 timestamp when work execution stopped
3722
3723 - `type: "work"`
3724
3725 The type of object (always 'work')
3726
3727 default: work
37283773
37293774 - `next_page: string or null`
37303775
from line 3836
37913836
37923837 - `string`
37933838
3794 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
3839 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
37953840
37963841 - `"message-batches-2024-09-24"`
37973842
from line 3884
38393884
38403885 - `"user-profiles-2026-08-18"`
38413886
3887 - `"user-profiles-2026-09-04"`
3888
38423889 - `"advisor-tool-2026-03-01"`
38433890
38443891 - `"managed-agents-2026-04-01"`
from line 3927
38803927 - `"thinking-binding-controls-2026-08-01"`
38813928
38823929 - `"mid-conversation-system-clear-at-2026-08-21"`
3930
3931- `"anthropic-workspace-id": optional string`
38833932
38843933#### Body parameters
38853934
from line 3946
38973946 receive new messages. The environment worker polls for work to execute in a
38983947 self-hosted sandbox.
38993948
3949 - `type: "work"`
3950
3951 The type of object (always 'work')
3952
3953 default: work
3954
39003955 - `id: string`
39013956
39023957 Work identifier (e.g., 'work_...')
from line 3968
39133968
39143969 The actual work to be performed
39153970
3971 - `type: "session"`
3972
3973 Type of work data
3974
39163975 - `id: string`
39173976
39183977 Session identifier (e.g., 'session_...')
39193978
3920 - `type: "session"`
3921
3922 Type of work data
3923
39243979 - `environment_id: string`
39253980
39263981 Environment identifier this work belongs to (e.g., `env_...`)
from line 4017
39624017 - `stopped_at: string or null`
39634018
39644019 RFC 3339 timestamp when work execution stopped
3965
3966 - `type: "work"`
3967
3968 The type of object (always 'work')
3969
3970 default: work
39714020
39724021#### Example
39734022
from line 4076
40274076
40284077 - `string`
40294078
4030 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
4079 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
40314080
40324081 - `"message-batches-2024-09-24"`
40334082
from line 4124
40754124
40764125 - `"user-profiles-2026-08-18"`
40774126
4127 - `"user-profiles-2026-09-04"`
4128
40784129 - `"advisor-tool-2026-03-01"`
40794130
40804131 - `"managed-agents-2026-04-01"`
from line 4168
41174168
41184169 - `"mid-conversation-system-clear-at-2026-08-21"`
41194170
4171- `"anthropic-workspace-id": optional string`
4172
41204173#### Returns
41214174
41224175- `BetaSelfHostedWorkQueueStats object`
from line 4178
41254178
41264179 Uses Redis Stream consumer group metrics for O(1) queries.
41274180
4181 - `type: "work_queue_stats"`
4182
4183 The type of object
4184
4185 default: work_queue_stats
4186
41284187 - `depth: number`
41294188
41304189 Number of work items waiting to be picked up (lag from consumer group)
from line 4197
41384197 Number of work items being processed (polled but not acknowledged)
41394198
41404199 default: 0
4141
4142 - `type: "work_queue_stats"`
4143
4144 The type of object
4145
4146 default: work_queue_stats
41474200
41484201 - `workers_polling: number or null`
41494202
41504203
api/beta/environments/archive Changed · +35 / -26 lines
from line 1
1---
2title: Archive Environment
3url: https://platform.claude.com/docs/en/api/beta/environments/archive
4---
5
16# Archive Environment
27
38**POST** `/v1/environments/{environment_id}/archive`
from line 21
1621
1722 - `string`
1823
19 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
24 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
2025
2126 - `"message-batches-2024-09-24"`
2227
from line 69
6469
6570 - `"user-profiles-2026-08-18"`
6671
72 - `"user-profiles-2026-09-04"`
73
6774 - `"advisor-tool-2026-03-01"`
6875
6976 - `"managed-agents-2026-04-01"`
from line 113
106113
107114 - `"mid-conversation-system-clear-at-2026-08-21"`
108115
116- `"anthropic-workspace-id": optional string`
117
109118## Returns
110119
111120- `BetaEnvironment object`
from line 121
112121
113122 Unified Environment resource for both cloud and self-hosted environments.
114123
124 - `type: "environment"`
125
126 The type of object (always 'environment')
127
128 default: environment
129
115130 - `id: string`
116131
117132 Environment identifier (e.g., 'env_...')
from line 143
128143
129144 `cloud` environment configuration.
130145
146 - `type: "cloud"`
147
148 Environment type
149
131150 - `networking: BetaUnrestrictedNetwork or BetaLimitedNetwork`
132151
133152 Network configuration policy.
from line 163
144163
145164 Limited network access.
146165
166 - `type: "limited"`
167
168 Network policy type
169
147170 - `allow_mcp_servers: boolean`
148171
149172 Permits outbound access to MCP server endpoints configured on the agent, beyond those listed in the `allowed_hosts` array.
from line 179
156179
157180 Specifies domains the container can reach.
158181
159 - `type: "limited"`
160
161 Network policy type
162
163182 - `packages: BetaPackages`
164183
165184 Package manager configuration.
166185
186 - `type: optional "packages"`
187
188 Package configuration type
189
190 default: packages
191
167192 - `apt: array of string`
168193
169194 Ubuntu/Debian packages to install
from line 213
188213
189214 Python packages to install
190215
191 - `type: optional "packages"`
192
193 Package configuration type
194
195 default: packages
196
197 - `type: "cloud"`
198
199 Environment type
200
201216 - `BetaSelfHostedConfig object`
202217
203218 Configuration for self-hosted environments.
from line 236
221236 - `name: string`
222237
223238 Human-readable name for the environment
224
225 - `type: "environment"`
226
227 The type of object (always 'environment')
228
229 default: environment
230239
231240 - `updated_at: string`
232241
api/beta/environments/create Changed · +42 / -33 lines
from line 1
1---
2title: Create Environment
3url: https://platform.claude.com/docs/en/api/beta/environments/create
4---
5
16# Create Environment
27
38**POST** `/v1/environments`
from line 17
1217
1318 - `string`
1419
15 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
20 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
1621
1722 - `"message-batches-2024-09-24"`
1823
from line 65
6065
6166 - `"user-profiles-2026-08-18"`
6267
68 - `"user-profiles-2026-09-04"`
69
6370 - `"advisor-tool-2026-03-01"`
6471
6572 - `"managed-agents-2026-04-01"`
from line 109
102109
103110 - `"mid-conversation-system-clear-at-2026-08-21"`
104111
112- `"anthropic-workspace-id": optional string`
113
105114## Body parameters
106115
107116- `name: string`
from line 177
168177
169178 Under `limited` networking, requires `networking.allow_package_managers` to be `true`.
170179
180 - `type: optional "packages"`
181
182 Package configuration type
183
184 default: packages
185
171186 - `apt: optional array of string or null`
172187
173188 Ubuntu/Debian packages to install
from line 207
192207
193208 Python packages to install
194209
195 - `type: optional "packages"`
196
197 Package configuration type
198
199 default: packages
200
201210 - `BetaSelfHostedConfigParams object`
202211
203212 Request params for `self_hosted` environment configuration.
from line 227
218227
219228- `scope: optional "organization" or "account" or null`
220229
221 The visibility scope for this environment. 'organization' makes the environment visible to all accounts. 'account' restricts visibility to the owning account only. Only applicable for self-hosted environments. If not specified, defaults based on organization type.
230 The visibility scope for this environment. 'organization' makes the environment visible to all accounts. 'account' restricts visibility to the owning account only. API organizations support only 'organization'; 'account' is rejected. If not specified, defaults based on organization type.
222231
223232 - `"organization"`
224233
from line 239
230239
231240 Unified Environment resource for both cloud and self-hosted environments.
232241
242 - `type: "environment"`
243
244 The type of object (always 'environment')
245
246 default: environment
247
233248 - `id: string`
234249
235250 Environment identifier (e.g., 'env_...')
from line 261
246261
247262 `cloud` environment configuration.
248263
264 - `type: "cloud"`
265
266 Environment type
267
249268 - `networking: BetaUnrestrictedNetwork or BetaLimitedNetwork`
250269
251270 Network configuration policy.
from line 281
262281
263282 Limited network access.
264283
284 - `type: "limited"`
285
286 Network policy type
287
265288 - `allow_mcp_servers: boolean`
266289
267290 Permits outbound access to MCP server endpoints configured on the agent, beyond those listed in the `allowed_hosts` array.
from line 297
274297
275298 Specifies domains the container can reach.
276299
277 - `type: "limited"`
278
279 Network policy type
280
281300 - `packages: BetaPackages`
282301
283302 Package manager configuration.
284303
304 - `type: optional "packages"`
305
306 Package configuration type
307
308 default: packages
309
285310 - `apt: array of string`
286311
287312 Ubuntu/Debian packages to install
from line 331
306331
307332 Python packages to install
308333
309 - `type: optional "packages"`
310
311 Package configuration type
312
313 default: packages
314
315 - `type: "cloud"`
316
317 Environment type
318
319334 - `BetaSelfHostedConfig object`
320335
321336 Configuration for self-hosted environments.
from line 354
339354 - `name: string`
340355
341356 Human-readable name for the environment
342
343 - `type: "environment"`
344
345 The type of object (always 'environment')
346
347 default: environment
348357
349358 - `updated_at: string`
350359
api/beta/environments/delete Changed · +14 / -5 lines
from line 1
1---
2title: Delete Environment
3url: https://platform.claude.com/docs/en/api/beta/environments/delete
4---
5
16# Delete Environment
27
38**DELETE** `/v1/environments/{environment_id}`
from line 21
1621
1722 - `string`
1823
19 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
24 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
2025
2126 - `"message-batches-2024-09-24"`
2227
from line 69
6469
6570 - `"user-profiles-2026-08-18"`
6671
72 - `"user-profiles-2026-09-04"`
73
6774 - `"advisor-tool-2026-03-01"`
6875
6976 - `"managed-agents-2026-04-01"`
from line 113
106113
107114 - `"mid-conversation-system-clear-at-2026-08-21"`
108115
116- `"anthropic-workspace-id": optional string`
117
109118## Returns
110119
111120- `BetaEnvironmentDeleteResponse object`
from line 121
112121
113122 Response after deleting an environment.
114123
115 - `id: string`
116
117 Environment identifier
118
119124 - `type: "environment_deleted"`
120125
121126 The type of response
122127
123128 default: environment_deleted
129
130 - `id: string`
131
132 Environment identifier
124133
125134## Example
126135
api/beta/environments/list Changed · +35 / -26 lines
from line 1
1---
2title: List Environments
3url: https://platform.claude.com/docs/en/api/beta/environments/list
4---
5
16# List Environments
27
38**GET** `/v1/environments`
from line 35
3035
3136 - `string`
3237
33 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
38 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
3439
3540 - `"message-batches-2024-09-24"`
3641
from line 83
7883
7984 - `"user-profiles-2026-08-18"`
8085
86 - `"user-profiles-2026-09-04"`
87
8188 - `"advisor-tool-2026-03-01"`
8289
8390 - `"managed-agents-2026-04-01"`
from line 127
120127
121128 - `"mid-conversation-system-clear-at-2026-08-21"`
122129
130- `"anthropic-workspace-id": optional string`
131
123132## Returns
124133
125134- `data: array of BetaEnvironment`
from line 135
126135
127136 List of environments.
128137
138 - `type: "environment"`
139
140 The type of object (always 'environment')
141
142 default: environment
143
129144 - `id: string`
130145
131146 Environment identifier (e.g., 'env_...')
from line 157
142157
143158 `cloud` environment configuration.
144159
160 - `type: "cloud"`
161
162 Environment type
163
145164 - `networking: BetaUnrestrictedNetwork or BetaLimitedNetwork`
146165
147166 Network configuration policy.
from line 177
158177
159178 Limited network access.
160179
180 - `type: "limited"`
181
182 Network policy type
183
161184 - `allow_mcp_servers: boolean`
162185
163186 Permits outbound access to MCP server endpoints configured on the agent, beyond those listed in the `allowed_hosts` array.
from line 193
170193
171194 Specifies domains the container can reach.
172195
173 - `type: "limited"`
174
175 Network policy type
176
177196 - `packages: BetaPackages`
178197
179198 Package manager configuration.
180199
200 - `type: optional "packages"`
201
202 Package configuration type
203
204 default: packages
205
181206 - `apt: array of string`
182207
183208 Ubuntu/Debian packages to install
from line 227
202227
203228 Python packages to install
204229
205 - `type: optional "packages"`
206
207 Package configuration type
208
209 default: packages
210
211 - `type: "cloud"`
212
213 Environment type
214
215230 - `BetaSelfHostedConfig object`
216231
217232 Configuration for self-hosted environments.
from line 250
235250 - `name: string`
236251
237252 Human-readable name for the environment
238
239 - `type: "environment"`
240
241 The type of object (always 'environment')
242
243 default: environment
244253
245254 - `updated_at: string`
246255
api/beta/environments/retrieve Changed · +35 / -26 lines
from line 1
1---
2title: Get Environment
3url: https://platform.claude.com/docs/en/api/beta/environments/retrieve
4---
5
16# Get Environment
27
38**GET** `/v1/environments/{environment_id}`
from line 21
1621
1722 - `string`
1823
19 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
24 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
2025
2126 - `"message-batches-2024-09-24"`
2227
from line 69
6469
6570 - `"user-profiles-2026-08-18"`
6671
72 - `"user-profiles-2026-09-04"`
73
6774 - `"advisor-tool-2026-03-01"`
6875
6976 - `"managed-agents-2026-04-01"`
from line 113
106113
107114 - `"mid-conversation-system-clear-at-2026-08-21"`
108115
116- `"anthropic-workspace-id": optional string`
117
109118## Returns
110119
111120- `BetaEnvironment object`
from line 121
112121
113122 Unified Environment resource for both cloud and self-hosted environments.
114123
124 - `type: "environment"`
125
126 The type of object (always 'environment')
127
128 default: environment
129
115130 - `id: string`
116131
117132 Environment identifier (e.g., 'env_...')
from line 143
128143
129144 `cloud` environment configuration.
130145
146 - `type: "cloud"`
147
148 Environment type
149
131150 - `networking: BetaUnrestrictedNetwork or BetaLimitedNetwork`
132151
133152 Network configuration policy.
from line 163
144163
145164 Limited network access.
146165
166 - `type: "limited"`
167
168 Network policy type
169
147170 - `allow_mcp_servers: boolean`
148171
149172 Permits outbound access to MCP server endpoints configured on the agent, beyond those listed in the `allowed_hosts` array.
from line 179
156179
157180 Specifies domains the container can reach.
158181
159 - `type: "limited"`
160
161 Network policy type
162
163182 - `packages: BetaPackages`
164183
165184 Package manager configuration.
166185
186 - `type: optional "packages"`
187
188 Package configuration type
189
190 default: packages
191
167192 - `apt: array of string`
168193
169194 Ubuntu/Debian packages to install
from line 213
188213
189214 Python packages to install
190215
191 - `type: optional "packages"`
192
193 Package configuration type
194
195 default: packages
196
197 - `type: "cloud"`
198
199 Environment type
200
201216 - `BetaSelfHostedConfig object`
202217
203218 Configuration for self-hosted environments.
from line 236
221236 - `name: string`
222237
223238 Human-readable name for the environment
224
225 - `type: "environment"`
226
227 The type of object (always 'environment')
228
229 default: environment
230239
231240 - `updated_at: string`
232241
api/beta/environments/update Changed · +41 / -32 lines
from line 1
1---
2title: Update Environment
3url: https://platform.claude.com/docs/en/api/beta/environments/update
4---
5
16# Update Environment
27
38**POST** `/v1/environments/{environment_id}`
from line 21
1621
1722 - `string`
1823
19 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
24 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
2025
2126 - `"message-batches-2024-09-24"`
2227
from line 69
6469
6570 - `"user-profiles-2026-08-18"`
6671
72 - `"user-profiles-2026-09-04"`
73
6774 - `"advisor-tool-2026-03-01"`
6875
6976 - `"managed-agents-2026-04-01"`
from line 113
106113
107114 - `"mid-conversation-system-clear-at-2026-08-21"`
108115
116- `"anthropic-workspace-id": optional string`
117
109118## Body parameters
110119
111120- `config: optional BetaCloudConfigParams or BetaSelfHostedConfigParams or null`
from line 175
166175
167176 Under `limited` networking, requires `networking.allow_package_managers` to be `true`.
168177
178 - `type: optional "packages"`
179
180 Package configuration type
181
182 default: packages
183
169184 - `apt: optional array of string or null`
170185
171186 Ubuntu/Debian packages to install
from line 205
190205
191206 Python packages to install
192207
193 - `type: optional "packages"`
194
195 Package configuration type
196
197 default: packages
198
199208 - `BetaSelfHostedConfigParams object`
200209
201210 Request params for `self_hosted` environment configuration.
from line 243
234243
235244 Unified Environment resource for both cloud and self-hosted environments.
236245
246 - `type: "environment"`
247
248 The type of object (always 'environment')
249
250 default: environment
251
237252 - `id: string`
238253
239254 Environment identifier (e.g., 'env_...')
from line 265
250265
251266 `cloud` environment configuration.
252267
268 - `type: "cloud"`
269
270 Environment type
271
253272 - `networking: BetaUnrestrictedNetwork or BetaLimitedNetwork`
254273
255274 Network configuration policy.
from line 285
266285
267286 Limited network access.
268287
288 - `type: "limited"`
289
290 Network policy type
291
269292 - `allow_mcp_servers: boolean`
270293
271294 Permits outbound access to MCP server endpoints configured on the agent, beyond those listed in the `allowed_hosts` array.
from line 301
278301
279302 Specifies domains the container can reach.
280303
281 - `type: "limited"`
282
283 Network policy type
284
285304 - `packages: BetaPackages`
286305
287306 Package manager configuration.
288307
308 - `type: optional "packages"`
309
310 Package configuration type
311
312 default: packages
313
289314 - `apt: array of string`
290315
291316 Ubuntu/Debian packages to install
from line 335
310335
311336 Python packages to install
312337
313 - `type: optional "packages"`
314
315 Package configuration type
316
317 default: packages
318
319 - `type: "cloud"`
320
321 Environment type
322
323338 - `BetaSelfHostedConfig object`
324339
325340 Configuration for self-hosted environments.
from line 358
343358 - `name: string`
344359
345360 Human-readable name for the environment
346
347 - `type: "environment"`
348
349 The type of object (always 'environment')
350
351 default: environment
352361
353362 - `updated_at: string`
354363
api/beta/environments/work Changed · +145 / -116 lines
from line 1
1---
2title: Work
3url: https://platform.claude.com/docs/en/api/beta/environments/work
4---
5
16# Work
27
38## Get Work Item
from line 27
2227
2328 - `string`
2429
25 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
30 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
2631
2732 - `"message-batches-2024-09-24"`
2833
from line 75
7075
7176 - `"user-profiles-2026-08-18"`
7277
78 - `"user-profiles-2026-09-04"`
79
7380 - `"advisor-tool-2026-03-01"`
7481
7582 - `"managed-agents-2026-04-01"`
from line 119
112119
113120 - `"mid-conversation-system-clear-at-2026-08-21"`
114121
122- `"anthropic-workspace-id": optional string`
123
115124### Returns
116125
117126- `BetaSelfHostedWork object`
from line 131
122131 receive new messages. The environment worker polls for work to execute in a
123132 self-hosted sandbox.
124133
134 - `type: "work"`
135
136 The type of object (always 'work')
137
138 default: work
139
125140 - `id: string`
126141
127142 Work identifier (e.g., 'work_...')
from line 153
138153
139154 The actual work to be performed
140155
141 - `id: string`
142
143 Session identifier (e.g., 'session_...')
144
145156 - `type: "session"`
146157
147158 Type of work data
148159
160 - `id: string`
161
162 Session identifier (e.g., 'session_...')
163
149164 - `environment_id: string`
150165
151166 Environment identifier this work belongs to (e.g., `env_...`)
from line 203
188203
189204 RFC 3339 timestamp when work execution stopped
190205
191 - `type: "work"`
192
193 The type of object (always 'work')
194
195 default: work
196
197206### Example
198207
199208```bash
from line 271
262271
263272 - `string`
264273
265 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
274 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
266275
267276 - `"message-batches-2024-09-24"`
268277
from line 319
310319
311320 - `"user-profiles-2026-08-18"`
312321
322 - `"user-profiles-2026-09-04"`
323
313324 - `"advisor-tool-2026-03-01"`
314325
315326 - `"managed-agents-2026-04-01"`
from line 377
366377 receive new messages. The environment worker polls for work to execute in a
367378 self-hosted sandbox.
368379
380 - `type: "work"`
381
382 The type of object (always 'work')
383
384 default: work
385
369386 - `id: string`
370387
371388 Work identifier (e.g., 'work_...')
from line 399
382399
383400 The actual work to be performed
384401
385 - `id: string`
386
387 Session identifier (e.g., 'session_...')
388
389402 - `type: "session"`
390403
391404 Type of work data
392405
406 - `id: string`
407
408 Session identifier (e.g., 'session_...')
409
393410 - `environment_id: string`
394411
395412 Environment identifier this work belongs to (e.g., `env_...`)
from line 449
432449
433450 RFC 3339 timestamp when work execution stopped
434451
435 - `type: "work"`
436
437 The type of object (always 'work')
438
439 default: work
440
441452### Example
442453
443454```bash
from line 505
494505
495506 - `string`
496507
497 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
508 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
498509
499510 - `"message-batches-2024-09-24"`
500511
from line 553
542553
543554 - `"user-profiles-2026-08-18"`
544555
556 - `"user-profiles-2026-09-04"`
557
545558 - `"advisor-tool-2026-03-01"`
546559
547560 - `"managed-agents-2026-04-01"`
from line 607
594607 receive new messages. The environment worker polls for work to execute in a
595608 self-hosted sandbox.
596609
610 - `type: "work"`
611
612 The type of object (always 'work')
613
614 default: work
615
597616 - `id: string`
598617
599618 Work identifier (e.g., 'work_...')
from line 629
610629
611630 The actual work to be performed
612631
613 - `id: string`
614
615 Session identifier (e.g., 'session_...')
616
617632 - `type: "session"`
618633
619634 Type of work data
620635
636 - `id: string`
637
638 Session identifier (e.g., 'session_...')
639
621640 - `environment_id: string`
622641
623642 Environment identifier this work belongs to (e.g., `env_...`)
from line 679
660679
661680 RFC 3339 timestamp when work execution stopped
662681
663 - `type: "work"`
664
665 The type of object (always 'work')
666
667 default: work
668
669682### Example
670683
671684```bash
from line 746
733746
734747 - `string`
735748
736 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
749 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
737750
738751 - `"message-batches-2024-09-24"`
739752
from line 794
781794
782795 - `"user-profiles-2026-08-18"`
783796
797 - `"user-profiles-2026-09-04"`
798
784799 - `"advisor-tool-2026-03-01"`
785800
786801 - `"managed-agents-2026-04-01"`
from line 844
829844
830845 Response after recording a heartbeat for a work item.
831846
847 - `type: "work_heartbeat"`
848
849 The type of response
850
851 default: work_heartbeat
852
832853 - `last_heartbeat: string`
833854
834855 RFC 3339 timestamp of the actual heartbeat from DB
from line 876
855876
856877 Effective TTL applied to the lease
857878
858 - `type: "work_heartbeat"`
859
860 The type of response
861
862 default: work_heartbeat
863
864879### Example
865880
866881```bash
from line 920
905920
906921 - `string`
907922
908 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
923 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
909924
910925 - `"message-batches-2024-09-24"`
911926
from line 968
953968
954969 - `"user-profiles-2026-08-18"`
955970
971 - `"user-profiles-2026-09-04"`
972
956973 - `"advisor-tool-2026-03-01"`
957974
958975 - `"managed-agents-2026-04-01"`
from line 1012
9951012
9961013 - `"mid-conversation-system-clear-at-2026-08-21"`
9971014
1015- `"anthropic-workspace-id": optional string`
1016
9981017### Body parameters
9991018
10001019- `force: optional boolean`
from line 1032
10131032 receive new messages. The environment worker polls for work to execute in a
10141033 self-hosted sandbox.
10151034
1035 - `type: "work"`
1036
1037 The type of object (always 'work')
1038
1039 default: work
1040
10161041 - `id: string`
10171042
10181043 Work identifier (e.g., 'work_...')
from line 1054
10291054
10301055 The actual work to be performed
10311056
1032 - `id: string`
1033
1034 Session identifier (e.g., 'session_...')
1035
10361057 - `type: "session"`
10371058
10381059 Type of work data
10391060
1061 - `id: string`
1062
1063 Session identifier (e.g., 'session_...')
1064
10401065 - `environment_id: string`
10411066
10421067 Environment identifier this work belongs to (e.g., `env_...`)
from line 1104
10791104
10801105 RFC 3339 timestamp when work execution stopped
10811106
1082 - `type: "work"`
1083
1084 The type of object (always 'work')
1085
1086 default: work
1087
10881107### Example
10891108
10901109```bash
from line 1172
11531172
11541173 - `string`
11551174
1156 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
1175 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
11571176
11581177 - `"message-batches-2024-09-24"`
11591178
from line 1220
12011220
12021221 - `"user-profiles-2026-08-18"`
12031222
1223 - `"user-profiles-2026-09-04"`
1224
12041225 - `"advisor-tool-2026-03-01"`
12051226
12061227 - `"managed-agents-2026-04-01"`
from line 1274
12531274
12541275 List of work items
12551276
1277 - `type: "work"`
1278
1279 The type of object (always 'work')
1280
1281 default: work
1282
12561283 - `id: string`
12571284
12581285 Work identifier (e.g., 'work_...')
from line 1296
12691296
12701297 The actual work to be performed
12711298
1272 - `id: string`
1273
1274 Session identifier (e.g., 'session_...')
1275
12761299 - `type: "session"`
12771300
12781301 Type of work data
12791302
1303 - `id: string`
1304
1305 Session identifier (e.g., 'session_...')
1306
12801307 - `environment_id: string`
12811308
12821309 Environment identifier this work belongs to (e.g., `env_...`)
from line 1346
13191346
13201347 RFC 3339 timestamp when work execution stopped
13211348
1322 - `type: "work"`
1323
1324 The type of object (always 'work')
1325
1326 default: work
1327
13281349 - `next_page: string or null`
13291350
13301351 Opaque cursor for fetching the next page of results
from line 1411
13901411
13911412 - `string`
13921413
1393 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
1414 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
13941415
13951416 - `"message-batches-2024-09-24"`
13961417
from line 1459
14381459
14391460 - `"user-profiles-2026-08-18"`
14401461
1462 - `"user-profiles-2026-09-04"`
1463
14411464 - `"advisor-tool-2026-03-01"`
14421465
14431466 - `"managed-agents-2026-04-01"`
from line 1503
14801503
14811504 - `"mid-conversation-system-clear-at-2026-08-21"`
14821505
1506- `"anthropic-workspace-id": optional string`
1507
14831508### Body parameters
14841509
14851510- `metadata: map[string]`
from line 1521
14961521 receive new messages. The environment worker polls for work to execute in a
14971522 self-hosted sandbox.
14981523
1524 - `type: "work"`
1525
1526 The type of object (always 'work')
1527
1528 default: work
1529
14991530 - `id: string`
15001531
15011532 Work identifier (e.g., 'work_...')
from line 1543
15121543
15131544 The actual work to be performed
15141545
1515 - `id: string`
1516
1517 Session identifier (e.g., 'session_...')
1518
15191546 - `type: "session"`
15201547
15211548 Type of work data
15221549
1550 - `id: string`
1551
1552 Session identifier (e.g., 'session_...')
1553
15231554 - `environment_id: string`
15241555
15251556 Environment identifier this work belongs to (e.g., `env_...`)
from line 1593
15621593
15631594 RFC 3339 timestamp when work execution stopped
15641595
1565 - `type: "work"`
1566
1567 The type of object (always 'work')
1568
1569 default: work
1570
15711596### Example
15721597
15731598```bash
from line 1651
16261651
16271652 - `string`
16281653
1629 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
1654 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
16301655
16311656 - `"message-batches-2024-09-24"`
16321657
from line 1699
16741699
16751700 - `"user-profiles-2026-08-18"`
16761701
1702 - `"user-profiles-2026-09-04"`
1703
16771704 - `"advisor-tool-2026-03-01"`
16781705
16791706 - `"managed-agents-2026-04-01"`
from line 1743
17161743
17171744 - `"mid-conversation-system-clear-at-2026-08-21"`
17181745
1746- `"anthropic-workspace-id": optional string`
1747
17191748### Returns
17201749
17211750- `BetaSelfHostedWorkQueueStats object`
from line 1753
17241753
17251754 Uses Redis Stream consumer group metrics for O(1) queries.
17261755
1756 - `type: "work_queue_stats"`
1757
1758 The type of object
1759
1760 default: work_queue_stats
1761
17271762 - `depth: number`
17281763
17291764 Number of work items waiting to be picked up (lag from consumer group)
from line 1773
17381773
17391774 default: 0
17401775
1741 - `type: "work_queue_stats"`
1742
1743 The type of object
1744
1745 default: work_queue_stats
1746
17471776 - `workers_polling: number or null`
17481777
17491778 Number of workers that have polled for work in the last 30 seconds. Requires worker_id to be sent with poll requests.
from line 1810
17811810 receive new messages. The environment worker polls for work to execute in a
17821811 self-hosted sandbox.
17831812
1813 - `type: "work"`
1814
1815 The type of object (always 'work')
1816
1817 default: work
1818
17841819 - `id: string`
17851820
17861821 Work identifier (e.g., 'work_...')
from line 1832
17971832
17981833 The actual work to be performed
17991834
1800 - `id: string`
1801
1802 Session identifier (e.g., 'session_...')
1803
18041835 - `type: "session"`
18051836
18061837 Type of work data
18071838
1839 - `id: string`
1840
1841 Session identifier (e.g., 'session_...')
1842
18081843 - `environment_id: string`
18091844
18101845 Environment identifier this work belongs to (e.g., `env_...`)
from line 1882
18471882
18481883 RFC 3339 timestamp when work execution stopped
18491884
1850 - `type: "work"`
1851
1852 The type of object (always 'work')
1853
1854 default: work
1855
18561885### Beta Self Hosted Work Heartbeat Response
18571886
18581887- `BetaSelfHostedWorkHeartbeatResponse object`
from line 1888
18591888
18601889 Response after recording a heartbeat for a work item.
18611890
1891 - `type: "work_heartbeat"`
1892
1893 The type of response
1894
1895 default: work_heartbeat
1896
18621897 - `last_heartbeat: string`
18631898
18641899 RFC 3339 timestamp of the actual heartbeat from DB
from line 1920
18851920
18861921 Effective TTL applied to the lease
18871922
1888 - `type: "work_heartbeat"`
1889
1890 The type of response
1891
1892 default: work_heartbeat
1893
18941923### Beta Self Hosted Work List Response
18951924
18961925- `BetaSelfHostedWorkListResponse object`
from line 1930
19011930
19021931 List of work items
19031932
1933 - `type: "work"`
1934
1935 The type of object (always 'work')
1936
1937 default: work
1938
19041939 - `id: string`
19051940
19061941 Work identifier (e.g., 'work_...')
from line 1952
19171952
19181953 The actual work to be performed
19191954
1920 - `id: string`
1921
1922 Session identifier (e.g., 'session_...')
1923
19241955 - `type: "session"`
19251956
19261957 Type of work data
19271958
1959 - `id: string`
1960
1961 Session identifier (e.g., 'session_...')
1962
19281963 - `environment_id: string`
19291964
19301965 Environment identifier this work belongs to (e.g., `env_...`)
from line 2002
19672002
19682003 RFC 3339 timestamp when work execution stopped
19692004
1970 - `type: "work"`
1971
1972 The type of object (always 'work')
1973
1974 default: work
1975
19762005 - `next_page: string or null`
19772006
19782007 Opaque cursor for fetching the next page of results
from line 2014
19852014
19862015 Uses Redis Stream consumer group metrics for O(1) queries.
19872016
2017 - `type: "work_queue_stats"`
2018
2019 The type of object
2020
2021 default: work_queue_stats
2022
19882023 - `depth: number`
19892024
19902025 Number of work items waiting to be picked up (lag from consumer group)
from line 2034
19992034
20002035 default: 0
20012036
2002 - `type: "work_queue_stats"`
2003
2004 The type of object
2005
2006 default: work_queue_stats
2007
20082037 - `workers_polling: number or null`
20092038
20102039 Number of workers that have polled for work in the last 30 seconds. Requires worker_id to be sent with poll requests.
from line 2069
20402069 This resource type is used when work represents a session that needs to be executed
20412070 in a self-hosted environment.
20422071
2043 - `id: string`
2044
2045 Session identifier (e.g., 'session_...')
2046
20472072 - `type: "session"`
20482073
20492074 Type of work data
2075
2076 - `id: string`
2077
2078 Session identifier (e.g., 'session_...')
20502079
api/beta/environments/work/ack Changed · +18 / -11 lines
from line 1
1---
2title: Acknowledge Work
3url: https://platform.claude.com/docs/en/api/beta/environments/work/ack
4---
5
16# Acknowledge Work
27
38**POST** `/v1/environments/{environment_id}/work/{work_id}/ack`
from line 25
2025
2126 - `string`
2227
23 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
28 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
2429
2530 - `"message-batches-2024-09-24"`
2631
from line 73
6873
6974 - `"user-profiles-2026-08-18"`
7075
76 - `"user-profiles-2026-09-04"`
77
7178 - `"advisor-tool-2026-03-01"`
7279
7380 - `"managed-agents-2026-04-01"`
from line 127
120127 receive new messages. The environment worker polls for work to execute in a
121128 self-hosted sandbox.
122129
130 - `type: "work"`
131
132 The type of object (always 'work')
133
134 default: work
135
123136 - `id: string`
124137
125138 Work identifier (e.g., 'work_...')
from line 149
136149
137150 The actual work to be performed
138151
139 - `id: string`
140
141 Session identifier (e.g., 'session_...')
142
143152 - `type: "session"`
144153
145154 Type of work data
146155
156 - `id: string`
157
158 Session identifier (e.g., 'session_...')
159
147160 - `environment_id: string`
148161
149162 Environment identifier this work belongs to (e.g., `env_...`)
from line 198
185198 - `stopped_at: string or null`
186199
187200 RFC 3339 timestamp when work execution stopped
188
189 - `type: "work"`
190
191 The type of object (always 'work')
192
193 default: work
194201
195202## Example
196203
api/beta/environments/work/heartbeat Changed · +14 / -7 lines
from line 1
1---
2title: Record Heartbeat
3url: https://platform.claude.com/docs/en/api/beta/environments/work/heartbeat
4---
5
16# Record Heartbeat
27
38**POST** `/v1/environments/{environment_id}/work/{work_id}/heartbeat`
from line 35
3035
3136 - `string`
3237
33 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
38 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
3439
3540 - `"message-batches-2024-09-24"`
3641
from line 83
7883
7984 - `"user-profiles-2026-08-18"`
8085
86 - `"user-profiles-2026-09-04"`
87
8188 - `"advisor-tool-2026-03-01"`
8289
8390 - `"managed-agents-2026-04-01"`
from line 133
126133
127134 Response after recording a heartbeat for a work item.
128135
136 - `type: "work_heartbeat"`
137
138 The type of response
139
140 default: work_heartbeat
141
129142 - `last_heartbeat: string`
130143
131144 RFC 3339 timestamp of the actual heartbeat from DB
from line 164
151164 - `ttl_seconds: number`
152165
153166 Effective TTL applied to the lease
154
155 - `type: "work_heartbeat"`
156
157 The type of response
158
159 default: work_heartbeat
160167
161168## Example
162169
api/beta/environments/work/list Changed · +18 / -11 lines
from line 1
1---
2title: List Work Items
3url: https://platform.claude.com/docs/en/api/beta/environments/work/list
4---
5
16# List Work Items
27
38**GET** `/v1/environments/{environment_id}/work`
from line 35
3035
3136 - `string`
3237
33 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
38 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
3439
3540 - `"message-batches-2024-09-24"`
3641
from line 83
7883
7984 - `"user-profiles-2026-08-18"`
8085
86 - `"user-profiles-2026-09-04"`
87
8188 - `"advisor-tool-2026-03-01"`
8289
8390 - `"managed-agents-2026-04-01"`
from line 137
130137
131138 List of work items
132139
140 - `type: "work"`
141
142 The type of object (always 'work')
143
144 default: work
145
133146 - `id: string`
134147
135148 Work identifier (e.g., 'work_...')
from line 159
146159
147160 The actual work to be performed
148161
149 - `id: string`
150
151 Session identifier (e.g., 'session_...')
152
153162 - `type: "session"`
154163
155164 Type of work data
156165
166 - `id: string`
167
168 Session identifier (e.g., 'session_...')
169
157170 - `environment_id: string`
158171
159172 Environment identifier this work belongs to (e.g., `env_...`)
from line 208
195208 - `stopped_at: string or null`
196209
197210 RFC 3339 timestamp when work execution stopped
198
199 - `type: "work"`
200
201 The type of object (always 'work')
202
203 default: work
204211
205212 - `next_page: string or null`
206213
api/beta/environments/work/poll Changed · +18 / -11 lines
from line 1
1---
2title: Poll for Work
3url: https://platform.claude.com/docs/en/api/beta/environments/work/poll
4---
5
16# Poll for Work
27
38**GET** `/v1/environments/{environment_id}/work/poll`
from line 37
3237
3338 - `string`
3439
35 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
40 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
3641
3742 - `"message-batches-2024-09-24"`
3843
from line 85
8085
8186 - `"user-profiles-2026-08-18"`
8287
88 - `"user-profiles-2026-09-04"`
89
8390 - `"advisor-tool-2026-03-01"`
8491
8592 - `"managed-agents-2026-04-01"`
from line 143
136143 receive new messages. The environment worker polls for work to execute in a
137144 self-hosted sandbox.
138145
146 - `type: "work"`
147
148 The type of object (always 'work')
149
150 default: work
151
139152 - `id: string`
140153
141154 Work identifier (e.g., 'work_...')
from line 165
152165
153166 The actual work to be performed
154167
155 - `id: string`
156
157 Session identifier (e.g., 'session_...')
158
159168 - `type: "session"`
160169
161170 Type of work data
162171
172 - `id: string`
173
174 Session identifier (e.g., 'session_...')
175
163176 - `environment_id: string`
164177
165178 Environment identifier this work belongs to (e.g., `env_...`)
from line 214
201214 - `stopped_at: string or null`
202215
203216 RFC 3339 timestamp when work execution stopped
204
205 - `type: "work"`
206
207 The type of object (always 'work')
208
209 default: work
210217
211218## Example
212219
api/beta/environments/work/retrieve Changed · +20 / -11 lines
from line 1
1---
2title: Get Work Item
3url: https://platform.claude.com/docs/en/api/beta/environments/work/retrieve
4---
5
16# Get Work Item
27
38**GET** `/v1/environments/{environment_id}/work/{work_id}`
from line 25
2025
2126 - `string`
2227
23 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
28 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
2429
2530 - `"message-batches-2024-09-24"`
2631
from line 73
6873
6974 - `"user-profiles-2026-08-18"`
7075
76 - `"user-profiles-2026-09-04"`
77
7178 - `"advisor-tool-2026-03-01"`
7279
7380 - `"managed-agents-2026-04-01"`
from line 117
110117
111118 - `"mid-conversation-system-clear-at-2026-08-21"`
112119
120- `"anthropic-workspace-id": optional string`
121
113122## Returns
114123
115124- `BetaSelfHostedWork object`
from line 129
120129 receive new messages. The environment worker polls for work to execute in a
121130 self-hosted sandbox.
122131
132 - `type: "work"`
133
134 The type of object (always 'work')
135
136 default: work
137
123138 - `id: string`
124139
125140 Work identifier (e.g., 'work_...')
from line 151
136151
137152 The actual work to be performed
138153
139 - `id: string`
140
141 Session identifier (e.g., 'session_...')
142
143154 - `type: "session"`
144155
145156 Type of work data
146157
158 - `id: string`
159
160 Session identifier (e.g., 'session_...')
161
147162 - `environment_id: string`
148163
149164 Environment identifier this work belongs to (e.g., `env_...`)
from line 200
185200 - `stopped_at: string or null`
186201
187202 RFC 3339 timestamp when work execution stopped
188
189 - `type: "work"`
190
191 The type of object (always 'work')
192
193 default: work
194203
195204## Example
196205
api/beta/environments/work/stats Changed · +16 / -7 lines
from line 1
1---
2title: Get Queue Statistics
3url: https://platform.claude.com/docs/en/api/beta/environments/work/stats
4---
5
16# Get Queue Statistics
27
38**GET** `/v1/environments/{environment_id}/work/stats`
from line 21
1621
1722 - `string`
1823
19 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
24 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
2025
2126 - `"message-batches-2024-09-24"`
2227
from line 69
6469
6570 - `"user-profiles-2026-08-18"`
6671
72 - `"user-profiles-2026-09-04"`
73
6774 - `"advisor-tool-2026-03-01"`
6875
6976 - `"managed-agents-2026-04-01"`
from line 113
106113
107114 - `"mid-conversation-system-clear-at-2026-08-21"`
108115
116- `"anthropic-workspace-id": optional string`
117
109118## Returns
110119
111120- `BetaSelfHostedWorkQueueStats object`
from line 123
114123
115124 Uses Redis Stream consumer group metrics for O(1) queries.
116125
126 - `type: "work_queue_stats"`
127
128 The type of object
129
130 default: work_queue_stats
131
117132 - `depth: number`
118133
119134 Number of work items waiting to be picked up (lag from consumer group)
from line 142
127142 Number of work items being processed (polled but not acknowledged)
128143
129144 default: 0
130
131 - `type: "work_queue_stats"`
132
133 The type of object
134
135 default: work_queue_stats
136145
137146 - `workers_polling: number or null`
138147
api/beta/environments/work/stop Changed · +20 / -11 lines
from line 1
1---
2title: Stop Work
3url: https://platform.claude.com/docs/en/api/beta/environments/work/stop
4---
5
16# Stop Work
27
38**POST** `/v1/environments/{environment_id}/work/{work_id}/stop`
from line 25
2025
2126 - `string`
2227
23 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
28 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
2429
2530 - `"message-batches-2024-09-24"`
2631
from line 73
6873
6974 - `"user-profiles-2026-08-18"`
7075
76 - `"user-profiles-2026-09-04"`
77
7178 - `"advisor-tool-2026-03-01"`
7279
7380 - `"managed-agents-2026-04-01"`
from line 117
110117
111118 - `"mid-conversation-system-clear-at-2026-08-21"`
112119
120- `"anthropic-workspace-id": optional string`
121
113122## Body parameters
114123
115124- `force: optional boolean`
from line 137
128137 receive new messages. The environment worker polls for work to execute in a
129138 self-hosted sandbox.
130139
140 - `type: "work"`
141
142 The type of object (always 'work')
143
144 default: work
145
131146 - `id: string`
132147
133148 Work identifier (e.g., 'work_...')
from line 159
144159
145160 The actual work to be performed
146161
147 - `id: string`
148
149 Session identifier (e.g., 'session_...')
150
151162 - `type: "session"`
152163
153164 Type of work data
154165
166 - `id: string`
167
168 Session identifier (e.g., 'session_...')
169
155170 - `environment_id: string`
156171
157172 Environment identifier this work belongs to (e.g., `env_...`)
from line 208
193208 - `stopped_at: string or null`
194209
195210 RFC 3339 timestamp when work execution stopped
196
197 - `type: "work"`
198
199 The type of object (always 'work')
200
201 default: work
202211
203212## Example
204213