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: Apps
3url: https://platform.claude.com/docs/en/api/compliance/apps
4---
5
61# Apps
72
8# Chats
9
10## List chats
11
12**get** `/v1/compliance/apps/chats`
3## Apps › Chats
4
5### List chats
6
7**GET** `/v1/compliance/apps/chats`
138
149Lists chat metadata with filtering capabilities for targeted
1510compliance review. Results are sorted chronologically (time ascending)
from line 19
2419no time filter) with the default `order_by`. `user_ids[]` with
2520`order_by=updated_at` is already rejected.
2621
27### Query Parameters
22#### Query parameters
2823
2924- `after_id: optional string`
3025
from line 29
3429
3530 Pagination cursor for retrieving the previous page of results. To paginate, pass the `first_id` value from the most recent response. Clients should treat this value as an opaque string and not attempt to parse or interpret its contents, as the format may change without notice.
3631
37- `created_at: optional object { gt, gte, lt, lte }`
32- `created_at: optional object`
3833
3934 - `gt: optional string`
4035
4136 Filter chats created after this time (RFC 3339 format)
4237
38 format: date-time
39
4340 - `gte: optional string`
4441
4542 Filter chats created at or after this time (RFC 3339 format)
4643
44 format: date-time
45
4746 - `lt: optional string`
4847
4948 Filter chats created before this time (RFC 3339 format)
5049
50 format: date-time
51
5152 - `lte: optional string`
5253
5354 Filter chats created at or before this time (RFC 3339 format)
5455
56 format: date-time
57
5558- `limit: optional number`
5659
5760 Maximum results (default: 100, max: 1000)
5861
62 default: 100, maximum: 1000, minimum: 1
63
5964- `order_by: optional "created_at" or "updated_at"`
6065
6166 Sort key for results. `created_at` (default) sorts by chat creation time. `updated_at` sorts by last update time and is only supported for org-wide queries (omit user_ids[]). For org-wide queries, any time filter must match the sort key: `created_at.*` filters require `order_by=created_at`, and `updated_at.*` filters require `order_by=updated_at`.
6267
68 default: created_at
69
6370 - `"created_at"`
6471
6572 - `"updated_at"`
from line 79
7279
7380 Filter by project IDs (accepts `claude_proj_...`). Enumerate IDs via `GET /v1/compliance/apps/projects`. Requires user_ids[]; not supported for org-wide queries.
7481
75- `updated_at: optional object { gt, gte, lt, lte }`
82- `updated_at: optional object`
7683
7784 - `gt: optional string`
7885
7986 Filter chats updated after this time (RFC 3339 format). Combining updated_at filters with `user_ids[]` is deprecated and will be rejected after 2026-09-22; for updated_at-windowed polling, omit `user_ids[]` and use `order_by=updated_at` with `after_id` pagination.
8087
88 format: date-time
89
8190 - `gte: optional string`
8291
8392 Filter chats updated at or after this time (RFC 3339 format). Combining updated_at filters with `user_ids[]` is deprecated and will be rejected after 2026-09-22; for updated_at-windowed polling, omit `user_ids[]` and use `order_by=updated_at` with `after_id` pagination.
8493
94 format: date-time
95
8596 - `lt: optional string`
8697
8798 Filter chats updated before this time (RFC 3339 format). Combining updated_at filters with `user_ids[]` is deprecated and will be rejected after 2026-09-22; for updated_at-windowed polling, omit `user_ids[]` and use `order_by=updated_at` with `after_id` pagination.
8899
100 format: date-time
101
89102 - `lte: optional string`
90103
91104 Filter chats updated at or before this time (RFC 3339 format). Combining updated_at filters with `user_ids[]` is deprecated and will be rejected after 2026-09-22; for updated_at-windowed polling, omit `user_ids[]` and use `order_by=updated_at` with `after_id` pagination.
92105
106 format: date-time
107
93108- `user_ids: optional array of string`
94109
95110 Filter to chats created by specific users (max 10 per request). Omit for an org-wide query. Enumerate IDs via `GET /v1/compliance/organizations/{org_uuid}/users`. Deprecated combination: passing `user_ids[]` together with any `updated_at.*` filter is deprecated and will be rejected after 2026-09-22. For `updated_at`-windowed polling, omit `user_ids[]` and use `order_by=updated_at` with `after_id` pagination.
96111
97### Header Parameters
112 maxItems: 10
113
114#### Headers
98115
99116- `"x-api-key": optional string`
100117
101### Returns
102
103- `data: array of object { id, created_at, deleted_at, 8 more }`
118#### Returns
119
120- `data: array of object`
104121
105122 List of chat metadata sorted chronologically by the request's `order_by` key (default `created_at`), tie break by id
106123
from line 129
112129
113130 Creation timestamp
114131
132 format: date-time
133
115134 - `deleted_at: string or null`
116135
117136 Deletion timestamp if deleted
118137
138 format: date-time
139
119140 - `href: string`
120141
121142 URL to view this chat in claude.ai
from line 149
128149
129150 Chat name/title
130151
152 - `organization_uuid: string`
153
154 Organization UUID this chat belongs to
155
156 - `project_id: string or null`
157
158 Project ID this chat belongs to
159
160 - `updated_at: string`
161
162 Last update timestamp
163
164 format: date-time
165
166 - `user: object or null`
167
168 User information for compliance responses.
169
170 - `id: string`
171
172 User identifier
173
174 - `email_address: string`
175
176 User's email address
177
131178 - `organization_id: string`
132179
180 **Deprecated**
181
133182 Organization ID this chat belongs to
134183
135 - `organization_uuid: string`
136
137 Organization UUID this chat belongs to
138
139 - `project_id: string or null`
140
141 Project ID this chat belongs to
142
143 - `updated_at: string`
144
145 Last update timestamp
146
147 - `user: object { id, email_address } or null`
148
149 User information for compliance responses.
150
151 - `id: string`
152
153 User identifier
154
155 - `email_address: string`
156
157 User's email address
158
159184- `first_id: string or null`
160185
161186 Opaque pagination cursor for the first chat in the current result set. Pass as `before_id` on the next request to page backwards. Backward pagination is only supported for per-user queries (`user_ids[]` set); org-wide queries do not accept `before_id`. Clients should treat this value as an opaque string and not attempt to parse or interpret its contents, as the format may change without notice.
from line 193
168193
169194 Opaque pagination cursor for the last chat in the current result set. Pass as `after_id` on the next request to page forwards. Clients should treat this value as an opaque string and not attempt to parse or interpret its contents, as the format may change without notice.
170195
171### Example
172
173```http
196#### Example
197
198```bash
174199curl https://api.anthropic.com/v1/compliance/apps/chats \
175200 -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY"
176201```
177202
178#### Response
203##### Response (200)
179204
180205```json
181206{
from line 227
202227}
203228```
204229
205## Delete chat
206
207**delete** `/v1/compliance/apps/chats/{claude_chat_id}`
230### Delete chat
231
232**DELETE** `/v1/compliance/apps/chats/{claude_chat_id}`
208233
209234Permanently deletes a chat and all associated messages and
210235files. This is a destructive operation that cannot be undone.
211236
212### Path Parameters
237#### Path parameters
213238
214239- `claude_chat_id: string`
215240
216241 The chat ID (tagged ID, e.g., claude_chat_abc123)
217242
218### Header Parameters
243#### Headers
219244
220245- `"x-api-key": optional string`
221246
222### Returns
247#### Returns
223248
224249- `id: string`
225250
from line 254
229254
230255 Constant string confirming deletion
231256
232 - `"claude_chat_deleted"`
233
234### Example
235
236```http
257 default: claude_chat_deleted
258
259#### Example
260
261```bash
237262curl https://api.anthropic.com/v1/compliance/apps/chats/$CLAUDE_CHAT_ID \
238263 -X DELETE \
239264 -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY"
240265```
241266
242#### Response
267##### Response (200)
243268
244269```json
245270{
from line 273
248273}
249274```
250275
251## Domain Types
252
253### Chat List Response
254
255- `ChatListResponse object { id, created_at, deleted_at, 8 more }`
256
257 Chat metadata for listing chats (without messages).
276## Apps › Chats › Messages
277
278### Get chat messages
279
280**GET** `/v1/compliance/apps/chats/{claude_chat_id}/messages`
281
282Retrieves message history and file metadata for a specific chat.
283
284#### Path parameters
285
286- `claude_chat_id: string`
287
288 The chat ID (tagged ID, e.g., claude_chat_abc123)
289
290#### Query parameters
291
292- `after_id: optional string`
293
294 Pagination cursor for retrieving the next page of results. To paginate, pass the `last_id` value from the most recent response. Clients should treat this value as an opaque string and not attempt to parse or interpret its contents, as the format may change without notice.
295
296- `before_id: optional string`
297
298 Pagination cursor for retrieving the previous page of results. To paginate, pass the `first_id` value from the most recent response. Clients should treat this value as an opaque string and not attempt to parse or interpret its contents, as the format may change without notice.
299
300- `created_at: optional object`
301
302 - `gt: optional string`
303
304 Filter messages created after this time (RFC 3339 format)
305
306 format: date-time
307
308 - `gte: optional string`
309
310 Filter messages created at or after this time (RFC 3339 format)
311
312 format: date-time
313
314 - `lt: optional string`
315
316 Filter messages created before this time (RFC 3339 format)
317
318 format: date-time
319
320 - `lte: optional string`
321
322 Filter messages created at or before this time (RFC 3339 format)
323
324 format: date-time
325
326- `limit: optional number`
327
328 Maximum results (max: 1000). When omitted, the full result set is returned in one response.
329
330 maximum: 1000, minimum: 1
331
332- `order: optional "asc" or "desc"`
333
334 Sort direction for messages within the response. `asc` (the default) returns oldest-first; `desc` returns newest-first.
335
336 default: asc
337
338 - `"asc"`
339
340 - `"desc"`
341
342- `tool_result_max_chars: optional number`
343
344 Maximum characters returned per tool-result text item. Items longer than this are shortened and the block's `truncated` field is set. Pass -1 to disable the limit.
345
346 default: 10000, minimum: -1
347
348- `tool_use_input_max_chars: optional number`
349
350 Maximum characters of JSON-encoded tool input returned per tool_use block. Inputs longer than this are shortened and the block's `truncated` field is set. Pass -1 to disable the limit.
351
352 default: 10000, minimum: -1
353
354- `updated_at: optional object`
355
356 - `gt: optional string`
357
358 Filter messages updated after this time (RFC 3339 format)
359
360 format: date-time
361
362 - `gte: optional string`
363
364 Filter messages updated at or after this time (RFC 3339 format)
365
366 format: date-time
367
368 - `lt: optional string`
369
370 Filter messages updated before this time (RFC 3339 format)
371
372 format: date-time
373
374 - `lte: optional string`
375
376 Filter messages updated at or before this time (RFC 3339 format)
377
378 format: date-time
379
380#### Headers
381
382- `"x-api-key": optional string`
383
384#### Returns
385
386- `id: string`
387
388 Chat ID
389
390- `chat_messages: array of object`
391
392 Array of chat messages in order of created_at
258393
259394 - `id: string`
260395
261 Chat ID
396 Unique identifier for the message e.g. 'claude_chat_msg_abcd1234'
397
398 - `artifacts: array of object or null`
399
400 Versioned documents generated or updated by the assistant in this message. Download via `GET /v1/compliance/apps/artifacts/{artifact_version_id}/content`.
401
402 - `id: string`
403
404 Artifact ID e.g. 'claude_artifact_abc123'
405
406 - `artifact_type: string or null`
407
408 MIME-like artifact type e.g. 'application/vnd.ant.code'
409
410 - `title: string or null`
411
412 Artifact title
413
414 - `version_id: string`
415
416 Artifact version ID e.g. 'claude_artifact_version_abc123'
417
418 - `content: array of object or object or object`
419
420 Content blocks within the message
421
422 - `Text object`
423
424 Text content block.
425
426 - `text: string`
427
428 Text content from human or assistant
429
430 - `thinking_redacted: boolean`
431
432 True when content enclosed in the assistant's internal-reasoning tags (or the tag markup itself) was removed from `text` during export. Removal never occurs with this field false. Always false on human messages, whose text is exported verbatim.
433
434 default: false
435
436 - `truncated: boolean`
437
438 True when `text` was shortened by the server's fixed per-string bound (1 MiB). Always false on chat text blocks.
439
440 default: false
441
442 - `type: "text"`
443
444 default: text
445
446 - `ToolUse object`
447
448 Tool invocation requested by the assistant.
449
450 - `id: string or null`
451
452 Tool-use ID, e.g. 'toolu_01AbC...'
453
454 - `input: string`
455
456 Arguments passed to the tool, as a JSON-encoded string. May be shortened — see the `truncated` field
457
458 - `integration_name: string or null`
459
460 Name of the integration that provides this tool, when applicable
461
462 - `mcp_server_url: string or null`
463
464 Base URL (scheme, host, and path only) of the MCP server that provides this tool, when applicable
465
466 - `name: string`
467
468 Name of the tool invoked
469
470 - `truncated: boolean`
471
472 True when `input` was shortened. Pass the endpoint's tool-use input max parameter as -1 to request full content, subject to any server-side maximum the endpoint enforces.
473
474 default: false
475
476 - `type: "tool_use"`
477
478 default: tool_use
479
480 - `ToolResult object`
481
482 Result returned by a tool invocation.
483
484 - `content: array of object`
485
486 Text content returned by the tool. Generated files are surfaced via the message's `generated_files` list; other non-text item types (including images and links) are omitted.
487
488 - `text: string`
489
490 Text returned by the tool
491
492 - `type: "text"`
493
494 default: text
495
496 - `integration_name: string or null`
497
498 Name of the integration that provides this tool, when applicable
499
500 - `is_error: boolean`
501
502 True when the tool reported an error
503
504 - `mcp_server_url: string or null`
505
506 Base URL (scheme, host, and path only) of the MCP server that provides this tool, when applicable
507
508 - `name: string`
509
510 Name of the tool that produced this result
511
512 - `tool_use_id: string or null`
513
514 ID of the tool_use block this result responds to
515
516 - `truncated: boolean`
517
518 True when one or more text items in `content` were shortened. Pass the endpoint's tool-result max parameter as -1 to request full content, subject to any server-side maximum the endpoint enforces.
519
520 default: false
521
522 - `type: "tool_result"`
523
524 default: tool_result
262525
263526 - `created_at: string`
264527
265 Creation timestamp
266
267 - `deleted_at: string or null`
268
269 Deletion timestamp if deleted
270
271 - `href: string`
272
273 URL to view this chat in claude.ai
274
275 - `model: string or null`
276
277 Model selected for this chat (e.g. 'claude-opus-5'). May be null for legacy chats that never had a model recorded.
278
279 - `name: string`
280
281 Chat name/title
282
283 - `organization_id: string`
284
285 Organization ID this chat belongs to
286
287 - `organization_uuid: string`
288
289 Organization UUID this chat belongs to
290
291 - `project_id: string or null`
292
293 Project ID this chat belongs to
294
295 - `updated_at: string`
296
297 Last update timestamp
298
299 - `user: object { id, email_address } or null`
300
301 User information for compliance responses.
528 Message creation timestamp - For human: when they sent the message, For assistant: when it completed the last content block
529
530 format: date-time
531
532 - `files: array of object or null`
533
534 Binary file attachments uploaded by the user. Download via `GET /v1/compliance/apps/chats/files/{claude_file_id}/content`.
302535
303536 - `id: string`
304537
305 User identifier
306
307 - `email_address: string`
308
309 User's email address
310
311### Chat Delete Response
312
313- `ChatDeleteResponse object { id, type }`
314
315 Response for deleting a Claude chat.
538 File ID
539
540 - `created_at: string`
541
542 File creation timestamp
543
544 format: date-time
545
546 - `filename: string`
547
548 Display name of the file
549
550 - `md5: string or null`
551
552 Lowercase hex MD5 of the file's preferred downloadable variant, as recorded at upload time. Null when no stored hash is available.
553
554 - `mime_type: string or null`
555
556 MIME type of the file's preferred downloadable variant (e.g. 'application/pdf')
557
558 - `size_bytes: number or null`
559
560 Size in bytes of the file's preferred downloadable variant, if known. Null for older files uploaded before size was recorded.
561
562 - `generated_files: array of object or null`
563
564 Downloadable files the assistant created via tool use (e.g. PDF, spreadsheet, slide deck). Distinct from `files`, which are uploads attached to the message. Download via `GET /v1/compliance/apps/chats/generated-files/{claude_gen_file_id}/content`.
565
566 - `id: string`
567
568 Opaque generated-file id, e.g. 'claude_gen_file_abc123'. Treat as an opaque string; the encoding may change without notice.
569
570 - `filename: string`
571
572 Display name of the generated file
573
574 - `md5: string or null`
575
576 Lowercase hex MD5 of the generated file, when available. Null when no stored hash is available.
577
578 - `mime_type: string or null`
579
580 MIME type reported by the tool that produced the file
581
582 - `size_bytes: number or null`
583
584 Size in bytes of the generated file, when available. Null when the file has expired or size is not recorded.
585
586 - `role: "assistant" or "user"`
587
588 Message sender (user or assistant)
589
590 - `"assistant"`
591
592 - `"user"`
593
594- `created_at: string`
595
596 Creation timestamp
597
598 format: date-time
599
600- `deleted_at: string or null`
601
602 Deletion timestamp if deleted
603
604 format: date-time
605
606- `first_id: string or null`
607
608 Opaque pagination cursor for the first message in the current result set. Pass as `before_id` on the next request to page backwards. Clients should treat this value as an opaque string and not attempt to parse or interpret its contents, as the format may change without notice.
609
610- `has_more: boolean`
611
612 Whether more chat messages exist beyond the current result set. Use `last_id` as `after_id` in a follow-up request to page forward.
613
614 default: false
615
616- `href: string`
617
618 URL to view this chat in claude.ai
619
620- `last_id: string or null`
621
622 Opaque pagination cursor for the last message in the current result set. Pass as `after_id` on the next request to page forwards. Clients should treat this value as an opaque string and not attempt to parse or interpret its contents, as the format may change without notice.
623
624- `model: string or null`
625
626 Model selected for this chat (e.g. 'claude-opus-5'). May be null for legacy chats that never had a model recorded.
627
628- `name: string`
629
630 Chat name
631
632- `organization_uuid: string`
633
634 Organization UUID this chat belongs to
635
636- `project_id: string or null`
637
638 Project ID this chat belongs to
639
640- `updated_at: string`
641
642 Last update timestamp
643
644 format: date-time
645
646- `user: object or null`
647
648 User information for compliance responses.
316649
317650 - `id: string`
318651
319 The ID of the Claude chat that was deleted
320
321 - `type: optional "claude_chat_deleted"`
322
323 Constant string confirming deletion
324
325 - `"claude_chat_deleted"`
326
327# Messages
328
329## Get chat messages
330
331**get** `/v1/compliance/apps/chats/{claude_chat_id}/messages`
332
333Retrieves message history and file metadata for a specific chat.
334
335### Path Parameters
336
337- `claude_chat_id: string`
338
339 The chat ID (tagged ID, e.g., claude_chat_abc123)
340
341### Query Parameters
342
343- `after_id: optional string`
344
345 Pagination cursor for retrieving the next page of results. To paginate, pass the `last_id` value from the most recent response. Clients should treat this value as an opaque string and not attempt to parse or interpret its contents, as the format may change without notice.
346
347- `before_id: optional string`
348
349 Pagination cursor for retrieving the previous page of results. To paginate, pass the `first_id` value from the most recent response. Clients should treat this value as an opaque string and not attempt to parse or interpret its contents, as the format may change without notice.
350
351- `created_at: optional object { gt, gte, lt, lte }`
352
353 - `gt: optional string`
354
355 Filter messages created after this time (RFC 3339 format)
356
357 - `gte: optional string`
358
359 Filter messages created at or after this time (RFC 3339 format)
360
361 - `lt: optional string`
362
363 Filter messages created before this time (RFC 3339 format)
364
365 - `lte: optional string`
366
367 Filter messages created at or before this time (RFC 3339 format)
368
369- `limit: optional number`
370
371 Maximum results (max: 1000). When omitted, the full result set is returned in one response.
372
373- `order: optional "asc" or "desc"`
374
375 Sort direction for messages within the response. `asc` (the default) returns oldest-first; `desc` returns newest-first.
376
377 - `"asc"`
378
379 - `"desc"`
380
381- `tool_result_max_chars: optional number`
382
383 Maximum characters returned per tool-result text item. Items longer than this are shortened and the block's `truncated` field is set. Pass -1 to disable the limit.
384
385- `tool_use_input_max_chars: optional number`
386
387 Maximum characters of JSON-encoded tool input returned per tool_use block. Inputs longer than this are shortened and the block's `truncated` field is set. Pass -1 to disable the limit.
388
389- `updated_at: optional object { gt, gte, lt, lte }`
390
391 - `gt: optional string`
392
393 Filter messages updated after this time (RFC 3339 format)
394
395 - `gte: optional string`
396
397 Filter messages updated at or after this time (RFC 3339 format)
398
399 - `lt: optional string`
400
401 Filter messages updated before this time (RFC 3339 format)
402
403 - `lte: optional string`
404
405 Filter messages updated at or before this time (RFC 3339 format)
406
407### Header Parameters
408
409- `"x-api-key": optional string`
410
411### Returns
412
413- `id: string`
414
415 Chat ID
416
417- `chat_messages: array of object { id, artifacts, content, 4 more }`
418
419 Array of chat messages in order of created_at
420
421 - `id: string`
422
423 Unique identifier for the message e.g. 'claude_chat_msg_abcd1234'
424
425 - `artifacts: array of object { id, artifact_type, title, version_id } or null`
426
427 Versioned documents generated or updated by the assistant in this message. Download via `GET /v1/compliance/apps/artifacts/{artifact_version_id}/content`.
428
429 - `id: string`
430
431 Artifact ID e.g. 'claude_artifact_abc123'
432
433 - `artifact_type: string or null`
434
435 MIME-like artifact type e.g. 'application/vnd.ant.code'
436
437 - `title: string or null`
438
439 Artifact title
440
441 - `version_id: string`
442
443 Artifact version ID e.g. 'claude_artifact_version_abc123'
444
445 - `content: array of object { text, thinking_redacted, truncated, type } or object { id, input, integration_name, 4 more } or object { content, integration_name, is_error, 5 more }`
446
447 Content blocks within the message
448
449 - `Text object { text, thinking_redacted, truncated, type }`
450
451 Text content block.
452
453 - `text: string`
454
455 Text content from human or assistant
456
457 - `thinking_redacted: boolean`
458
459 True when content enclosed in the assistant's internal-reasoning tags (or the tag markup itself) was removed from `text` during export. Removal never occurs with this field false. Always false on human messages, whose text is exported verbatim.
460
461 - `truncated: boolean`
462
463 True when `text` was shortened by the server's fixed per-string bound (1 MiB). Always false on chat text blocks.
464
465 - `type: "text"`
466
467 - `"text"`
468
469 - `ToolUse object { id, input, integration_name, 4 more }`
470
471 Tool invocation requested by the assistant.
472
473 - `id: string or null`
474
475 Tool-use ID, e.g. 'toolu_01AbC...'
476
477 - `input: string`
478
479 Arguments passed to the tool, as a JSON-encoded string. May be shortened — see the `truncated` field
480
481 - `integration_name: string or null`
482
483 Name of the integration that provides this tool, when applicable
484
485 - `mcp_server_url: string or null`
486
487 Base URL (scheme, host, and path only) of the MCP server that provides this tool, when applicable
488
489 - `name: string`
490
491 Name of the tool invoked
492
493 - `truncated: boolean`
494
495 True when `input` was shortened. Pass the endpoint's tool-use input max parameter as -1 to request full content, subject to any server-side maximum the endpoint enforces.
496
497 - `type: "tool_use"`
498
499 - `"tool_use"`
500
501 - `ToolResult object { content, integration_name, is_error, 5 more }`
502
503 Result returned by a tool invocation.
504
505 - `content: array of object { text, type }`
506
507 Text content returned by the tool. Generated files are surfaced via the message's `generated_files` list; other non-text item types (including images and links) are omitted.
508
509 - `text: string`
510
511 Text returned by the tool
512
513 - `type: "text"`
514
515 - `"text"`
516
517 - `integration_name: string or null`
518
519 Name of the integration that provides this tool, when applicable
520
521 - `is_error: boolean`
522
523 True when the tool reported an error
524
525 - `mcp_server_url: string or null`
526
527 Base URL (scheme, host, and path only) of the MCP server that provides this tool, when applicable
528
529 - `name: string`
530
531 Name of the tool that produced this result
532
533 - `tool_use_id: string or null`
534
535 ID of the tool_use block this result responds to
536
537 - `truncated: boolean`
538
539 True when one or more text items in `content` were shortened. Pass the endpoint's tool-result max parameter as -1 to request full content, subject to any server-side maximum the endpoint enforces.
540
541 - `type: "tool_result"`
542
543 - `"tool_result"`
544
545 - `created_at: string`
546
547 Message creation timestamp - For human: when they sent the message, For assistant: when it completed the last content block
548
549 - `files: array of object { id, created_at, filename, 3 more } or null`
550
551 Binary file attachments uploaded by the user. Download via `GET /v1/compliance/apps/chats/files/{claude_file_id}/content`.
552
553 - `id: string`
554
555 File ID
556
557 - `created_at: string`
558
559 File creation timestamp
560
561 - `filename: string`
562
563 Display name of the file
564
565 - `md5: string or null`
566
567 Lowercase hex MD5 of the file's preferred downloadable variant, as recorded at upload time. Null when no stored hash is available.
568
569 - `mime_type: string or null`
570
571 MIME type of the file's preferred downloadable variant (e.g. 'application/pdf')
572
573 - `size_bytes: number or null`
574
575 Size in bytes of the file's preferred downloadable variant, if known. Null for older files uploaded before size was recorded.
576
577 - `generated_files: array of object { id, filename, md5, 2 more } or null`
578
579 Downloadable files the assistant created via tool use (e.g. PDF, spreadsheet, slide deck). Distinct from `files`, which are uploads attached to the message. Download via `GET /v1/compliance/apps/chats/generated-files/{claude_gen_file_id}/content`.
580
581 - `id: string`
582
583 Opaque generated-file id, e.g. 'claude_gen_file_abc123'. Treat as an opaque string; the encoding may change without notice.
584
585 - `filename: string`
586
587 Display name of the generated file
588
589 - `md5: string or null`
590
591 Lowercase hex MD5 of the generated file, when available. Null when no stored hash is available.
592
593 - `mime_type: string or null`
594
595 MIME type reported by the tool that produced the file
596
597 - `size_bytes: number or null`
598
599 Size in bytes of the generated file, when available. Null when the file has expired or size is not recorded.
600
601 - `role: "assistant" or "user"`
602
603 Message sender (user or assistant)
604
605 - `"assistant"`
606
607 - `"user"`
608
609- `created_at: string`
610
611 Creation timestamp
612
613- `deleted_at: string or null`
614
615 Deletion timestamp if deleted
616
617- `first_id: string or null`
618
619 Opaque pagination cursor for the first message in the current result set. Pass as `before_id` on the next request to page backwards. Clients should treat this value as an opaque string and not attempt to parse or interpret its contents, as the format may change without notice.
620
621- `has_more: boolean`
622
623 Whether more chat messages exist beyond the current result set. Use `last_id` as `after_id` in a follow-up request to page forward.
624
625- `href: string`
626
627 URL to view this chat in claude.ai
628
629- `last_id: string or null`
630
631 Opaque pagination cursor for the last message in the current result set. Pass as `after_id` on the next request to page forwards. Clients should treat this value as an opaque string and not attempt to parse or interpret its contents, as the format may change without notice.
632
633- `model: string or null`
634
635 Model selected for this chat (e.g. 'claude-opus-5'). May be null for legacy chats that never had a model recorded.
636
637- `name: string`
638
639 Chat name
652 User identifier
653
654 - `email_address: string`
655
656 User's email address
640657
641658- `organization_id: string`
642659
660 **Deprecated**
661
643662 Organization ID this chat belongs to
644663
645- `organization_uuid: string`
646
647 Organization UUID this chat belongs to
648
649- `project_id: string or null`
650
651 Project ID this chat belongs to
652
653- `updated_at: string`
654
655 Last update timestamp
656
657- `user: object { id, email_address } or null`
658
659 User information for compliance responses.
660
661 - `id: string`
662
663 User identifier
664
665 - `email_address: string`
666
667 User's email address
668
669### Example
670
671```http
664#### Example
665
666```bash
672667curl https://api.anthropic.com/v1/compliance/apps/chats/$CLAUDE_CHAT_ID/messages \
673668 -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY"
674669```
675670
676#### Response
671##### Response (200)
677672
678673```json
679674{
from line 733
738733}
739734```
740735
741## Domain Types
742
743### Message List Response
744
745- `MessageListResponse object { id, artifacts, content, 4 more }`
746
747 A single message in a chat conversation.
748
749 - `id: string`
750
751 Unique identifier for the message e.g. 'claude_chat_msg_abcd1234'
752
753 - `artifacts: array of object { id, artifact_type, title, version_id } or null`
754
755 Versioned documents generated or updated by the assistant in this message. Download via `GET /v1/compliance/apps/artifacts/{artifact_version_id}/content`.
756
757 - `id: string`
758
759 Artifact ID e.g. 'claude_artifact_abc123'
760
761 - `artifact_type: string or null`
762
763 MIME-like artifact type e.g. 'application/vnd.ant.code'
764
765 - `title: string or null`
766
767 Artifact title
768
769 - `version_id: string`
770
771 Artifact version ID e.g. 'claude_artifact_version_abc123'
772
773 - `content: array of object { text, thinking_redacted, truncated, type } or object { id, input, integration_name, 4 more } or object { content, integration_name, is_error, 5 more }`
774
775 Content blocks within the message
776
777 - `Text object { text, thinking_redacted, truncated, type }`
778
779 Text content block.
780
781 - `text: string`
782
783 Text content from human or assistant
784
785 - `thinking_redacted: boolean`
786
787 True when content enclosed in the assistant's internal-reasoning tags (or the tag markup itself) was removed from `text` during export. Removal never occurs with this field false. Always false on human messages, whose text is exported verbatim.
788
789 - `truncated: boolean`
790
791 True when `text` was shortened by the server's fixed per-string bound (1 MiB). Always false on chat text blocks.
792
793 - `type: "text"`
794
795 - `"text"`
796
797 - `ToolUse object { id, input, integration_name, 4 more }`
798
799 Tool invocation requested by the assistant.
800
801 - `id: string or null`
802
803 Tool-use ID, e.g. 'toolu_01AbC...'
804
805 - `input: string`
806
807 Arguments passed to the tool, as a JSON-encoded string. May be shortened — see the `truncated` field
808
809 - `integration_name: string or null`
810
811 Name of the integration that provides this tool, when applicable
812
813 - `mcp_server_url: string or null`
814
815 Base URL (scheme, host, and path only) of the MCP server that provides this tool, when applicable
816
817 - `name: string`
818
819 Name of the tool invoked
820
821 - `truncated: boolean`
822
823 True when `input` was shortened. Pass the endpoint's tool-use input max parameter as -1 to request full content, subject to any server-side maximum the endpoint enforces.
824
825 - `type: "tool_use"`
826
827 - `"tool_use"`
828
829 - `ToolResult object { content, integration_name, is_error, 5 more }`
830
831 Result returned by a tool invocation.
832
833 - `content: array of object { text, type }`
834
835 Text content returned by the tool. Generated files are surfaced via the message's `generated_files` list; other non-text item types (including images and links) are omitted.
836
837 - `text: string`
838
839 Text returned by the tool
840
841 - `type: "text"`
842
843 - `"text"`
844
845 - `integration_name: string or null`
846
847 Name of the integration that provides this tool, when applicable
848
849 - `is_error: boolean`
850
851 True when the tool reported an error
852
853 - `mcp_server_url: string or null`
854
855 Base URL (scheme, host, and path only) of the MCP server that provides this tool, when applicable
856
857 - `name: string`
858
859 Name of the tool that produced this result
860
861 - `tool_use_id: string or null`
862
863 ID of the tool_use block this result responds to
864
865 - `truncated: boolean`
866
867 True when one or more text items in `content` were shortened. Pass the endpoint's tool-result max parameter as -1 to request full content, subject to any server-side maximum the endpoint enforces.
868
869 - `type: "tool_result"`
870
871 - `"tool_result"`
872
873 - `created_at: string`
874
875 Message creation timestamp - For human: when they sent the message, For assistant: when it completed the last content block
876
877 - `files: array of object { id, created_at, filename, 3 more } or null`
878
879 Binary file attachments uploaded by the user. Download via `GET /v1/compliance/apps/chats/files/{claude_file_id}/content`.
880
881 - `id: string`
882
883 File ID
884
885 - `created_at: string`
886
887 File creation timestamp
888
889 - `filename: string`
890
891 Display name of the file
892
893 - `md5: string or null`
894
895 Lowercase hex MD5 of the file's preferred downloadable variant, as recorded at upload time. Null when no stored hash is available.
896
897 - `mime_type: string or null`
898
899 MIME type of the file's preferred downloadable variant (e.g. 'application/pdf')
900
901 - `size_bytes: number or null`
902
903 Size in bytes of the file's preferred downloadable variant, if known. Null for older files uploaded before size was recorded.
904
905 - `generated_files: array of object { id, filename, md5, 2 more } or null`
906
907 Downloadable files the assistant created via tool use (e.g. PDF, spreadsheet, slide deck). Distinct from `files`, which are uploads attached to the message. Download via `GET /v1/compliance/apps/chats/generated-files/{claude_gen_file_id}/content`.
908
909 - `id: string`
910
911 Opaque generated-file id, e.g. 'claude_gen_file_abc123'. Treat as an opaque string; the encoding may change without notice.
912
913 - `filename: string`
914
915 Display name of the generated file
916
917 - `md5: string or null`
918
919 Lowercase hex MD5 of the generated file, when available. Null when no stored hash is available.
920
921 - `mime_type: string or null`
922
923 MIME type reported by the tool that produced the file
924
925 - `size_bytes: number or null`
926
927 Size in bytes of the generated file, when available. Null when the file has expired or size is not recorded.
928
929 - `role: "assistant" or "user"`
930
931 Message sender (user or assistant)
932
933 - `"assistant"`
934
935 - `"user"`
936
937# Files
938
939## Get file metadata
940
941**get** `/v1/compliance/apps/chats/files/{claude_file_id}`
736## Apps › Chats › Files
737
738### Get file metadata
739
740**GET** `/v1/compliance/apps/chats/files/{claude_file_id}`
942741
943742Retrieves metadata for a file referenced in chat messages, without
944743downloading the file content. Use the sibling `/content` endpoint to
945744download the bytes.
946745
947### Path Parameters
746#### Path parameters
948747
949748- `claude_file_id: string`
950749
951750 The file ID (tagged ID, e.g., claude_file_abc123)
952751
953### Header Parameters
752#### Headers
954753
955754- `"x-api-key": optional string`
956755
957### Returns
756#### Returns
958757
959758- `id: string`
960759
from line 767
968767
969768 File creation timestamp
970769
770 format: date-time
771
971772- `filename: string or null`
972773
973774 Display name of the file, if set
from line 789
988789
989790 Size in bytes of the file's preferred downloadable variant, if known
990791
991### Example
992
993```http
792#### Example
793
794```bash
994795curl https://api.anthropic.com/v1/compliance/apps/chats/files/$CLAUDE_FILE_ID \
995796 -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY"
996797```
997798
998#### Response
799##### Response (200)
999800
1000801```json
1001802{
from line 815
1014815}
1015816```
1016817
1017## Delete file
1018
1019**delete** `/v1/compliance/apps/chats/files/{claude_file_id}`
818### Delete file
819
820**DELETE** `/v1/compliance/apps/chats/files/{claude_file_id}`
1020821
1021822Permanently deletes a specific file. This is a destructive
1022823operation that cannot be undone.
1023824
1024### Path Parameters
825#### Path parameters
1025826
1026827- `claude_file_id: string`
1027828
1028829 The file ID (tagged ID, e.g., claude_file_abc123)
1029830
1030### Header Parameters
831#### Headers
1031832
1032833- `"x-api-key": optional string`
1033834
1034### Returns
835#### Returns
1035836
1036837- `id: string`
1037838
from line 842
1041842
1042843 Constant string confirming deletion
1043844
1044 - `"claude_file_deleted"`
1045
1046### Example
1047
1048```http
845 default: claude_file_deleted
846
847#### Example
848
849```bash
1049850curl https://api.anthropic.com/v1/compliance/apps/chats/files/$CLAUDE_FILE_ID \
1050851 -X DELETE \
1051852 -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY"
1052853```
1053854
1054#### Response
855##### Response (200)
1055856
1056857```json
1057858{
from line 861
1060861}
1061862```
1062863
1063## Download file content
1064
1065**get** `/v1/compliance/apps/chats/files/{claude_file_id}/content`
864### Download file content
865
866**GET** `/v1/compliance/apps/chats/files/{claude_file_id}/content`
1066867
1067868Downloads the binary content of a file referenced in chat messages.
1068869
1069### Path Parameters
870#### Path parameters
1070871
1071872- `claude_file_id: string`
1072873
1073874 The file ID (tagged ID, e.g., claude_file_abc123)
1074875
1075### Header Parameters
876#### Headers
1076877
1077878- `"x-api-key": optional string`
1078879
1079### Example
1080
1081```http
880#### Example
881
882```bash
1082883curl https://api.anthropic.com/v1/compliance/apps/chats/files/$CLAUDE_FILE_ID/content \
1083884 -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY"
1084885```
1085886
1086## Domain Types
1087
1088### File Retrieve Response
1089
1090- `FileRetrieveResponse object { id, claude_chat_ids, created_at, 5 more }`
1091
1092 File metadata for GET /v1/compliance/apps/chats/files/{claude_file_id}.
1093
1094 Returns metadata only. Use the sibling `/content` endpoint to download
1095 the file bytes.
1096
1097 - `id: string`
1098
1099 File ID
1100
1101 - `claude_chat_ids: array of string`
1102
1103 Chats this file is attached to. A file can be referenced by messages across multiple chats.
1104
1105 - `created_at: string`
1106
1107 File creation timestamp
1108
1109 - `filename: string or null`
1110
1111 Display name of the file, if set
1112
1113 - `md5: string or null`
1114
1115 Lowercase hex MD5 of the file's preferred downloadable variant, as recorded at upload time. Null when no stored hash is available. The sibling `/content` endpoint also sets a `Content-MD5` header (base64 per RFC 1864) computed over the exact served bytes; when the two disagree, the header is authoritative.
1116
1117 - `message_ids: array of string`
1118
1119 Chat message IDs this file is attached to. A file can be referenced by multiple messages.
1120
1121 - `mime_type: string or null`
1122
1123 MIME type of the file's preferred downloadable variant (e.g. 'application/pdf'). May be null for files with no downloadable content (e.g. code-interpreter outputs).
1124
1125 - `size_bytes: number or null`
1126
1127 Size in bytes of the file's preferred downloadable variant, if known
1128
1129### File Delete Response
1130
1131- `FileDeleteResponse object { id, type }`
1132
1133 Response for deleting a compliance file.
1134
1135 - `id: string`
1136
1137 The ID of the file that was deleted
1138
1139 - `type: optional "claude_file_deleted"`
1140
1141 Constant string confirming deletion
1142
1143 - `"claude_file_deleted"`
1144
1145# Generated Files
1146
1147## Get Claude-generated file metadata
1148
1149**get** `/v1/compliance/apps/chats/generated-files/{claude_gen_file_id}`
887## Apps › Chats › Generated Files
888
889### Get Claude-generated file metadata
890
891**GET** `/v1/compliance/apps/chats/generated-files/{claude_gen_file_id}`
1150892
1151893Returns metadata for a file the assistant created via tool use.
1152894
1153895Use the sibling `/content` endpoint to download the bytes.
1154896
1155### Path Parameters
897#### Path parameters
1156898
1157899- `claude_gen_file_id: string`
1158900
1159901 The generated-file id (e.g., 'claude_gen_file_abc123') as returned in `chat_messages[].generated_files[].id` from GET /apps/chats/{claude_chat_id}/messages.
1160902
1161### Header Parameters
903#### Headers
1162904
1163905- `"x-api-key": optional string`
1164906
1165### Returns
907#### Returns
1166908
1167909- `id: string`
1168910
from line 918
1176918
1177919 File creation timestamp, when available
1178920
921 format: date-time
922
1179923- `filename: string`
1180924
1181925 Display name of the generated file
from line 936
1192936
1193937 Size in bytes of the stored file, when available
1194938
1195### Example
1196
1197```http
939#### Example
940
941```bash
1198942curl https://api.anthropic.com/v1/compliance/apps/chats/generated-files/$CLAUDE_GEN_FILE_ID \
1199943 -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY"
1200944```
1201945
1202#### Response
946##### Response (200)
1203947
1204948```json
1205949{
from line 957
1213957}
1214958```
1215959
1216## Download a Claude-generated file
1217
1218**get** `/v1/compliance/apps/chats/generated-files/{claude_gen_file_id}/content`
960### Download a Claude-generated file
961
962**GET** `/v1/compliance/apps/chats/generated-files/{claude_gen_file_id}/content`
1219963
1220964Downloads the binary content of a file the assistant created via tool use.
1221965
1222### Path Parameters
966#### Path parameters
1223967
1224968- `claude_gen_file_id: string`
1225969
1226970 The generated-file id (e.g., 'claude_gen_file_abc123') as returned in `chat_messages[].generated_files[].id` from GET /apps/chats/{claude_chat_id}/messages.
1227971
1228### Header Parameters
972#### Headers
1229973
1230974- `"x-api-key": optional string`
1231975
1232### Example
1233
1234```http
976#### Example
977
978```bash
1235979curl https://api.anthropic.com/v1/compliance/apps/chats/generated-files/$CLAUDE_GEN_FILE_ID/content \
1236980 -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY"
1237981```
1238982
1239## Domain Types
1240
1241### Generated File Retrieve Response
1242
1243- `GeneratedFileRetrieveResponse object { id, claude_chat_id, created_at, 4 more }`
1244
1245 Metadata for GET /v1/compliance/apps/chats/generated-files/{claude_gen_file_id}.
1246
1247 Returns metadata only. Use the sibling `/content` endpoint to download
1248 the bytes. The owning chat is included since the id is opaque; to find the
1249 specific message that produced the file, fetch
1250 `/v1/compliance/apps/chats/{claude_chat_id}/messages` and match on
1251 `generated_files[].id`.
1252
1253 - `id: string`
1254
1255 Opaque generated-file id, e.g. 'claude_gen_file_abc123'.
1256
1257 - `claude_chat_id: string`
1258
1259 The chat this generated file belongs to
1260
1261 - `created_at: string or null`
1262
1263 File creation timestamp, when available
1264
1265 - `filename: string`
1266
1267 Display name of the generated file
1268
1269 - `md5: string or null`
1270
1271 Lowercase hex MD5 of the stored file. Null when no stored hash is available. The sibling `/content` endpoint also sets a `Content-MD5` header (base64 per RFC 1864) computed over the exact served bytes.
1272
1273 - `mime_type: string or null`
1274
1275 MIME type of the stored file, when available
1276
1277 - `size_bytes: number or null`
1278
1279 Size in bytes of the stored file, when available
1280
1281# Projects
1282
1283## List projects
1284
1285**get** `/v1/compliance/apps/projects`
983## Apps › Projects
984
985### List projects
986
987**GET** `/v1/compliance/apps/projects`
1286988
1287989Lists project metadata with filtering capabilities. Results
1288990are sorted chronologically (time ascending) by created_at.
1289991
1290### Query Parameters
1291
1292- `created_at: optional object { gt, gte, lt, lte }`
992#### Query parameters
993
994- `created_at: optional object`
1293995
1294996 - `gt: optional string`
1295997
1296998 Filter projects created after this time (RFC 3339 format)
1297999
1000 format: date-time
1001
12981002 - `gte: optional string`
12991003
13001004 Filter projects created at or after this time (RFC 3339 format)
13011005
1006 format: date-time
1007
13021008 - `lt: optional string`
13031009
13041010 Filter projects created before this time (RFC 3339 format)
13051011
1012 format: date-time
1013
13061014 - `lte: optional string`
13071015
13081016 Filter projects created at or before this time (RFC 3339 format)
13091017
1018 format: date-time
1019
13101020- `limit: optional number`
13111021
13121022 Maximum results (default: 20, max: 100)
13131023
1024 default: 20, maximum: 100, minimum: 1
1025
13141026- `organization_ids: optional array of string`
13151027
13161028 Filter by organization IDs (accepts `org_...` or organization UUID). Enumerate IDs via `GET /v1/compliance/organizations`.
from line 1031
13191031
13201032 Opaque pagination token from a previous response's `next_page` field. Pass this to retrieve the next page of results. Clients should treat this value as an opaque string and not attempt to parse or interpret its contents, as the format may change without notice.
13211033
1322- `updated_at: optional object { gt, gte, lt, lte }`
1034- `updated_at: optional object`
13231035
13241036 - `gt: optional string`
13251037
13261038 Filter projects updated after this time (RFC 3339 format)
13271039
1040 format: date-time
1041
13281042 - `gte: optional string`
13291043
13301044 Filter projects updated at or after this time (RFC 3339 format)
13311045
1046 format: date-time
1047
13321048 - `lt: optional string`
13331049
13341050 Filter projects updated before this time (RFC 3339 format)
13351051
1052 format: date-time
1053
13361054 - `lte: optional string`
13371055
13381056 Filter projects updated at or before this time (RFC 3339 format)
13391057
1058 format: date-time
1059
13401060- `user_ids: optional array of string`
13411061
13421062 Filter by user IDs. Enumerate IDs via `GET /v1/compliance/organizations/{org_uuid}/users`.
13431063
1344### Header Parameters
1064#### Headers
13451065
13461066- `"x-api-key": optional string`
13471067
1348### Returns
1349
1350- `data: array of object { id, created_at, deleted_at, 6 more }`
1068#### Returns
1069
1070- `data: array of object`
13511071
13521072 List of projects sorted by creation date ascending
13531073
from line 1079
13591079
13601080 Project creation timestamp
13611081
1082 format: date-time
1083
13621084 - `deleted_at: string or null`
13631085
13641086 Timestamp when the project was deleted by an end user, or null otherwise
13651087
1088 format: date-time
1089
13661090 - `is_private: boolean`
13671091
13681092 If false, the project is visible to all organization members; if true the project is accessible only to the creator and specified collaborators
from line 1095
13711095
13721096 Project name
13731097
1374 - `organization_id: string`
1375
1376 Organization identifier (tagged ID)
1377
13781098 - `organization_uuid: string`
13791099
13801100 Organization UUID this project belongs to
from line 1103
13831103
13841104 Project last update timestamp
13851105
1386 - `user: object { id, email_address } or null`
1106 format: date-time
1107
1108 - `user: object or null`
13871109
13881110 The user who created a project or project document.
13891111
from line 1121
13991121
14001122 User's email address
14011123
1124 - `organization_id: string`
1125
1126 **Deprecated**
1127
1128 Organization identifier (tagged ID)
1129
14021130- `has_more: boolean`
14031131
14041132 Whether more records exist beyond the current result set
from line 1135
14071135
14081136 Token to retrieve the next page. Use this as the 'page' parameter in your next request
14091137
1410### Example
1411
1412```http
1138#### Example
1139
1140```bash
14131141curl https://api.anthropic.com/v1/compliance/apps/projects \
14141142 -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY"
14151143```
14161144
1417#### Response
1145##### Response (200)
14181146
14191147```json
14201148{
from line 1166
14381166}
14391167```
14401168
1441## Get project details
1442
1443**get** `/v1/compliance/apps/projects/{project_id}`
1169### Get project details
1170
1171**GET** `/v1/compliance/apps/projects/{project_id}`
14441172
14451173Get detailed information for a specific project.
14461174
1447### Path Parameters
1175#### Path parameters
14481176
14491177- `project_id: string`
14501178
14511179 The project ID (tagged ID, e.g., claude_proj_abc123)
14521180
1453### Header Parameters
1181#### Headers
14541182
14551183- `"x-api-key": optional string`
14561184
1457### Returns
1185#### Returns
14581186
14591187- `id: string`
14601188
from line 1200
14721200
14731201 Project creation timestamp
14741202
1203 format: date-time
1204
14751205- `deleted_at: string or null`
14761206
14771207 Timestamp when the project was deleted by an end user, or null otherwise
14781208
1209 format: date-time
1210
14791211- `description: string`
14801212
14811213 Project description
from line 1224
14921224
14931225 Project name
14941226
1495- `organization_id: string`
1496
1497 Organization identifier (tagged ID)
1498
14991227- `organization_uuid: string`
15001228
15011229 Organization UUID this project belongs to
from line 1232
15041232
15051233 Project last update timestamp
15061234
1507- `user: object { id, email_address } or null`
1235 format: date-time
1236
1237- `user: object or null`
15081238
15091239 The user who created a project or project document.
15101240
from line 1250
15201250
15211251 User's email address
15221252
1523### Example
1524
1525```http
1253- `organization_id: string`
1254
1255 **Deprecated**
1256
1257 Organization identifier (tagged ID)
1258
1259#### Example
1260
1261```bash
15261262curl https://api.anthropic.com/v1/compliance/apps/projects/$PROJECT_ID \
15271263 -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY"
15281264```
15291265
1530#### Response
1266##### Response (200)
15311267
15321268```json
15331269{
from line 1286
15501286}
15511287```
15521288
1553## Delete project
1554
1555**delete** `/v1/compliance/apps/projects/{project_id}`
1289### Delete project
1290
1291**DELETE** `/v1/compliance/apps/projects/{project_id}`
15561292
15571293Delete a project for compliance purposes.
15581294
from line 1301
15651301
15661302Project must have no attached chats - returns 409 if chats exist.
15671303
1568### Path Parameters
1304#### Path parameters
15691305
15701306- `project_id: string`
15711307
15721308 The project ID (tagged ID, e.g., claude_proj_abc123)
15731309
1574### Header Parameters
1310#### Headers
15751311
15761312- `"x-api-key": optional string`
15771313
1578### Returns
1314#### Returns
15791315
15801316- `id: string`
15811317
from line 1321
15851321
15861322 Constant string confirming deletion.
15871323
1588 - `"claude_project_deleted"`
1589
1590### Example
1591
1592```http
1324 default: claude_project_deleted
1325
1326#### Example
1327
1328```bash
15931329curl https://api.anthropic.com/v1/compliance/apps/projects/$PROJECT_ID \
15941330 -X DELETE \
15951331 -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY"
15961332```
15971333
1598#### Response
1334##### Response (200)
15991335
16001336```json
16011337{
from line 1340
16041340}
16051341```
16061342
1607## Domain Types
1608
1609### Project List Response
1610
1611- `ProjectListResponse object { id, created_at, deleted_at, 6 more }`
1612
1613 Project information for compliance responses.
1614
1615 - `id: string`
1616
1617 Project identifier (tagged ID)
1618
1619 - `created_at: string`
1620
1621 Project creation timestamp
1622
1623 - `deleted_at: string or null`
1624
1625 Timestamp when the project was deleted by an end user, or null otherwise
1626
1627 - `is_private: boolean`
1628
1629 If false, the project is visible to all organization members; if true the project is accessible only to the creator and specified collaborators
1630
1631 - `name: string`
1632
1633 Project name
1634
1635 - `organization_id: string`
1636
1637 Organization identifier (tagged ID)
1638
1639 - `organization_uuid: string`
1640
1641 Organization UUID this project belongs to
1642
1643 - `updated_at: string`
1644
1645 Project last update timestamp
1646
1647 - `user: object { id, email_address } or null`
1648
1649 The user who created a project or project document.
1650
1651 Fields that reference this type are null when the creator's account has
1652 been deleted or the creator is no longer a member of an organization the
1653 key may read.
1654
1655 - `id: string`
1656
1657 User identifier (tagged ID)
1658
1659 - `email_address: string`
1660
1661 User's email address
1662
1663### Project Retrieve Response
1664
1665- `ProjectRetrieveResponse object { id, attachments_count, chats_count, 10 more }`
1666
1667 Detailed project information for compliance responses.
1668
1669 - `id: string`
1670
1671 Project identifier (tagged ID)
1672
1673 - `attachments_count: number`
1674
1675 Number of attachments contained within this project
1676
1677 - `chats_count: number`
1678
1679 Number of chats contained within this project
1680
1681 - `created_at: string`
1682
1683 Project creation timestamp
1684
1685 - `deleted_at: string or null`
1686
1687 Timestamp when the project was deleted by an end user, or null otherwise
1688
1689 - `description: string`
1690
1691 Project description
1692
1693 - `instructions: string`
1694
1695 Project's custom instructions / prompt
1696
1697 - `is_private: boolean`
1698
1699 If false, the project is visible to all organization members; if true the project is accessible only to the creator and specified collaborators
1700
1701 - `name: string`
1702
1703 Project name
1704
1705 - `organization_id: string`
1706
1707 Organization identifier (tagged ID)
1708
1709 - `organization_uuid: string`
1710
1711 Organization UUID this project belongs to
1712
1713 - `updated_at: string`
1714
1715 Project last update timestamp
1716
1717 - `user: object { id, email_address } or null`
1718
1719 The user who created a project or project document.
1720
1721 Fields that reference this type are null when the creator's account has
1722 been deleted or the creator is no longer a member of an organization the
1723 key may read.
1724
1725 - `id: string`
1726
1727 User identifier (tagged ID)
1728
1729 - `email_address: string`
1730
1731 User's email address
1732
1733### Project Delete Response
1734
1735- `ProjectDeleteResponse object { id, type }`
1736
1737 Response for deleting a Claude project.
1738
1739 - `id: string`
1740
1741 The ID of the Claude project that was deleted
1742
1743 - `type: optional "claude_project_deleted"`
1744
1745 Constant string confirming deletion.
1746
1747 - `"claude_project_deleted"`
1748
1749# Attachments
1750
1751## List project attachments
1752
1753**get** `/v1/compliance/apps/projects/{project_id}/attachments`
1343## Apps › Projects › Attachments
1344
1345### List project attachments
1346
1347**GET** `/v1/compliance/apps/projects/{project_id}/attachments`
17541348
17551349List files and documents attached to a project.
17561350
from line 1357
17631357The text content of attached project documents can be fetched using the
17641358GET /v1/compliance/apps/projects/documents/{claude_proj_doc_id} endpoint.
17651359
1766### Path Parameters
1360#### Path parameters
17671361
17681362- `project_id: string`
17691363
17701364 The project ID (tagged ID, e.g., claude_proj_abc123)
17711365
1772### Query Parameters
1366#### Query parameters
17731367
17741368- `limit: optional number`
17751369
17761370 Maximum results (default: 20, max: 100)
17771371
1372 default: 20, maximum: 100, minimum: 1
1373
17781374- `page: optional string`
17791375
17801376 Opaque pagination token from a previous response's `next_page` field. Pass this to retrieve the next page of results. Clients should treat this value as an opaque string and not attempt to parse or interpret its contents, as the format may change without notice.
17811377
1782### Header Parameters
1378#### Headers
17831379
17841380- `"x-api-key": optional string`
17851381
1786### Returns
1787
1788- `data: array of object { id, created_at, filename, 4 more } or object { id, created_at, filename, 3 more }`
1382#### Returns
1383
1384- `data: array of object or object`
17891385
17901386 List of attachments sorted chronologically by created_at, tie break by id
17911387
1792 - `ComplianceProjectFileReference object { id, created_at, filename, 4 more }`
1388 - `ComplianceProjectFileReference object`
17931389
17941390 File attachment reference for compliance responses.
17951391
from line 1397
18011397
18021398 Creation timestamp (RFC 3339 format)
18031399
1400 format: date-time
1401
18041402 - `filename: string`
18051403
18061404 Display name of the file (e.g., 'document.pdf')
from line 1419
18211419
18221420 Discriminator marking this as a binary file
18231421
1824 - `"project_file"`
1825
1826 - `ComplianceProjectDocReference object { id, created_at, filename, 3 more }`
1422 default: project_file
1423
1424 - `ComplianceProjectDocReference object`
18271425
18281426 Project document attachment reference for compliance responses.
18291427
from line 1433
18351433
18361434 Creation timestamp (RFC 3339 format)
18371435
1436 format: date-time
1437
18381438 - `filename: string`
18391439
18401440 Display name of the document (e.g., 'document.txt')
from line 1443
18431443
18441444 MIME type of the project document, always set to plain text
18451445
1846 - `"text/plain"`
1446 default: text/plain
18471447
18481448 - `type: "project_doc"`
18491449
18501450 Discriminator marking this as a plain text document
18511451
1852 - `"project_doc"`
1452 default: project_doc
18531453
18541454 - `updated_at: string or null`
18551455
18561456 Last-modified timestamp of the document. Reserved for future use — currently always null.
18571457
1458 format: date-time
1459
18581460- `has_more: boolean`
18591461
18601462 Whether more records exist beyond the current result set
from line 1465
18631465
18641466 To get the next page, use the 'next_page' from the current response as the 'page' in your next request
18651467
1866### Example
1867
1868```http
1468#### Example
1469
1470```bash
18691471curl https://api.anthropic.com/v1/compliance/apps/projects/$PROJECT_ID/attachments \
18701472 -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY"
18711473```
18721474
1873#### Response
1475##### Response (200)
18741476
18751477```json
18761478{
from line 1492
18901492}
18911493```
18921494
1893## Domain Types
1894
1895### Attachment List Response
1896
1897- `AttachmentListResponse = object { id, created_at, filename, 4 more } or object { id, created_at, filename, 3 more }`
1898
1899 File attachment reference for compliance responses.
1900
1901 - `ComplianceProjectFileReference object { id, created_at, filename, 4 more }`
1902
1903 File attachment reference for compliance responses.
1904
1905 - `id: string`
1906
1907 File identifier (e.g., 'claude_file_abcd')
1908
1909 - `created_at: string`
1910
1911 Creation timestamp (RFC 3339 format)
1912
1913 - `filename: string`
1914
1915 Display name of the file (e.g., 'document.pdf')
1916
1917 - `md5: string or null`
1918
1919 Lowercase hex MD5 of the file's preferred downloadable variant, when recorded. Null otherwise. Use the per-file `/metadata` endpoint for the authoritative value.
1920
1921 - `mime_type: string`
1922
1923 MIME type of the file's preferred downloadable variant when one is recorded, else 'application/octet-stream'. Use the per-file `/metadata` endpoint for the authoritative value.
1924
1925 - `size_bytes: number or null`
1926
1927 Size in bytes of the file's preferred downloadable variant, when recorded. Null otherwise. Use the per-file `/metadata` endpoint for the authoritative value.
1928
1929 - `type: "project_file"`
1930
1931 Discriminator marking this as a binary file
1932
1933 - `"project_file"`
1934
1935 - `ComplianceProjectDocReference object { id, created_at, filename, 3 more }`
1936
1937 Project document attachment reference for compliance responses.
1938
1939 - `id: string`
1940
1941 Project document identifier (e.g., 'claude_proj_doc_abcd')
1942
1943 - `created_at: string`
1944
1945 Creation timestamp (RFC 3339 format)
1946
1947 - `filename: string`
1948
1949 Display name of the document (e.g., 'document.txt')
1950
1951 - `mime_type: "text/plain"`
1952
1953 MIME type of the project document, always set to plain text
1954
1955 - `"text/plain"`
1956
1957 - `type: "project_doc"`
1958
1959 Discriminator marking this as a plain text document
1960
1961 - `"project_doc"`
1962
1963 - `updated_at: string or null`
1964
1965 Last-modified timestamp of the document. Reserved for future use — currently always null.
1966
1967# Collaborators
1968
1969## List project collaborators
1970
1971**get** `/v1/compliance/apps/projects/{project_id}/collaborators`
1495## Apps › Projects › Collaborators
1496
1497### List project collaborators
1498
1499**GET** `/v1/compliance/apps/projects/{project_id}/collaborators`
19721500
19731501List the users, groups, and organization-wide grants on a project.
19741502
from line 1505
19771505RBAC group, the whole organization, or all holders of an organization-level
19781506role.
19791507
1980### Path Parameters
1508#### Path parameters
19811509
19821510- `project_id: string`
19831511
19841512 The project ID (tagged ID, e.g., claude_proj_abc123)
19851513
1986### Query Parameters
1514#### Query parameters
19871515
19881516- `limit: optional number`
19891517
19901518 Maximum results (default: 20, max: 100)
19911519
1520 default: 20, maximum: 100, minimum: 1
1521
19921522- `page: optional string`
19931523
19941524 Opaque pagination token from a previous response's `next_page` field. Pass this to retrieve the next page of results. Clients should treat this value as an opaque string and not attempt to parse or interpret its contents, as the format may change without notice.
19951525
1996### Header Parameters
1526#### Headers
19971527
19981528- `"x-api-key": optional string`
19991529
2000### Returns
2001
2002- `data: array of object { granted_at, role, type, user_id } or object { granted_at, group_id, role, type } or object { granted_at, organization_uuid, role, type } or object { granted_at, organization_role, role, type }`
1530#### Returns
1531
1532- `data: array of object or object or object or object`
20031533
20041534 List of collaborators sorted chronologically by granted_at, tie break by the underlying role-assignment UUID
20051535
2006 - `ComplianceProjectUserCollaborator object { granted_at, role, type, user_id }`
1536 - `ComplianceProjectUserCollaborator object`
20071537
20081538 An individual user granted a role on a project.
20091539
from line 1541
20111541
20121542 When this collaborator was granted access (RFC 3339 format)
20131543
1544 format: date-time
1545
20141546 - `role: "admin" or "editor" or "owner" or "viewer"`
20151547
20161548 Role granted on the project
from line 1559
20271559
20281560 Discriminator marking this as an individual user collaborator
20291561
2030 - `"user"`
1562 default: user
20311563
20321564 - `user_id: string or null`
20331565
20341566 Identifier of the user granted access (tagged ID), or null if their account has since been deleted
20351567
2036 - `ComplianceProjectGroupCollaborator object { granted_at, group_id, role, type }`
1568 - `ComplianceProjectGroupCollaborator object`
20371569
20381570 An RBAC group granted a role on a project.
20391571
from line 1573
20411573
20421574 When this collaborator was granted access (RFC 3339 format)
20431575
1576 format: date-time
1577
20441578 - `group_id: string`
20451579
20461580 Identifier of the group granted access (tagged ID)
from line 1595
20611595
20621596 Discriminator marking this as a group collaborator
20631597
2064 - `"group"`
2065
2066 - `ComplianceProjectOrganizationCollaborator object { granted_at, organization_uuid, role, type }`
1598 default: group
1599
1600 - `ComplianceProjectOrganizationCollaborator object`
20671601
20681602 An entire organization granted a role on a project.
20691603
from line 1605
20711605
20721606 When this collaborator was granted access (RFC 3339 format)
20731607
1608 format: date-time
1609
20741610 - `organization_uuid: string`
20751611
20761612 UUID of the organization granted access
from line 1627
20911627
20921628 Discriminator marking this as an organization-wide grant
20931629
2094 - `"organization"`
2095
2096 - `ComplianceProjectOrganizationRoleCollaborator object { granted_at, organization_role, role, type }`
1630 default: organization
1631
1632 - `ComplianceProjectOrganizationRoleCollaborator object`
20971633
20981634 All holders of an organization-level role granted a role on a project.
20991635
from line 1637
21011637
21021638 When this collaborator was granted access (RFC 3339 format)
21031639
1640 format: date-time
1641
21041642 - `organization_role: string`
21051643
21061644 The organization-level role whose holders are granted access
from line 1659
21211659
21221660 Discriminator marking this as a grant to all organization members holding a specific org-level role
21231661
2124 - `"organization_role"`
1662 default: organization_role
21251663
21261664- `has_more: boolean`
21271665
from line 1669
21311669
21321670 To get the next page, use the 'next_page' from the current response as the 'page' in your next request
21331671
2134### Example
2135
2136```http
1672#### Example
1673
1674```bash
21371675curl https://api.anthropic.com/v1/compliance/apps/projects/$PROJECT_ID/collaborators \
21381676 -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY"
21391677```
21401678
2141#### Response
1679##### Response (200)
21421680
21431681```json
21441682{
from line 1693
21551693}
21561694```
21571695
2158## Domain Types
2159
2160### Collaborator List Response
2161
2162- `CollaboratorListResponse = object { granted_at, role, type, user_id } or object { granted_at, group_id, role, type } or object { granted_at, organization_uuid, role, type } or object { granted_at, organization_role, role, type }`
2163
2164 An individual user granted a role on a project.
2165
2166 - `ComplianceProjectUserCollaborator object { granted_at, role, type, user_id }`
2167
2168 An individual user granted a role on a project.
2169
2170 - `granted_at: string`
2171
2172 When this collaborator was granted access (RFC 3339 format)
2173
2174 - `role: "admin" or "editor" or "owner" or "viewer"`
2175
2176 Role granted on the project
2177
2178 - `"admin"`
2179
2180 - `"editor"`
2181
2182 - `"owner"`
2183
2184 - `"viewer"`
2185
2186 - `type: "user"`
2187
2188 Discriminator marking this as an individual user collaborator
2189
2190 - `"user"`
2191
2192 - `user_id: string or null`
2193
2194 Identifier of the user granted access (tagged ID), or null if their account has since been deleted
2195
2196 - `ComplianceProjectGroupCollaborator object { granted_at, group_id, role, type }`
2197
2198 An RBAC group granted a role on a project.
2199
2200 - `granted_at: string`
2201
2202 When this collaborator was granted access (RFC 3339 format)
2203
2204 - `group_id: string`
2205
2206 Identifier of the group granted access (tagged ID)
2207
2208 - `role: "admin" or "editor" or "owner" or "viewer"`
2209
2210 Role granted on the project
2211
2212 - `"admin"`
2213
2214 - `"editor"`
2215
2216 - `"owner"`
2217
2218 - `"viewer"`
2219
2220 - `type: "group"`
2221
2222 Discriminator marking this as a group collaborator
2223
2224 - `"group"`
2225
2226 - `ComplianceProjectOrganizationCollaborator object { granted_at, organization_uuid, role, type }`
2227
2228 An entire organization granted a role on a project.
2229
2230 - `granted_at: string`
2231
2232 When this collaborator was granted access (RFC 3339 format)
2233
2234 - `organization_uuid: string`
2235
2236 UUID of the organization granted access
2237
2238 - `role: "admin" or "editor" or "owner" or "viewer"`
2239
2240 Role granted on the project
2241
2242 - `"admin"`
2243
2244 - `"editor"`
2245
2246 - `"owner"`
2247
2248 - `"viewer"`
2249
2250 - `type: "organization"`
2251
2252 Discriminator marking this as an organization-wide grant
2253
2254 - `"organization"`
2255
2256 - `ComplianceProjectOrganizationRoleCollaborator object { granted_at, organization_role, role, type }`
2257
2258 All holders of an organization-level role granted a role on a project.
2259
2260 - `granted_at: string`
2261
2262 When this collaborator was granted access (RFC 3339 format)
2263
2264 - `organization_role: string`
2265
2266 The organization-level role whose holders are granted access
2267
2268 - `role: "admin" or "editor" or "owner" or "viewer"`
2269
2270 Role granted on the project
2271
2272 - `"admin"`
2273
2274 - `"editor"`
2275
2276 - `"owner"`
2277
2278 - `"viewer"`
2279
2280 - `type: "organization_role"`
2281
2282 Discriminator marking this as a grant to all organization members holding a specific org-level role
2283
2284 - `"organization_role"`
2285
2286# Documents
2287
2288## Get project document content
2289
2290**get** `/v1/compliance/apps/projects/documents/{document_id}`
1696## Apps › Projects › Documents
1697
1698### Get project document content
1699
1700**GET** `/v1/compliance/apps/projects/documents/{document_id}`
22911701
22921702Get detailed information for a specific project document.
22931703
2294### Path Parameters
1704#### Path parameters
22951705
22961706- `document_id: string`
22971707
22981708 The document ID (tagged ID, e.g., claude_proj_doc_abc123)
22991709
2300### Header Parameters
1710#### Headers
23011711
23021712- `"x-api-key": optional string`
23031713
2304### Returns
1714#### Returns
23051715
23061716- `id: string`
23071717
from line 1725
23151725
23161726 Document creation timestamp
23171727
1728 format: date-time
1729
23181730- `filename: string`
23191731
23201732 Document filename
23211733
2322- `user: object { id, email_address } or null`
1734- `user: object or null`
23231735
23241736 The user who created a project or project document.
23251737
from line 1747
23351747
23361748 User's email address
23371749
2338### Example
2339
2340```http
1750#### Example
1751
1752```bash
23411753curl https://api.anthropic.com/v1/compliance/apps/projects/documents/$DOCUMENT_ID \
23421754 -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY"
23431755```
23441756
2345#### Response
1757##### Response (200)
23461758
23471759```json
23481760{
from line 1769
23571769}
23581770```
23591771
2360## Get project document metadata
2361
2362**get** `/v1/compliance/apps/projects/documents/{document_id}/metadata`
1772### Get project document metadata
1773
1774**GET** `/v1/compliance/apps/projects/documents/{document_id}/metadata`
23631775
23641776Returns metadata for a project document, without the content body.
23651777
from line 1780
23681780fields here are computed over the UTF-8 encoding of that text, so a DLP
23691781consumer can dedupe or match hashes without downloading every document.
23701782
2371### Path Parameters
1783#### Path parameters
23721784
23731785- `document_id: string`
23741786
23751787 The document ID (tagged ID, e.g., claude_proj_doc_abc123)
23761788
2377### Header Parameters
1789#### Headers
23781790
23791791- `"x-api-key": optional string`
23801792
2381### Returns
1793#### Returns
23821794
23831795- `id: string`
23841796
from line 1804
23921804
23931805 Document creation timestamp
23941806
1807 format: date-time
1808
23951809- `filename: string`
23961810
23971811 Document filename
from line 1818
24041818
24051819 MIME type of the document content, always plain text
24061820
2407 - `"text/plain"`
1821 default: text/plain
24081822
24091823- `size_bytes: number`
24101824
24111825 Size in bytes of the document content (UTF-8 encoded)
24121826
2413- `user: object { id, email_address } or null`
1827- `user: object or null`
24141828
24151829 The user who created a project or project document.
24161830
from line 1840
24261840
24271841 User's email address
24281842
2429### Example
2430
2431```http
1843#### Example
1844
1845```bash
24321846curl https://api.anthropic.com/v1/compliance/apps/projects/documents/$DOCUMENT_ID/metadata \
24331847 -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY"
24341848```
24351849
2436#### Response
1850##### Response (200)
24371851
24381852```json
24391853{
from line 1865
24511865}
24521866```
24531867
2454## Delete project document
2455
2456**delete** `/v1/compliance/apps/projects/documents/{document_id}`
1868### Delete project document
1869
1870**DELETE** `/v1/compliance/apps/projects/documents/{document_id}`
24571871
24581872Delete a project document for compliance purposes.
24591873
24601874Hard-deletes the project document permanently.
24611875
2462### Path Parameters
1876#### Path parameters
24631877
24641878- `document_id: string`
24651879
24661880 The document ID (tagged ID, e.g., claude_proj_doc_abc123)
24671881
2468### Header Parameters
1882#### Headers
24691883
24701884- `"x-api-key": optional string`
24711885
2472### Returns
1886#### Returns
24731887
24741888- `id: string`
24751889
from line 1893
24791893
24801894 Constant string confirming deletion.
24811895
2482 - `"claude_project_document_deleted"`
2483
2484### Example
2485
2486```http
1896 default: claude_project_document_deleted
1897
1898#### Example
1899
1900```bash
24871901curl https://api.anthropic.com/v1/compliance/apps/projects/documents/$DOCUMENT_ID \
24881902 -X DELETE \
24891903 -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY"
24901904```
24911905
2492#### Response
1906##### Response (200)
24931907
24941908```json
24951909{
from line 1912
24981912}
24991913```
25001914
2501## Domain Types
2502
2503### Document Retrieve Response
2504
2505- `DocumentRetrieveResponse object { id, content, created_at, 2 more }`
2506
2507 Project document information for compliance responses.
2508
2509 - `id: string`
2510
2511 Project document identifier (tagged ID)
2512
2513 - `content: string`
2514
2515 Document text content
2516
2517 - `created_at: string`
2518
2519 Document creation timestamp
2520
2521 - `filename: string`
2522
2523 Document filename
2524
2525 - `user: object { id, email_address } or null`
2526
2527 The user who created a project or project document.
2528
2529 Fields that reference this type are null when the creator's account has
2530 been deleted or the creator is no longer a member of an organization the
2531 key may read.
2532
2533 - `id: string`
2534
2535 User identifier (tagged ID)
2536
2537 - `email_address: string`
2538
2539 User's email address
2540
2541### Document Metadata Response
2542
2543- `DocumentMetadataResponse object { id, claude_project_id, created_at, 5 more }`
2544
2545 Project document metadata for GET /v1/compliance/apps/projects/documents/{document_id}/metadata.
2546
2547 Returns metadata only. Use the sibling endpoint (without `/metadata`)
2548 to fetch the document text content.
2549
2550 - `id: string`
2551
2552 Project document identifier (tagged ID)
2553
2554 - `claude_project_id: string`
2555
2556 The project this document belongs to
2557
2558 - `created_at: string`
2559
2560 Document creation timestamp
2561
2562 - `filename: string`
2563
2564 Document filename
2565
2566 - `md5: string`
2567
2568 Lowercase hex MD5 of the document content (UTF-8 encoded). Matches the `content` field returned by the sibling content endpoint.
2569
2570 - `mime_type: "text/plain"`
2571
2572 MIME type of the document content, always plain text
2573
2574 - `"text/plain"`
2575
2576 - `size_bytes: number`
2577
2578 Size in bytes of the document content (UTF-8 encoded)
2579
2580 - `user: object { id, email_address } or null`
2581
2582 The user who created a project or project document.
2583
2584 Fields that reference this type are null when the creator's account has
2585 been deleted or the creator is no longer a member of an organization the
2586 key may read.
2587
2588 - `id: string`
2589
2590 User identifier (tagged ID)
2591
2592 - `email_address: string`
2593
2594 User's email address
2595
2596### Document Delete Response
2597
2598- `DocumentDeleteResponse object { id, type }`
2599
2600 Response for deleting a project document.
2601
2602 - `id: string`
2603
2604 The ID of the project document that was deleted
2605
2606 - `type: "claude_project_document_deleted"`
2607
2608 Constant string confirming deletion.
2609
2610 - `"claude_project_document_deleted"`
2611
2612# Artifacts
2613
2614## Get artifact metadata
2615
2616**get** `/v1/compliance/apps/artifacts/{artifact_version_id}`
1915## Apps › Artifacts
1916
1917### Get artifact metadata
1918
1919**GET** `/v1/compliance/apps/artifacts/{artifact_version_id}`
26171920
26181921Returns metadata for an artifact version, without the content body.
26191922
from line 1925
26221925encoding of that text, so a DLP consumer can dedupe or match hashes
26231926without downloading every artifact.
26241927
2625### Path Parameters
1928#### Path parameters
26261929
26271930- `artifact_version_id: string`
26281931
26291932 The artifact version ID (tagged ID, e.g., claude_artifact_version_abc123)
26301933
2631### Header Parameters
1934#### Headers
26321935
26331936- `"x-api-key": optional string`
26341937
2635### Returns
1938#### Returns
26361939
26371940- `id: string`
26381941
from line 1953
26501953
26511954 Artifact version creation timestamp
26521955
1956 format: date-time
1957
26531958- `md5: string`
26541959
26551960 Lowercase hex MD5 of the artifact content (UTF-8 encoded). Matches the `content` field returned by the sibling `/content` endpoint.
from line 1971
26661971
26671972 Artifact version ID e.g. 'claude_artifact_version_abc123'
26681973
2669### Example
2670
2671```http
1974#### Example
1975
1976```bash
26721977curl https://api.anthropic.com/v1/compliance/apps/artifacts/$ARTIFACT_VERSION_ID \
26731978 -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY"
26741979```
26751980
2676#### Response
1981##### Response (200)
26771982
26781983```json
26791984{
from line 1993
26881993}
26891994```
26901995
2691## Download artifact content
2692
2693**get** `/v1/compliance/apps/artifacts/{artifact_version_id}/content`
1996### Download artifact content
1997
1998**GET** `/v1/compliance/apps/artifacts/{artifact_version_id}/content`
26941999
26952000Download the content of an artifact version for compliance purposes.
26962001
26972002Returns the full text content of the artifact version.
26982003
2699### Path Parameters
2004#### Path parameters
27002005
27012006- `artifact_version_id: string`
27022007
27032008 The artifact version ID (tagged ID, e.g., claude_artifact_version_abc123)
27042009
2705### Header Parameters
2010#### Headers
27062011
27072012- `"x-api-key": optional string`
27082013
2709### Example
2710
2711```http
2014#### Example
2015
2016```bash
27122017curl https://api.anthropic.com/v1/compliance/apps/artifacts/$ARTIFACT_VERSION_ID/content \
27132018 -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY"
27142019```
27152020
2716## Domain Types
2717
2718### Artifact Retrieve Response
2719
2720- `ArtifactRetrieveResponse object { id, artifact_type, claude_chat_id, 5 more }`
2721
2722 Artifact version metadata for GET /v1/compliance/apps/artifacts/{artifact_version_id}.
2723
2724 Returns metadata only. Use the sibling `/content` endpoint to fetch the
2725 artifact body.
2726
2727 - `id: string`
2728
2729 Artifact ID e.g. 'claude_artifact_abc123'
2730
2731 - `artifact_type: string or null`
2732
2733 MIME-like artifact type e.g. 'application/vnd.ant.code'
2734
2735 - `claude_chat_id: string`
2736
2737 The chat this artifact belongs to
2738
2739 - `created_at: string`
2740
2741 Artifact version creation timestamp
2742
2743 - `md5: string`
2744
2745 Lowercase hex MD5 of the artifact content (UTF-8 encoded). Matches the `content` field returned by the sibling `/content` endpoint.
2746
2747 - `size_bytes: number`
2748
2749 Size in bytes of the artifact content (UTF-8 encoded)
2750
2751 - `title: string or null`
2752
2753 Artifact title
2754
2755 - `version_id: string`
2756
2757 Artifact version ID e.g. 'claude_artifact_version_abc123'
2758
2759# Sessions
2760
2761# Local
2762
2763## List local sessions
2764
2765**get** `/v1/compliance/apps/sessions/local`
2021## Apps › Sessions › Local
2022
2023### List local sessions
2024
2025**GET** `/v1/compliance/apps/sessions/local`
27662026
27672027List local sessions across the organizations the key may read.
27682028
27692029Results are ordered by `created_at` descending. Pagination is
27702030forward-only via `next_page`; there is no reverse cursor.
27712031
2772### Query Parameters
2773
2774- `created_at: optional object { gte, lt }`
2032#### Query parameters
2033
2034- `created_at: optional object`
27752035
27762036 - `gte: optional string`
27772037
27782038 Only return sessions whose first inference call is at or after this time (RFC 3339; a UTC offset is required).
27792039
2040 format: date-time
2041
27802042 - `lt: optional string`
27812043
27822044 Only return sessions whose first inference call is strictly before this time (RFC 3339; a UTC offset is required).
27832045
2046 format: date-time
2047
27842048- `limit: optional number`
27852049
27862050 Maximum results (default: 100, max: 500)
27872051
2052 default: 100, maximum: 500, minimum: 1
2053
27882054- `page: optional string`
27892055
27902056 Opaque pagination token from a previous response's `next_page` field. Pass this to retrieve the next page of results. Clients should treat this value as an opaque string and not attempt to parse or interpret its contents, as the format may change without notice.
27912057
2792- `updated_at: optional object { gte }`
2058- `updated_at: optional object`
27932059
27942060 - `gte: optional string`
27952061
27962062 Only return sessions whose last inference call is at or after this time (RFC 3339; a UTC offset is required). Combines with `created_at.gte` / `created_at.lt`; the ordering and pagination are unchanged. Use it to poll for sessions that have been active since a previous pass — a session that becomes active later can only enter the result, never leave it.
27972063
2798### Header Parameters
2064 format: date-time
2065
2066#### Headers
27992067
28002068- `"x-api-key": optional string`
28012069
2802### Returns
2803
2804- `data: array of object { id, created_at, organization_uuid, 5 more }`
2070#### Returns
2071
2072- `data: array of object`
28052073
28062074 Page of local sessions, ordered by `created_at` descending; ties are broken by a fixed server-side order. `updated_at` never participates in the ordering; the `updated_at.gte` query parameter filters on it without changing the order or the pagination cursor.
28072075
from line 2081
28132081
28142082 Timestamp of the session's first retained inference call (RFC 3339, UTC). When a session's activity spans the child organization's retention boundary, calls older than the boundary are no longer reflected, so this value is the timestamp of the earliest retained call: always strictly after the boundary, never the boundary itself.
28152083
2084 format: date-time
2085
28162086 - `organization_uuid: string`
28172087
28182088 UUID of the child organization the session belongs to
from line 2093
28232093
28242094 - `type: "compliance_local_session"`
28252095
2826 - `"compliance_local_session"`
2096 default: compliance_local_session
28272097
28282098 - `updated_at: string`
28292099
28302100 Timestamp of the session's last retained inference call (RFC 3339, UTC). Always at or after `created_at`. When a session's activity spans the child organization's retention boundary, calls older than the boundary are no longer reflected — but because retention removes only the oldest calls, this value (unlike `created_at`) is unaffected until the entire session has aged out. On the list endpoint this value is a lower bound: for a session still active at a page or `created_at.lt` window boundary it can momentarily lag the session's true last activity. Retrieving the session, or its messages, always reflects the exact latest retained call.
28312101
2832 - `user: object { id, email_address }`
2102 format: date-time
2103
2104 - `user: object`
28332105
28342106 The authenticated user at the time of the session. Always set; `user.id` is always populated. `user.email_address` is null when the user's account has been deleted or the user is no longer a member of an organization the key may read.
28352107
from line 2121
28492121
28502122 Opaque pagination cursor (prefixed `page_`) for the next page. Null when there is no further page. Treat as an opaque string; the format may change without notice.
28512123
2852### Example
2853
2854```http
2124#### Example
2125
2126```bash
28552127curl https://api.anthropic.com/v1/compliance/apps/sessions/local \
28562128 -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY"
28572129```
28582130
2859#### Response
2131##### Response (200)
28602132
28612133```json
28622134{
from line 2150
28782150}
28792151```
28802152
2881## Retrieve a local session
2882
2883**get** `/v1/compliance/apps/sessions/local/{local_session_id}`
2153### Retrieve a local session
2154
2155**GET** `/v1/compliance/apps/sessions/local/{local_session_id}`
28842156
28852157Retrieve one local session.
28862158
from line 2161
28892161enforced when the response is served: a session whose every
28902162inference call has aged out returns 404.
28912163
2892### Path Parameters
2164#### Path parameters
28932165
28942166- `local_session_id: string`
28952167
2896### Header Parameters
2168#### Headers
28972169
28982170- `"x-api-key": optional string`
28992171
2900### Returns
2172#### Returns
29012173
29022174- `id: string`
29032175
from line 2179
29072179
29082180 Timestamp of the session's first retained inference call (RFC 3339, UTC). When a session's activity spans the child organization's retention boundary, calls older than the boundary are no longer reflected, so this value is the timestamp of the earliest retained call: always strictly after the boundary, never the boundary itself.
29092181
2182 format: date-time
2183
29102184- `organization_uuid: string`
29112185
29122186 UUID of the child organization the session belongs to
from line 2191
29172191
29182192- `type: "compliance_local_session"`
29192193
2920 - `"compliance_local_session"`
2194 default: compliance_local_session
29212195
29222196- `updated_at: string`
29232197
29242198 Timestamp of the session's last retained inference call (RFC 3339, UTC). Always at or after `created_at`. When a session's activity spans the child organization's retention boundary, calls older than the boundary are no longer reflected — but because retention removes only the oldest calls, this value (unlike `created_at`) is unaffected until the entire session has aged out. On the list endpoint this value is a lower bound: for a session still active at a page or `created_at.lt` window boundary it can momentarily lag the session's true last activity. Retrieving the session, or its messages, always reflects the exact latest retained call.
29252199
2926- `user: object { id, email_address }`
2200 format: date-time
2201
2202- `user: object`
29272203
29282204 The authenticated user at the time of the session. Always set; `user.id` is always populated. `user.email_address` is null when the user's account has been deleted or the user is no longer a member of an organization the key may read.
29292205
from line 2215
29392215
29402216 Workspace identifier (tagged ID, prefixed `wrkspc_`). Null for sessions not attributed to a workspace.
29412217
2942### Example
2943
2944```http
2218#### Example
2219
2220```bash
29452221curl https://api.anthropic.com/v1/compliance/apps/sessions/local/$LOCAL_SESSION_ID \
29462222 -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY"
29472223```
29482224
2949#### Response
2225##### Response (200)
29502226
29512227```json
29522228{
from line 2240
29642240}
29652241```
29662242
2967## Domain Types
2968
2969### Local List Response
2970
2971- `LocalListResponse object { id, created_at, organization_uuid, 5 more }`
2972
2973 A Cowork or Claude Code session that a user ran on their own computer
2974 while signed in with their organization account.
2975
2976 - `id: string`
2977
2978 Local session identifier, prefixed `clls_`. Unique within the parent organization. Treat as an opaque string; the format may change without notice.
2979
2980 - `created_at: string`
2981
2982 Timestamp of the session's first retained inference call (RFC 3339, UTC). When a session's activity spans the child organization's retention boundary, calls older than the boundary are no longer reflected, so this value is the timestamp of the earliest retained call: always strictly after the boundary, never the boundary itself.
2983
2984 - `organization_uuid: string`
2985
2986 UUID of the child organization the session belongs to
2987
2988 - `product_surface: string or null`
2989
2990 The product the session ran in: `cowork` for Cowork sessions in Claude Desktop, or `claude_code` for Claude Code sessions. New values appear as coverage expands; treat unrecognized values as opaque. `null` when the surface was not recorded.
2991
2992 - `type: "compliance_local_session"`
2993
2994 - `"compliance_local_session"`
2995
2996 - `updated_at: string`
2997
2998 Timestamp of the session's last retained inference call (RFC 3339, UTC). Always at or after `created_at`. When a session's activity spans the child organization's retention boundary, calls older than the boundary are no longer reflected — but because retention removes only the oldest calls, this value (unlike `created_at`) is unaffected until the entire session has aged out. On the list endpoint this value is a lower bound: for a session still active at a page or `created_at.lt` window boundary it can momentarily lag the session's true last activity. Retrieving the session, or its messages, always reflects the exact latest retained call.
2999
3000 - `user: object { id, email_address }`
3001
3002 The authenticated user at the time of the session. Always set; `user.id` is always populated. `user.email_address` is null when the user's account has been deleted or the user is no longer a member of an organization the key may read.
3003
3004 - `id: string`
3005
3006 User identifier (tagged ID, prefixed `user_`). Always set, so attribution survives after the user's account is deleted or the user leaves the organizations the key may read.
3007
3008 - `email_address: string or null`
3009
3010 User's email address. Null when the user's account has been deleted or the user is no longer a member of an organization the key may read. The messages endpoint does not resolve email addresses; this field is always null there.
3011
3012 - `workspace_id: string or null`
3013
3014 Workspace identifier (tagged ID, prefixed `wrkspc_`). Null for sessions not attributed to a workspace.
3015
3016### Local Retrieve Response
3017
3018- `LocalRetrieveResponse object { id, created_at, organization_uuid, 5 more }`
3019
3020 A Cowork or Claude Code session that a user ran on their own computer
3021 while signed in with their organization account.
3022
3023 - `id: string`
3024
3025 Local session identifier, prefixed `clls_`. Unique within the parent organization. Treat as an opaque string; the format may change without notice.
3026
3027 - `created_at: string`
3028
3029 Timestamp of the session's first retained inference call (RFC 3339, UTC). When a session's activity spans the child organization's retention boundary, calls older than the boundary are no longer reflected, so this value is the timestamp of the earliest retained call: always strictly after the boundary, never the boundary itself.
3030
3031 - `organization_uuid: string`
3032
3033 UUID of the child organization the session belongs to
3034
3035 - `product_surface: string or null`
3036
3037 The product the session ran in: `cowork` for Cowork sessions in Claude Desktop, or `claude_code` for Claude Code sessions. New values appear as coverage expands; treat unrecognized values as opaque. `null` when the surface was not recorded.
3038
3039 - `type: "compliance_local_session"`
3040
3041 - `"compliance_local_session"`
3042
3043 - `updated_at: string`
3044
3045 Timestamp of the session's last retained inference call (RFC 3339, UTC). Always at or after `created_at`. When a session's activity spans the child organization's retention boundary, calls older than the boundary are no longer reflected — but because retention removes only the oldest calls, this value (unlike `created_at`) is unaffected until the entire session has aged out. On the list endpoint this value is a lower bound: for a session still active at a page or `created_at.lt` window boundary it can momentarily lag the session's true last activity. Retrieving the session, or its messages, always reflects the exact latest retained call.
3046
3047 - `user: object { id, email_address }`
3048
3049 The authenticated user at the time of the session. Always set; `user.id` is always populated. `user.email_address` is null when the user's account has been deleted or the user is no longer a member of an organization the key may read.
3050
3051 - `id: string`
3052
3053 User identifier (tagged ID, prefixed `user_`). Always set, so attribution survives after the user's account is deleted or the user leaves the organizations the key may read.
3054
3055 - `email_address: string or null`
3056
3057 User's email address. Null when the user's account has been deleted or the user is no longer a member of an organization the key may read. The messages endpoint does not resolve email addresses; this field is always null there.
3058
3059 - `workspace_id: string or null`
3060
3061 Workspace identifier (tagged ID, prefixed `wrkspc_`). Null for sessions not attributed to a workspace.
3062
3063# Messages
3064
3065## Retrieve local session messages
3066
3067**get** `/v1/compliance/apps/sessions/local/{local_session_id}/messages`
2243## Apps › Sessions › Local › Messages
2244
2245### Retrieve local session messages
2246
2247**GET** `/v1/compliance/apps/sessions/local/{local_session_id}/messages`
30682248
30692249Read one local session's transcript, oldest-first by default.
30702250
from line 2256
30762256honored for 24 hours: a cursor older than that is rejected with an
30772257explicit 400; restart the walk to read under the current boundary.
30782258
3079### Path Parameters
2259#### Path parameters
30802260
30812261- `local_session_id: string`
30822262
3083### Query Parameters
2263#### Query parameters
30842264
30852265- `limit: optional number`
30862266
30872267 Maximum results (default: 100, max: 1000)
30882268
2269 default: 100, maximum: 1000, minimum: 1
2270
30892271- `order: optional "asc" or "desc"`
30902272
30912273 Sort direction. `asc` (oldest-first, default) or `desc`.
30922274
2275 default: asc
2276
30932277 - `"asc"`
30942278
30952279 - `"desc"`
from line 2286
31022286
31032287 Truncate each text item inside a tool result to at most this many bytes (cut on a code-point boundary). Pass `-1` to request the server maximum (approximately 1 MiB); larger values are clamped to it. `0` is not a valid value.
31042288
2289 default: 10000, maximum: 2147483647, minimum: -1
2290
31052291- `tool_use_input_max_bytes: optional number`
31062292
31072293 Truncate each tool-use input to at most this many bytes (cut on a code-point boundary so the result is valid UTF-8). Pass `-1` to request the server maximum (approximately 1 MiB); larger values are clamped to it. `0` is not a valid value.
31082294
3109### Header Parameters
2295 default: 10000, maximum: 2147483647, minimum: -1
2296
2297#### Headers
31102298
31112299- `"x-api-key": optional string`
31122300
3113### Returns
3114
3115- `data: array of object { id, content, created_at, 4 more }`
2301#### Returns
2302
2303- `data: array of object`
31162304
31172305 Transcript turns for this page, in call order: oldest call first by default, newest call first with `order=desc`. The messages of one call carry the call's timestamp and follow each other in transcript order; a page boundary can fall between them.
31182306
from line 2308
31202308
31212309 Message identifier, prefixed `clsm_`. Stable for as long as the message's turn is retained: identifiers of retained turns do not change as older turns age out of the organization's retention period. The `retention_elapsed` placeholder's identifier is distinct from every retained turn's and changes only when further turns age out.
31222310
3123 - `content: array of object { text, truncated, type } or object { id, input, name, 2 more } or object { content, is_error, name, 3 more }`
2311 - `content: array of object or object or object`
31242312
31252313 Content blocks within the message, discriminated on `type` (`text` / `tool_use` / `tool_result`: the same discriminator values as the claude.ai chat-messages endpoint; the tool variants omit `integration_name` and `mcp_server_url`, and `text` carries `truncated`). Extended-thinking content is never included. The request's `system` field is never included; a presence-only marker message is emitted when it was set. The request's `tools[]` definitions are never included as transcript messages. Project-level instructions (such as CLAUDE.md files) appear in the message stream as a user-role context block and are included. Empty when `provenance.type` is `content_unavailable`.
31262314
3127 - `Text object { text, truncated, type }`
2315 - `Text object`
31282316
31292317 Text content block.
31302318
from line 2324
31362324
31372325 True when `text` was shortened by the server's fixed per-string bound (approximately 1 MiB), or when ancillary content the block carried (such as citations) was omitted, or when this block stands in for a non-text block whose content is not shown, or when it is an explanatory marker the server inserted (its text enclosed in square brackets, e.g. prefacing client-asserted history). There is no request parameter that raises the per-string bound.
31382326
2327 default: false
2328
31392329 - `type: "text"`
31402330
3141 - `"text"`
3142
3143 - `ToolUse object { id, input, name, 2 more }`
2331 default: text
2332
2333 - `ToolUse object`
31442334
31452335 Tool invocation requested by the assistant.
31462336
from line 2350
31602350
31612351 True when `input` was shortened. Pass `tool_use_input_max_bytes=-1` to request the server maximum.
31622352
2353 default: false
2354
31632355 - `type: "tool_use"`
31642356
3165 - `"tool_use"`
3166
3167 - `ToolResult object { content, is_error, name, 3 more }`
2357 default: tool_use
2358
2359 - `ToolResult object`
31682360
31692361 Result returned by a tool invocation.
31702362
3171 - `content: array of object { text, type }`
2363 - `content: array of object`
31722364
31732365 Text content returned by the tool. Non-text item types are omitted and signalled via `truncated` with an in-band item-count marker.
31742366
from line 2370
31782370
31792371 - `type: "text"`
31802372
3181 - `"text"`
2373 default: text
31822374
31832375 - `is_error: boolean`
31842376
from line 2388
31962388
31972389 True when one or more text items in `content` were shortened or non-text items were omitted. Pass `tool_result_max_bytes=-1` to request the server maximum.
31982390
2391 default: false
2392
31992393 - `type: "tool_result"`
32002394
3201 - `"tool_result"`
2395 default: tool_result
32022396
32032397 - `created_at: string`
32042398
32052399 When the message was recorded (RFC 3339, UTC)
32062400
2401 format: date-time
2402
32072403 - `model: string or null`
32082404
32092405 The model that served this assistant turn, as reported in the `model` field of the underlying Messages API response. Null on user messages and on any assistant message whose `provenance` is set: client-asserted history and synthetic markers were not produced by a model during this session, and for unavailable content the serving model is not known.
32102406
3211 - `provenance: object { reason, type } or object { type } or object { type } or null`
2407 - `provenance: object or object or object or null`
32122408
32132409 Where this turn's content came from, discriminated on `type`. Null (the common case) means verified content: on an assistant message, content Claude produced during this session; on a user message, content the user sent. `content_unavailable`: the turn's content cannot be returned and `content` is empty; `reason` says why. `client_asserted`: assistant content the client supplied as conversation history; `content` shows what the model received but its authorship is not verified; never on user-role messages. `synthetic_marker`: a transcript marker the endpoint generated rather than content either party sent during the session. Both `client_asserted` and `synthetic_marker` can result from normal request or client processing, not only client modification. Callers should tolerate unrecognized `type` values.
32142410
3215 - `ContentUnavailable object { reason, type }`
2411 - `ContentUnavailable object`
32162412
32172413 The turn's content cannot be returned; `content` is empty.
32182414
from line 2418
32222418
32232419 - `type: "content_unavailable"`
32242420
3225 - `"content_unavailable"`
3226
3227 - `ClientAsserted object { type }`
2421 default: content_unavailable
2422
2423 - `ClientAsserted object`
32282424
32292425 Assistant content the client supplied as conversation history
32302426 rather than produced by Claude during this session. `content` shows
from line 2430
32342430
32352431 - `type: "client_asserted"`
32362432
3237 - `"client_asserted"`
3238
3239 - `SyntheticMarker object { type }`
2433 default: client_asserted
2434
2435 - `SyntheticMarker object`
32402436
32412437 A transcript marker generated by the endpoint rather than sent by
32422438 either party during the session. Marker messages indicate that the
from line 2446
32502446
32512447 - `type: "synthetic_marker"`
32522448
3253 - `"synthetic_marker"`
2449 default: synthetic_marker
32542450
32552451 - `role: "assistant" or "user"`
32562452
from line 2458
32622458
32632459 - `type: "compliance_local_session_message"`
32642460
3265 - `"compliance_local_session_message"`
2461 default: compliance_local_session_message
32662462
32672463- `next_page: string or null`
32682464
32692465 Opaque pagination cursor (prefixed `page_`) for the next page. Null when there is no further page. Treat as an opaque string; the format may change without notice.
32702466
3271- `session: object { id, created_at, organization_uuid, 5 more }`
2467- `session: object`
32722468
32732469 The local session the messages belong to. `user.email_address` is always null on this endpoint; the messages endpoint does not resolve email addresses.
32742470
from line 2476
32802476
32812477 Timestamp of the session's first retained inference call (RFC 3339, UTC). When a session's activity spans the child organization's retention boundary, calls older than the boundary are no longer reflected, so this value is the timestamp of the earliest retained call: always strictly after the boundary, never the boundary itself.
32822478
2479 format: date-time
2480
32832481 - `organization_uuid: string`
32842482
32852483 UUID of the child organization the session belongs to
from line 2488
32902488
32912489 - `type: "compliance_local_session"`
32922490
3293 - `"compliance_local_session"`
2491 default: compliance_local_session
32942492
32952493 - `updated_at: string`
32962494
32972495 Timestamp of the session's last retained inference call (RFC 3339, UTC). Always at or after `created_at`. When a session's activity spans the child organization's retention boundary, calls older than the boundary are no longer reflected — but because retention removes only the oldest calls, this value (unlike `created_at`) is unaffected until the entire session has aged out. On the list endpoint this value is a lower bound: for a session still active at a page or `created_at.lt` window boundary it can momentarily lag the session's true last activity. Retrieving the session, or its messages, always reflects the exact latest retained call.
32982496
3299 - `user: object { id, email_address }`
2497 format: date-time
2498
2499 - `user: object`
33002500
33012501 The authenticated user at the time of the session. Always set; `user.id` is always populated. `user.email_address` is null when the user's account has been deleted or the user is no longer a member of an organization the key may read.
33022502
from line 2512
33122512
33132513 Workspace identifier (tagged ID, prefixed `wrkspc_`). Null for sessions not attributed to a workspace.
33142514
3315### Example
3316
3317```http
2515#### Example
2516
2517```bash
33182518curl https://api.anthropic.com/v1/compliance/apps/sessions/local/$LOCAL_SESSION_ID/messages \
33192519 -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY"
33202520```
33212521
3322#### Response
2522##### Response (200)
33232523
33242524```json
33252525{
from line 2560
33602560}
33612561```
33622562
3363## Domain Types
3364
3365### Message List Response
3366
3367- `MessageListResponse object { id, content, created_at, 4 more }`
3368
3369 A single user or assistant turn in a local session transcript.
3370
3371 - `id: string`
3372
3373 Message identifier, prefixed `clsm_`. Stable for as long as the message's turn is retained: identifiers of retained turns do not change as older turns age out of the organization's retention period. The `retention_elapsed` placeholder's identifier is distinct from every retained turn's and changes only when further turns age out.
3374
3375 - `content: array of object { text, truncated, type } or object { id, input, name, 2 more } or object { content, is_error, name, 3 more }`
3376
3377 Content blocks within the message, discriminated on `type` (`text` / `tool_use` / `tool_result`: the same discriminator values as the claude.ai chat-messages endpoint; the tool variants omit `integration_name` and `mcp_server_url`, and `text` carries `truncated`). Extended-thinking content is never included. The request's `system` field is never included; a presence-only marker message is emitted when it was set. The request's `tools[]` definitions are never included as transcript messages. Project-level instructions (such as CLAUDE.md files) appear in the message stream as a user-role context block and are included. Empty when `provenance.type` is `content_unavailable`.
3378
3379 - `Text object { text, truncated, type }`
3380
3381 Text content block.
3382
3383 - `text: string`
3384
3385 Text content from the user or the assistant
3386
3387 - `truncated: boolean`
3388
3389 True when `text` was shortened by the server's fixed per-string bound (approximately 1 MiB), or when ancillary content the block carried (such as citations) was omitted, or when this block stands in for a non-text block whose content is not shown, or when it is an explanatory marker the server inserted (its text enclosed in square brackets, e.g. prefacing client-asserted history). There is no request parameter that raises the per-string bound.
3390
3391 - `type: "text"`
3392
3393 - `"text"`
3394
3395 - `ToolUse object { id, input, name, 2 more }`
3396
3397 Tool invocation requested by the assistant.
3398
3399 - `id: string or null`
3400
3401 Tool-use ID, e.g. 'toolu_01AbC...'
3402
3403 - `input: string`
3404
3405 Arguments passed to the tool, as a JSON-encoded string. May be shortened (see the `truncated` field); a truncated value is cut mid-document and is not valid JSON.
3406
3407 - `name: string`
3408
3409 Name of the tool invoked
3410
3411 - `truncated: boolean`
3412
3413 True when `input` was shortened. Pass `tool_use_input_max_bytes=-1` to request the server maximum.
3414
3415 - `type: "tool_use"`
3416
3417 - `"tool_use"`
3418
3419 - `ToolResult object { content, is_error, name, 3 more }`
3420
3421 Result returned by a tool invocation.
3422
3423 - `content: array of object { text, type }`
3424
3425 Text content returned by the tool. Non-text item types are omitted and signalled via `truncated` with an in-band item-count marker.
3426
3427 - `text: string`
3428
3429 Text returned by the tool
3430
3431 - `type: "text"`
3432
3433 - `"text"`
3434
3435 - `is_error: boolean`
3436
3437 True when the tool reported an error
3438
3439 - `name: string`
3440
3441 Name of the tool that produced this result
3442
3443 - `tool_use_id: string or null`
3444
3445 ID of the tool_use block this result responds to
3446
3447 - `truncated: boolean`
3448
3449 True when one or more text items in `content` were shortened or non-text items were omitted. Pass `tool_result_max_bytes=-1` to request the server maximum.
3450
3451 - `type: "tool_result"`
3452
3453 - `"tool_result"`
3454
3455 - `created_at: string`
3456
3457 When the message was recorded (RFC 3339, UTC)
3458
3459 - `model: string or null`
3460
3461 The model that served this assistant turn, as reported in the `model` field of the underlying Messages API response. Null on user messages and on any assistant message whose `provenance` is set: client-asserted history and synthetic markers were not produced by a model during this session, and for unavailable content the serving model is not known.
3462
3463 - `provenance: object { reason, type } or object { type } or object { type } or null`
3464
3465 Where this turn's content came from, discriminated on `type`. Null (the common case) means verified content: on an assistant message, content Claude produced during this session; on a user message, content the user sent. `content_unavailable`: the turn's content cannot be returned and `content` is empty; `reason` says why. `client_asserted`: assistant content the client supplied as conversation history; `content` shows what the model received but its authorship is not verified; never on user-role messages. `synthetic_marker`: a transcript marker the endpoint generated rather than content either party sent during the session. Both `client_asserted` and `synthetic_marker` can result from normal request or client processing, not only client modification. Callers should tolerate unrecognized `type` values.
3466
3467 - `ContentUnavailable object { reason, type }`
3468
3469 The turn's content cannot be returned; `content` is empty.
3470
3471 - `reason: string`
3472
3473 Why this turn's content cannot be returned, e.g. `not_captured` (the content was not captured for compliance retrieval), `client_aborted` (the client closed the connection or cancelled the request before the response completed, so the response was not captured for this turn; any partial output already streamed to the client is not included; assistant-role turns only), `cmek_key_revoked` (the content is encrypted under the organization's customer-managed key and that key is unavailable), `retention_elapsed` (the content lies past the organization's retention boundary; on the placeholder standing in for every pre-boundary turn), or `oversize` (the message exceeds the server's per-message size bound even after per-block truncation). Callers should tolerate unrecognized values. `not_captured` is not proof that no record was stored: content withheld by the storage layer's fail-closed access policies carries the same reason and is deliberately indistinguishable from content that was never captured.
3474
3475 - `type: "content_unavailable"`
3476
3477 - `"content_unavailable"`
3478
3479 - `ClientAsserted object { type }`
3480
3481 Assistant content the client supplied as conversation history
3482 rather than produced by Claude during this session. `content` shows
3483 what the model received but its authorship is not verified; this can
3484 result from normal request or client processing, not only client
3485 modification. Never on user-role messages.
3486
3487 - `type: "client_asserted"`
3488
3489 - `"client_asserted"`
3490
3491 - `SyntheticMarker object { type }`
3492
3493 A transcript marker generated by the endpoint rather than sent by
3494 either party during the session. Marker messages indicate that the
3495 prompt history diverged from what was captured, that the request's
3496 `system` field was present but is not shown, or that
3497 prompt-carried history was suppressed because the session spans the
3498 child organization's retention boundary and those turns cannot be
3499 placed against it (the marker's text names the cause). Markers that
3500 report a mismatch with captured history can result from normal request
3501 or client processing, not only client modification.
3502
3503 - `type: "synthetic_marker"`
3504
3505 - `"synthetic_marker"`
3506
3507 - `role: "assistant" or "user"`
3508
3509 Message sender (`user` or `assistant`)
3510
3511 - `"assistant"`
3512
3513 - `"user"`
3514
3515 - `type: "compliance_local_session_message"`
3516
3517 - `"compliance_local_session_message"`
3518
3519# Remote
3520
3521## List remote sessions
3522
3523**get** `/v1/compliance/apps/sessions/remote`
2563## Apps › Sessions › Remote
2564
2565### List remote sessions
2566
2567**GET** `/v1/compliance/apps/sessions/remote`
35242568
35252569List remote sessions (Cowork sessions that run in Anthropic-managed
35262570cloud environments) across the organizations the key may read.
from line 2584
35402584forward-only: pass the response's `next_page` value back as `page` to
35412585retrieve the next page, and stop when `next_page` is null.
35422586
3543### Query Parameters
3544
3545- `created_at: optional object { gt, gte, lt, lte }`
2587#### Query parameters
2588
2589- `created_at: optional object`
35462590
35472591 - `gt: optional string`
35482592
35492593 Filter remote sessions created after this time (RFC 3339 format)
35502594
2595 format: date-time
2596
35512597 - `gte: optional string`
35522598
35532599 Filter remote sessions created at or after this time (RFC 3339 format)
35542600
2601 format: date-time
2602
35552603 - `lt: optional string`
35562604
35572605 Filter remote sessions created before this time (RFC 3339 format)
35582606
2607 format: date-time
2608
35592609 - `lte: optional string`
35602610
35612611 Filter remote sessions created at or before this time (RFC 3339 format)
35622612
2613 format: date-time
2614
35632615- `limit: optional number`
35642616
35652617 Maximum results (default: 100, max: 500)
35662618
2619 default: 100, maximum: 500, minimum: 1
2620
35672621- `organization_ids: optional array of string`
35682622
35692623 Filter to specific child organization identifiers. Omit to enumerate every child organization the key may read.
35702624
2625 maxItems: 500
2626
35712627- `page: optional string`
35722628
35732629 Opaque pagination token from a previous response's `next_page` field. Pass this to retrieve the next page of results. Clients should treat this value as an opaque string and not attempt to parse or interpret its contents, as the format may change without notice.
from line 2632
35762632
35772633 Filter to sessions owned by specific users (max 10 per request). Agent-owned sessions are excluded when this filter is set.
35782634
3579### Header Parameters
2635 maxItems: 10
2636
2637#### Headers
35802638
35812639- `"x-api-key": optional string`
35822640
3583### Returns
3584
3585- `data: array of object { id, agent_id, claude_project_id, 7 more }`
2641#### Returns
2642
2643- `data: array of object`
35862644
35872645 - `id: string`
35882646
from line 2658
36002658
36012659 When the session was created (RFC 3339, UTC)
36022660
2661 format: date-time
2662
36032663 - `organization_uuid: string`
36042664
36052665 UUID of the organization the session belongs to
from line 2668
36082668
36092669 The Claude product the session was created from. Currently `cowork_remote`, for Cowork sessions started on claude.ai web or mobile. More values will appear as other surfaces launch, so treat any unrecognized value as an unclassified surface rather than an error. Null for sessions created before this field was recorded, for surfaces that do not stamp it, and for unrecognized tag values.
36102670
3611 - `started_by_user: object { id, email_address } or null`
2671 - `started_by_user: object or null`
36122672
36132673 A user associated with a remote session.
36142674
from line 2688
36282688
36292689 When the session was last modified (RFC 3339, UTC)
36302690
3631 - `user: object { id, email_address } or null`
2691 format: date-time
2692
2693 - `user: object or null`
36322694
36332695 A user associated with a remote session.
36342696
from line 2706
36442706
36452707 Opaque page token; pass as `page` to retrieve the next page. Null when no rows exist after this page. Treat this value as opaque; do not parse or store it long-term, as the format may change without notice.
36462708
3647### Example
3648
3649```http
2709#### Example
2710
2711```bash
36502712curl https://api.anthropic.com/v1/compliance/apps/sessions/remote \
36512713 -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY"
36522714```
36532715
3654#### Response
2716##### Response (200)
36552717
36562718```json
36572719{
from line 2736
36742736}
36752737```
36762738
3677## Domain Types
3678
3679### Remote List Response
3680
3681- `RemoteListResponse object { id, agent_id, claude_project_id, 7 more }`
3682
3683 Metadata for one remote session, as returned in the list response
3684 and in the messages response's `session` field.
3685
3686 Carries session attributes only, not transcript content. Use the
3687 messages endpoint to retrieve a session's transcript.
3688
3689 - `id: string`
3690
3691 Remote session identifier
3692
3693 - `agent_id: string or null`
3694
3695 Identifier of the automated agent that owns the session. Null for user-owned sessions. At most one of `user` and `agent_id` is set.
3696
3697 - `claude_project_id: string or null`
3698
3699 ID of the project the session is bound to. Null when the session has no project binding.
3700
3701 - `created_at: string`
3702
3703 When the session was created (RFC 3339, UTC)
3704
3705 - `organization_uuid: string`
3706
3707 UUID of the organization the session belongs to
3708
3709 - `product_surface: string or null`
3710
3711 The Claude product the session was created from. Currently `cowork_remote`, for Cowork sessions started on claude.ai web or mobile. More values will appear as other surfaces launch, so treat any unrecognized value as an unclassified surface rather than an error. Null for sessions created before this field was recorded, for surfaces that do not stamp it, and for unrecognized tag values.
3712
3713 - `started_by_user: object { id, email_address } or null`
3714
3715 A user associated with a remote session.
3716
3717 - `id: string`
3718
3719 User identifier
3720
3721 - `email_address: string or null`
3722
3723 User's email address. Null when the user is no longer a member of an organization the key may read — `id` remains set so attribution is preserved. The messages endpoint does not resolve email addresses; this field is always null there.
3724
3725 - `status: string`
3726
3727 Session lifecycle state. One of `active`, `paused`, `archived`, or `failed` — the lifecycle states the owning product surface exposes — plus `pending`, a brief transient state that resolves before any transcript content exists. The list endpoint includes `pending`; the messages endpoint returns 404 for it. Deleted sessions are not returned on either endpoint. Treat unrecognized values as an unknown state rather than an error.
3728
3729 - `updated_at: string`
3730
3731 When the session was last modified (RFC 3339, UTC)
3732
3733 - `user: object { id, email_address } or null`
3734
3735 A user associated with a remote session.
3736
3737 - `id: string`
3738
3739 User identifier
3740
3741 - `email_address: string or null`
3742
3743 User's email address. Null when the user is no longer a member of an organization the key may read — `id` remains set so attribution is preserved. The messages endpoint does not resolve email addresses; this field is always null there.
3744
3745# Messages
3746
3747## Retrieve remote session messages
3748
3749**get** `/v1/compliance/apps/sessions/remote/{claude_remote_session_id}/messages`
2739## Apps › Sessions › Remote › Messages
2740
2741### Retrieve remote session messages
2742
2743**GET** `/v1/compliance/apps/sessions/remote/{claude_remote_session_id}/messages`
37502744
37512745Retrieve one remote session's transcript: user prompts, assistant
37522746responses, and tool calls and results. Thinking blocks and images are
from line 2763
37692763and for sessions outside the organizations the key may read. A
37702764malformed session identifier returns 400.
37712765
3772### Path Parameters
2766#### Path parameters
37732767
37742768- `claude_remote_session_id: string`
37752769
37762770 The remote session identifier (`cse_...`) to retrieve
37772771
3778### Query Parameters
2772#### Query parameters
37792773
37802774- `limit: optional number`
37812775
37822776 Maximum results (default: 100, max: 1000)
37832777
2778 default: 100, maximum: 1000, minimum: 1
2779
37842780- `order: optional "asc" or "desc"`
37852781
37862782 Sort direction. `asc` (oldest-first) or `desc`.
37872783
2784 default: asc
2785
37882786 - `"asc"`
37892787
37902788 - `"desc"`
from line 2795
37972795
37982796 Truncate each text item inside a tool result to at most this many bytes (cut on a code-point boundary). Pass `-1` to request the server maximum. `0` is not a valid value.
37992797
2798 default: 10000, maximum: 2147483647, minimum: -1
2799
38002800- `tool_use_input_max_bytes: optional number`
38012801
38022802 Truncate each tool-use input to at most this many bytes (cut on a code-point boundary so the result is valid UTF-8). Pass `-1` to request the server maximum. `0` is not a valid value.
38032803
3804### Header Parameters
2804 default: 10000, maximum: 2147483647, minimum: -1
2805
2806#### Headers
38052807
38062808- `"x-api-key": optional string`
38072809
3808### Returns
3809
3810- `data: array of object { id, content, content_unavailable, 3 more }`
2810#### Returns
2811
2812- `data: array of object`
38112813
38122814 Transcript turns for this page, ordered by transcript position. `created_at` is a commit timestamp and may tie or invert under concurrent writes; do not re-sort by it.
38132815
from line 2817
38152817
38162818 Unique identifier for the message, e.g. `csev_abc123`
38172819
3818 - `content: array of object { text, truncated, type } or object { id, input, name, 2 more } or object { content, is_error, name, 3 more }`
2820 - `content: array of object or object or object`
38192821
38202822 Content blocks within the message
38212823
3822 - `Text object { text, truncated, type }`
2824 - `Text object`
38232825
38242826 Text content block.
38252827
from line 2833
38312833
38322834 True when `text` exceeded the server-defined maximum (approximately 1 MiB) and was shortened.
38332835
2836 default: false
2837
38342838 - `type: "text"`
38352839
3836 - `"text"`
3837
3838 - `ToolUse object { id, input, name, 2 more }`
2840 default: text
2841
2842 - `ToolUse object`
38392843
38402844 Tool invocation requested by the assistant.
38412845
from line 2859
38552859
38562860 True when `input` was shortened. Pass `tool_use_input_max_bytes=-1` to request full content, subject to the server-side maximum.
38572861
2862 default: false
2863
38582864 - `type: "tool_use"`
38592865
3860 - `"tool_use"`
3861
3862 - `ToolResult object { content, is_error, name, 3 more }`
2866 default: tool_use
2867
2868 - `ToolResult object`
38632869
38642870 Result returned by a tool invocation.
38652871
3866 - `content: array of object { text, type }`
2872 - `content: array of object`
38672873
38682874 Text content returned by the tool. Non-text item types are omitted.
38692875
from line 2879
38732879
38742880 - `type: "text"`
38752881
3876 - `"text"`
2882 default: text
38772883
38782884 - `is_error: boolean`
38792885
from line 2897
38912897
38922898 True when one or more text items in `content` were shortened. Pass `tool_result_max_bytes=-1` to request full content, subject to the server-side maximum.
38932899
2900 default: false
2901
38942902 - `type: "tool_result"`
38952903
3896 - `"tool_result"`
2904 default: tool_result
38972905
38982906 - `content_unavailable: boolean`
38992907
39002908 True when the stored content could not be returned — it could not be decrypted, or it exceeded the server's per-event size bound. `content` is empty in that case; this distinguishes 'no content' from 'content withheld'.
39012909
2910 default: false
2911
39022912 - `created_at: string`
39032913
39042914 When the message was recorded (RFC 3339, UTC)
39052915
2916 format: date-time
2917
39062918 - `role: "assistant" or "user"`
39072919
39082920 Message sender (`user` or `assistant`)
from line 2931
39192931
39202932 Opaque page token; pass as `page` to retrieve the next page. Null when no rows exist after this page. Treat this value as opaque; do not parse or store it long-term, as the format may change without notice.
39212933
3922- `session: object { id, agent_id, claude_project_id, 7 more }`
2934- `session: object`
39232935
39242936 Session metadata. `started_by_user`, `user.email_address`, and `claude_project_id` are always null on this endpoint; the messages endpoint resolves neither email addresses nor project bindings.
39252937
from line 2951
39392951
39402952 When the session was created (RFC 3339, UTC)
39412953
2954 format: date-time
2955
39422956 - `organization_uuid: string`
39432957
39442958 UUID of the organization the session belongs to
from line 2961
39472961
39482962 The Claude product the session was created from. Currently `cowork_remote`, for Cowork sessions started on claude.ai web or mobile. More values will appear as other surfaces launch, so treat any unrecognized value as an unclassified surface rather than an error. Null for sessions created before this field was recorded, for surfaces that do not stamp it, and for unrecognized tag values.
39492963
3950 - `started_by_user: object { id, email_address } or null`
2964 - `started_by_user: object or null`
39512965
39522966 A user associated with a remote session.
39532967
from line 2981
39672981
39682982 When the session was last modified (RFC 3339, UTC)
39692983
3970 - `user: object { id, email_address } or null`
2984 format: date-time
2985
2986 - `user: object or null`
39712987
39722988 A user associated with a remote session.
39732989
from line 2995
39792995
39802996 User's email address. Null when the user is no longer a member of an organization the key may read — `id` remains set so attribution is preserved. The messages endpoint does not resolve email addresses; this field is always null there.
39812997
3982### Example
3983
3984```http
2998#### Example
2999
3000```bash
39853001curl https://api.anthropic.com/v1/compliance/apps/sessions/remote/$CLAUDE_REMOTE_SESSION_ID/messages \
39863002 -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY"
39873003```
39883004
3989#### Response
3005##### Response (200)
39903006
39913007```json
39923008{
from line 3043
40273043 }
40283044}
40293045```
4030
4031## Domain Types
4032
4033### Message List Response
4034
4035- `MessageListResponse object { id, content, content_unavailable, 3 more }`
4036
4037 A single user or assistant turn in a remote session transcript.
4038
4039 `content` is a discriminated union of `text`, `tool_use`, and
4040 `tool_result` blocks.
4041
4042 - `id: string`
4043
4044 Unique identifier for the message, e.g. `csev_abc123`
4045
4046 - `content: array of object { text, truncated, type } or object { id, input, name, 2 more } or object { content, is_error, name, 3 more }`
4047
4048 Content blocks within the message
4049
4050 - `Text object { text, truncated, type }`
4051
4052 Text content block.
4053
4054 - `text: string`
4055
4056 Text content from the user or the assistant
4057
4058 - `truncated: boolean`
4059
4060 True when `text` exceeded the server-defined maximum (approximately 1 MiB) and was shortened.
4061
4062 - `type: "text"`
4063
4064 - `"text"`
4065
4066 - `ToolUse object { id, input, name, 2 more }`
4067
4068 Tool invocation requested by the assistant.
4069
4070 - `id: string or null`
4071
4072 Tool-use ID, e.g. 'toolu_01AbC...'
4073
4074 - `input: string`
4075
4076 Arguments passed to the tool, as a JSON-encoded string. May be shortened — see the `truncated` field
4077
4078 - `name: string`
4079
4080 Name of the tool invoked
4081
4082 - `truncated: boolean`
4083
4084 True when `input` was shortened. Pass `tool_use_input_max_bytes=-1` to request full content, subject to the server-side maximum.
4085
4086 - `type: "tool_use"`
4087
4088 - `"tool_use"`
4089
4090 - `ToolResult object { content, is_error, name, 3 more }`
4091
4092 Result returned by a tool invocation.
4093
4094 - `content: array of object { text, type }`
4095
4096 Text content returned by the tool. Non-text item types are omitted.
4097
4098 - `text: string`
4099
4100 Text returned by the tool
4101
4102 - `type: "text"`
4103
4104 - `"text"`
4105
4106 - `is_error: boolean`
4107
4108 True when the tool reported an error
4109
4110 - `name: string`
4111
4112 Name of the tool that produced this result
4113
4114 - `tool_use_id: string or null`
4115
4116 ID of the tool_use block this result responds to
4117
4118 - `truncated: boolean`
4119
4120 True when one or more text items in `content` were shortened. Pass `tool_result_max_bytes=-1` to request full content, subject to the server-side maximum.
4121
4122 - `type: "tool_result"`
4123
4124 - `"tool_result"`
4125
4126 - `content_unavailable: boolean`
4127
4128 True when the stored content could not be returned — it could not be decrypted, or it exceeded the server's per-event size bound. `content` is empty in that case; this distinguishes 'no content' from 'content withheld'.
4129
4130 - `created_at: string`
4131
4132 When the message was recorded (RFC 3339, UTC)
4133
4134 - `role: "assistant" or "user"`
4135
4136 Message sender (`user` or `assistant`)
4137
4138 - `"assistant"`
4139
4140 - `"user"`
4141
4142 - `sent_by_user_id: string or null`
4143
4144 Identifier of the human account that sent this turn on an agent-owned session. Null on user-owned sessions, where every user-role turn was sent by the session's `user`.
41453046
No line in this hunk matches that.