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: Chats
3url: https://platform.claude.com/docs/en/api/compliance/apps/chats
4---
5
61# Chats
72
83## List chats
94
10**get** `/v1/compliance/apps/chats`
5**GET** `/v1/compliance/apps/chats`
116
127Lists chat metadata with filtering capabilities for targeted
138compliance review. Results are sorted chronologically (time ascending)
from line 17
2217no time filter) with the default `order_by`. `user_ids[]` with
2318`order_by=updated_at` is already rejected.
2419
25### Query Parameters
20### Query parameters
2621
2722- `after_id: optional string`
2823
from line 27
3227
3328 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.
3429
35- `created_at: optional object { gt, gte, lt, lte }`
30- `created_at: optional object`
3631
3732 - `gt: optional string`
3833
3934 Filter chats created after this time (RFC 3339 format)
4035
36 format: date-time
37
4138 - `gte: optional string`
4239
4340 Filter chats created at or after this time (RFC 3339 format)
4441
42 format: date-time
43
4544 - `lt: optional string`
4645
4746 Filter chats created before this time (RFC 3339 format)
4847
48 format: date-time
49
4950 - `lte: optional string`
5051
5152 Filter chats created at or before this time (RFC 3339 format)
5253
54 format: date-time
55
5356- `limit: optional number`
5457
5558 Maximum results (default: 100, max: 1000)
5659
60 default: 100, maximum: 1000, minimum: 1
61
5762- `order_by: optional "created_at" or "updated_at"`
5863
5964 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`.
6065
66 default: created_at
67
6168 - `"created_at"`
6269
6370 - `"updated_at"`
from line 77
7077
7178 Filter by project IDs (accepts `claude_proj_...`). Enumerate IDs via `GET /v1/compliance/apps/projects`. Requires user_ids[]; not supported for org-wide queries.
7279
73- `updated_at: optional object { gt, gte, lt, lte }`
80- `updated_at: optional object`
7481
7582 - `gt: optional string`
7683
7784 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.
7885
86 format: date-time
87
7988 - `gte: optional string`
8089
8190 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.
8291
92 format: date-time
93
8394 - `lt: optional string`
8495
8596 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.
8697
98 format: date-time
99
87100 - `lte: optional string`
88101
89102 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.
90103
104 format: date-time
105
91106- `user_ids: optional array of string`
92107
93108 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.
94109
95### Header Parameters
110 maxItems: 10
111
112### Headers
96113
97114- `"x-api-key": optional string`
98115
99116### Returns
100117
101- `data: array of object { id, created_at, deleted_at, 8 more }`
118- `data: array of object`
102119
103120 List of chat metadata sorted chronologically by the request's `order_by` key (default `created_at`), tie break by id
104121
from line 127
110127
111128 Creation timestamp
112129
130 format: date-time
131
113132 - `deleted_at: string or null`
114133
115134 Deletion timestamp if deleted
116135
136 format: date-time
137
117138 - `href: string`
118139
119140 URL to view this chat in claude.ai
from line 147
126147
127148 Chat name/title
128149
150 - `organization_uuid: string`
151
152 Organization UUID this chat belongs to
153
154 - `project_id: string or null`
155
156 Project ID this chat belongs to
157
158 - `updated_at: string`
159
160 Last update timestamp
161
162 format: date-time
163
164 - `user: object or null`
165
166 User information for compliance responses.
167
168 - `id: string`
169
170 User identifier
171
172 - `email_address: string`
173
174 User's email address
175
129176 - `organization_id: string`
130177
178 **Deprecated**
179
131180 Organization ID this chat belongs to
132181
133 - `organization_uuid: string`
134
135 Organization UUID this chat belongs to
136
137 - `project_id: string or null`
138
139 Project ID this chat belongs to
140
141 - `updated_at: string`
142
143 Last update timestamp
144
145 - `user: object { id, email_address } or null`
146
147 User information for compliance responses.
148
149 - `id: string`
150
151 User identifier
152
153 - `email_address: string`
154
155 User's email address
156
157182- `first_id: string or null`
158183
159184 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### Example
170195
171```http
196```bash
172197curl https://api.anthropic.com/v1/compliance/apps/chats \
173198 -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY"
174199```
175200
176#### Response
201#### Response (200)
177202
178203```json
179204{
from line 227
202227
203228## Delete chat
204229
205**delete** `/v1/compliance/apps/chats/{claude_chat_id}`
230**DELETE** `/v1/compliance/apps/chats/{claude_chat_id}`
206231
207232Permanently deletes a chat and all associated messages and
208233files. This is a destructive operation that cannot be undone.
209234
210### Path Parameters
235### Path parameters
211236
212237- `claude_chat_id: string`
213238
214239 The chat ID (tagged ID, e.g., claude_chat_abc123)
215240
216### Header Parameters
241### Headers
217242
218243- `"x-api-key": optional string`
219244
from line 252
227252
228253 Constant string confirming deletion
229254
230 - `"claude_chat_deleted"`
255 default: claude_chat_deleted
231256
232257### Example
233258
234```http
259```bash
235260curl https://api.anthropic.com/v1/compliance/apps/chats/$CLAUDE_CHAT_ID \
236261 -X DELETE \
237262 -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY"
238263```
239264
240#### Response
265#### Response (200)
241266
242267```json
243268{
from line 271
246271}
247272```
248273
249## Domain Types
274## Domain types
250275
251276### Chat List Response
252277
253- `ChatListResponse object { id, created_at, deleted_at, 8 more }`
278- `ChatListResponse object`
254279
255280 Chat metadata for listing chats (without messages).
256281
from line 287
262287
263288 Creation timestamp
264289
290 format: date-time
291
265292 - `deleted_at: string or null`
266293
267294 Deletion timestamp if deleted
268295
296 format: date-time
297
269298 - `href: string`
270299
271300 URL to view this chat in claude.ai
from line 307
278307
279308 Chat name/title
280309
310 - `organization_uuid: string`
311
312 Organization UUID this chat belongs to
313
314 - `project_id: string or null`
315
316 Project ID this chat belongs to
317
318 - `updated_at: string`
319
320 Last update timestamp
321
322 format: date-time
323
324 - `user: object or null`
325
326 User information for compliance responses.
327
328 - `id: string`
329
330 User identifier
331
332 - `email_address: string`
333
334 User's email address
335
281336 - `organization_id: string`
282337
338 **Deprecated**
339
283340 Organization ID this chat belongs to
284341
285 - `organization_uuid: string`
286
287 Organization UUID this chat belongs to
288
289 - `project_id: string or null`
290
291 Project ID this chat belongs to
292
293 - `updated_at: string`
294
295 Last update timestamp
296
297 - `user: object { id, email_address } or null`
298
299 User information for compliance responses.
342### Chat Delete Response
343
344- `ChatDeleteResponse object`
345
346 Response for deleting a Claude chat.
347
348 - `id: string`
349
350 The ID of the Claude chat that was deleted
351
352 - `type: optional "claude_chat_deleted"`
353
354 Constant string confirming deletion
355
356 default: claude_chat_deleted
357
358## Chats › Messages
359
360### Get chat messages
361
362**GET** `/v1/compliance/apps/chats/{claude_chat_id}/messages`
363
364Retrieves message history and file metadata for a specific chat.
365
366#### Path parameters
367
368- `claude_chat_id: string`
369
370 The chat ID (tagged ID, e.g., claude_chat_abc123)
371
372#### Query parameters
373
374- `after_id: optional string`
375
376 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.
377
378- `before_id: optional string`
379
380 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.
381
382- `created_at: optional object`
383
384 - `gt: optional string`
385
386 Filter messages created after this time (RFC 3339 format)
387
388 format: date-time
389
390 - `gte: optional string`
391
392 Filter messages created at or after this time (RFC 3339 format)
393
394 format: date-time
395
396 - `lt: optional string`
397
398 Filter messages created before this time (RFC 3339 format)
399
400 format: date-time
401
402 - `lte: optional string`
403
404 Filter messages created at or before this time (RFC 3339 format)
405
406 format: date-time
407
408- `limit: optional number`
409
410 Maximum results (max: 1000). When omitted, the full result set is returned in one response.
411
412 maximum: 1000, minimum: 1
413
414- `order: optional "asc" or "desc"`
415
416 Sort direction for messages within the response. `asc` (the default) returns oldest-first; `desc` returns newest-first.
417
418 default: asc
419
420 - `"asc"`
421
422 - `"desc"`
423
424- `tool_result_max_chars: optional number`
425
426 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.
427
428 default: 10000, minimum: -1
429
430- `tool_use_input_max_chars: optional number`
431
432 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.
433
434 default: 10000, minimum: -1
435
436- `updated_at: optional object`
437
438 - `gt: optional string`
439
440 Filter messages updated after this time (RFC 3339 format)
441
442 format: date-time
443
444 - `gte: optional string`
445
446 Filter messages updated at or after this time (RFC 3339 format)
447
448 format: date-time
449
450 - `lt: optional string`
451
452 Filter messages updated before this time (RFC 3339 format)
453
454 format: date-time
455
456 - `lte: optional string`
457
458 Filter messages updated at or before this time (RFC 3339 format)
459
460 format: date-time
461
462#### Headers
463
464- `"x-api-key": optional string`
465
466#### Returns
467
468- `id: string`
469
470 Chat ID
471
472- `chat_messages: array of object`
473
474 Array of chat messages in order of created_at
475
476 - `id: string`
477
478 Unique identifier for the message e.g. 'claude_chat_msg_abcd1234'
479
480 - `artifacts: array of object or null`
481
482 Versioned documents generated or updated by the assistant in this message. Download via `GET /v1/compliance/apps/artifacts/{artifact_version_id}/content`.
300483
301484 - `id: string`
302485
303 User identifier
304
305 - `email_address: string`
306
307 User's email address
308
309### Chat Delete Response
310
311- `ChatDeleteResponse object { id, type }`
312
313 Response for deleting a Claude chat.
486 Artifact ID e.g. 'claude_artifact_abc123'
487
488 - `artifact_type: string or null`
489
490 MIME-like artifact type e.g. 'application/vnd.ant.code'
491
492 - `title: string or null`
493
494 Artifact title
495
496 - `version_id: string`
497
498 Artifact version ID e.g. 'claude_artifact_version_abc123'
499
500 - `content: array of object or object or object`
501
502 Content blocks within the message
503
504 - `Text object`
505
506 Text content block.
507
508 - `text: string`
509
510 Text content from human or assistant
511
512 - `thinking_redacted: boolean`
513
514 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.
515
516 default: false
517
518 - `truncated: boolean`
519
520 True when `text` was shortened by the server's fixed per-string bound (1 MiB). Always false on chat text blocks.
521
522 default: false
523
524 - `type: "text"`
525
526 default: text
527
528 - `ToolUse object`
529
530 Tool invocation requested by the assistant.
531
532 - `id: string or null`
533
534 Tool-use ID, e.g. 'toolu_01AbC...'
535
536 - `input: string`
537
538 Arguments passed to the tool, as a JSON-encoded string. May be shortened — see the `truncated` field
539
540 - `integration_name: string or null`
541
542 Name of the integration that provides this tool, when applicable
543
544 - `mcp_server_url: string or null`
545
546 Base URL (scheme, host, and path only) of the MCP server that provides this tool, when applicable
547
548 - `name: string`
549
550 Name of the tool invoked
551
552 - `truncated: boolean`
553
554 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.
555
556 default: false
557
558 - `type: "tool_use"`
559
560 default: tool_use
561
562 - `ToolResult object`
563
564 Result returned by a tool invocation.
565
566 - `content: array of object`
567
568 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.
569
570 - `text: string`
571
572 Text returned by the tool
573
574 - `type: "text"`
575
576 default: text
577
578 - `integration_name: string or null`
579
580 Name of the integration that provides this tool, when applicable
581
582 - `is_error: boolean`
583
584 True when the tool reported an error
585
586 - `mcp_server_url: string or null`
587
588 Base URL (scheme, host, and path only) of the MCP server that provides this tool, when applicable
589
590 - `name: string`
591
592 Name of the tool that produced this result
593
594 - `tool_use_id: string or null`
595
596 ID of the tool_use block this result responds to
597
598 - `truncated: boolean`
599
600 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.
601
602 default: false
603
604 - `type: "tool_result"`
605
606 default: tool_result
607
608 - `created_at: string`
609
610 Message creation timestamp - For human: when they sent the message, For assistant: when it completed the last content block
611
612 format: date-time
613
614 - `files: array of object or null`
615
616 Binary file attachments uploaded by the user. Download via `GET /v1/compliance/apps/chats/files/{claude_file_id}/content`.
617
618 - `id: string`
619
620 File ID
621
622 - `created_at: string`
623
624 File creation timestamp
625
626 format: date-time
627
628 - `filename: string`
629
630 Display name of the file
631
632 - `md5: string or null`
633
634 Lowercase hex MD5 of the file's preferred downloadable variant, as recorded at upload time. Null when no stored hash is available.
635
636 - `mime_type: string or null`
637
638 MIME type of the file's preferred downloadable variant (e.g. 'application/pdf')
639
640 - `size_bytes: number or null`
641
642 Size in bytes of the file's preferred downloadable variant, if known. Null for older files uploaded before size was recorded.
643
644 - `generated_files: array of object or null`
645
646 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`.
647
648 - `id: string`
649
650 Opaque generated-file id, e.g. 'claude_gen_file_abc123'. Treat as an opaque string; the encoding may change without notice.
651
652 - `filename: string`
653
654 Display name of the generated file
655
656 - `md5: string or null`
657
658 Lowercase hex MD5 of the generated file, when available. Null when no stored hash is available.
659
660 - `mime_type: string or null`
661
662 MIME type reported by the tool that produced the file
663
664 - `size_bytes: number or null`
665
666 Size in bytes of the generated file, when available. Null when the file has expired or size is not recorded.
667
668 - `role: "assistant" or "user"`
669
670 Message sender (user or assistant)
671
672 - `"assistant"`
673
674 - `"user"`
675
676- `created_at: string`
677
678 Creation timestamp
679
680 format: date-time
681
682- `deleted_at: string or null`
683
684 Deletion timestamp if deleted
685
686 format: date-time
687
688- `first_id: string or null`
689
690 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.
691
692- `has_more: boolean`
693
694 Whether more chat messages exist beyond the current result set. Use `last_id` as `after_id` in a follow-up request to page forward.
695
696 default: false
697
698- `href: string`
699
700 URL to view this chat in claude.ai
701
702- `last_id: string or null`
703
704 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.
705
706- `model: string or null`
707
708 Model selected for this chat (e.g. 'claude-opus-5'). May be null for legacy chats that never had a model recorded.
709
710- `name: string`
711
712 Chat name
713
714- `organization_uuid: string`
715
716 Organization UUID this chat belongs to
717
718- `project_id: string or null`
719
720 Project ID this chat belongs to
721
722- `updated_at: string`
723
724 Last update timestamp
725
726 format: date-time
727
728- `user: object or null`
729
730 User information for compliance responses.
314731
315732 - `id: string`
316733
317 The ID of the Claude chat that was deleted
318
319 - `type: optional "claude_chat_deleted"`
320
321 Constant string confirming deletion
322
323 - `"claude_chat_deleted"`
324
325# Messages
326
327## Get chat messages
328
329**get** `/v1/compliance/apps/chats/{claude_chat_id}/messages`
330
331Retrieves message history and file metadata for a specific chat.
332
333### Path Parameters
334
335- `claude_chat_id: string`
336
337 The chat ID (tagged ID, e.g., claude_chat_abc123)
338
339### Query Parameters
340
341- `after_id: optional string`
342
343 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.
344
345- `before_id: optional string`
346
347 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.
348
349- `created_at: optional object { gt, gte, lt, lte }`
350
351 - `gt: optional string`
352
353 Filter messages created after this time (RFC 3339 format)
354
355 - `gte: optional string`
356
357 Filter messages created at or after this time (RFC 3339 format)
358
359 - `lt: optional string`
360
361 Filter messages created before this time (RFC 3339 format)
362
363 - `lte: optional string`
364
365 Filter messages created at or before this time (RFC 3339 format)
366
367- `limit: optional number`
368
369 Maximum results (max: 1000). When omitted, the full result set is returned in one response.
370
371- `order: optional "asc" or "desc"`
372
373 Sort direction for messages within the response. `asc` (the default) returns oldest-first; `desc` returns newest-first.
374
375 - `"asc"`
376
377 - `"desc"`
378
379- `tool_result_max_chars: optional number`
380
381 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.
382
383- `tool_use_input_max_chars: optional number`
384
385 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.
386
387- `updated_at: optional object { gt, gte, lt, lte }`
388
389 - `gt: optional string`
390
391 Filter messages updated after this time (RFC 3339 format)
392
393 - `gte: optional string`
394
395 Filter messages updated at or after this time (RFC 3339 format)
396
397 - `lt: optional string`
398
399 Filter messages updated before this time (RFC 3339 format)
400
401 - `lte: optional string`
402
403 Filter messages updated at or before this time (RFC 3339 format)
404
405### Header Parameters
406
407- `"x-api-key": optional string`
408
409### Returns
410
411- `id: string`
412
413 Chat ID
414
415- `chat_messages: array of object { id, artifacts, content, 4 more }`
416
417 Array of chat messages in order of created_at
418
419 - `id: string`
420
421 Unique identifier for the message e.g. 'claude_chat_msg_abcd1234'
422
423 - `artifacts: array of object { id, artifact_type, title, version_id } or null`
424
425 Versioned documents generated or updated by the assistant in this message. Download via `GET /v1/compliance/apps/artifacts/{artifact_version_id}/content`.
426
427 - `id: string`
428
429 Artifact ID e.g. 'claude_artifact_abc123'
430
431 - `artifact_type: string or null`
432
433 MIME-like artifact type e.g. 'application/vnd.ant.code'
434
435 - `title: string or null`
436
437 Artifact title
438
439 - `version_id: string`
440
441 Artifact version ID e.g. 'claude_artifact_version_abc123'
442
443 - `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 }`
444
445 Content blocks within the message
446
447 - `Text object { text, thinking_redacted, truncated, type }`
448
449 Text content block.
450
451 - `text: string`
452
453 Text content from human or assistant
454
455 - `thinking_redacted: boolean`
456
457 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.
458
459 - `truncated: boolean`
460
461 True when `text` was shortened by the server's fixed per-string bound (1 MiB). Always false on chat text blocks.
462
463 - `type: "text"`
464
465 - `"text"`
466
467 - `ToolUse object { id, input, integration_name, 4 more }`
468
469 Tool invocation requested by the assistant.
470
471 - `id: string or null`
472
473 Tool-use ID, e.g. 'toolu_01AbC...'
474
475 - `input: string`
476
477 Arguments passed to the tool, as a JSON-encoded string. May be shortened — see the `truncated` field
478
479 - `integration_name: string or null`
480
481 Name of the integration that provides this tool, when applicable
482
483 - `mcp_server_url: string or null`
484
485 Base URL (scheme, host, and path only) of the MCP server that provides this tool, when applicable
486
487 - `name: string`
488
489 Name of the tool invoked
490
491 - `truncated: boolean`
492
493 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.
494
495 - `type: "tool_use"`
496
497 - `"tool_use"`
498
499 - `ToolResult object { content, integration_name, is_error, 5 more }`
500
501 Result returned by a tool invocation.
502
503 - `content: array of object { text, type }`
504
505 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.
506
507 - `text: string`
508
509 Text returned by the tool
510
511 - `type: "text"`
512
513 - `"text"`
514
515 - `integration_name: string or null`
516
517 Name of the integration that provides this tool, when applicable
518
519 - `is_error: boolean`
520
521 True when the tool reported an error
522
523 - `mcp_server_url: string or null`
524
525 Base URL (scheme, host, and path only) of the MCP server that provides this tool, when applicable
526
527 - `name: string`
528
529 Name of the tool that produced this result
530
531 - `tool_use_id: string or null`
532
533 ID of the tool_use block this result responds to
534
535 - `truncated: boolean`
536
537 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.
538
539 - `type: "tool_result"`
540
541 - `"tool_result"`
542
543 - `created_at: string`
544
545 Message creation timestamp - For human: when they sent the message, For assistant: when it completed the last content block
546
547 - `files: array of object { id, created_at, filename, 3 more } or null`
548
549 Binary file attachments uploaded by the user. Download via `GET /v1/compliance/apps/chats/files/{claude_file_id}/content`.
550
551 - `id: string`
552
553 File ID
554
555 - `created_at: string`
556
557 File creation timestamp
558
559 - `filename: string`
560
561 Display name of the file
562
563 - `md5: string or null`
564
565 Lowercase hex MD5 of the file's preferred downloadable variant, as recorded at upload time. Null when no stored hash is available.
566
567 - `mime_type: string or null`
568
569 MIME type of the file's preferred downloadable variant (e.g. 'application/pdf')
570
571 - `size_bytes: number or null`
572
573 Size in bytes of the file's preferred downloadable variant, if known. Null for older files uploaded before size was recorded.
574
575 - `generated_files: array of object { id, filename, md5, 2 more } or null`
576
577 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`.
578
579 - `id: string`
580
581 Opaque generated-file id, e.g. 'claude_gen_file_abc123'. Treat as an opaque string; the encoding may change without notice.
582
583 - `filename: string`
584
585 Display name of the generated file
586
587 - `md5: string or null`
588
589 Lowercase hex MD5 of the generated file, when available. Null when no stored hash is available.
590
591 - `mime_type: string or null`
592
593 MIME type reported by the tool that produced the file
594
595 - `size_bytes: number or null`
596
597 Size in bytes of the generated file, when available. Null when the file has expired or size is not recorded.
598
599 - `role: "assistant" or "user"`
600
601 Message sender (user or assistant)
602
603 - `"assistant"`
604
605 - `"user"`
606
607- `created_at: string`
608
609 Creation timestamp
610
611- `deleted_at: string or null`
612
613 Deletion timestamp if deleted
614
615- `first_id: string or null`
616
617 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.
618
619- `has_more: boolean`
620
621 Whether more chat messages exist beyond the current result set. Use `last_id` as `after_id` in a follow-up request to page forward.
622
623- `href: string`
624
625 URL to view this chat in claude.ai
626
627- `last_id: string or null`
628
629 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.
630
631- `model: string or null`
632
633 Model selected for this chat (e.g. 'claude-opus-5'). May be null for legacy chats that never had a model recorded.
634
635- `name: string`
636
637 Chat name
734 User identifier
735
736 - `email_address: string`
737
738 User's email address
638739
639740- `organization_id: string`
640741
742 **Deprecated**
743
641744 Organization ID this chat belongs to
642745
643- `organization_uuid: string`
644
645 Organization UUID this chat belongs to
646
647- `project_id: string or null`
648
649 Project ID this chat belongs to
650
651- `updated_at: string`
652
653 Last update timestamp
654
655- `user: object { id, email_address } or null`
656
657 User information for compliance responses.
658
659 - `id: string`
660
661 User identifier
662
663 - `email_address: string`
664
665 User's email address
666
667### Example
668
669```http
746#### Example
747
748```bash
670749curl https://api.anthropic.com/v1/compliance/apps/chats/$CLAUDE_CHAT_ID/messages \
671750 -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY"
672751```
673752
674#### Response
753##### Response (200)
675754
676755```json
677756{
from line 815
736815}
737816```
738817
739## Domain Types
740
741### Message List Response
742
743- `MessageListResponse object { id, artifacts, content, 4 more }`
744
745 A single message in a chat conversation.
746
747 - `id: string`
748
749 Unique identifier for the message e.g. 'claude_chat_msg_abcd1234'
750
751 - `artifacts: array of object { id, artifact_type, title, version_id } or null`
752
753 Versioned documents generated or updated by the assistant in this message. Download via `GET /v1/compliance/apps/artifacts/{artifact_version_id}/content`.
754
755 - `id: string`
756
757 Artifact ID e.g. 'claude_artifact_abc123'
758
759 - `artifact_type: string or null`
760
761 MIME-like artifact type e.g. 'application/vnd.ant.code'
762
763 - `title: string or null`
764
765 Artifact title
766
767 - `version_id: string`
768
769 Artifact version ID e.g. 'claude_artifact_version_abc123'
770
771 - `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 }`
772
773 Content blocks within the message
774
775 - `Text object { text, thinking_redacted, truncated, type }`
776
777 Text content block.
778
779 - `text: string`
780
781 Text content from human or assistant
782
783 - `thinking_redacted: boolean`
784
785 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.
786
787 - `truncated: boolean`
788
789 True when `text` was shortened by the server's fixed per-string bound (1 MiB). Always false on chat text blocks.
790
791 - `type: "text"`
792
793 - `"text"`
794
795 - `ToolUse object { id, input, integration_name, 4 more }`
796
797 Tool invocation requested by the assistant.
798
799 - `id: string or null`
800
801 Tool-use ID, e.g. 'toolu_01AbC...'
802
803 - `input: string`
804
805 Arguments passed to the tool, as a JSON-encoded string. May be shortened — see the `truncated` field
806
807 - `integration_name: string or null`
808
809 Name of the integration that provides this tool, when applicable
810
811 - `mcp_server_url: string or null`
812
813 Base URL (scheme, host, and path only) of the MCP server that provides this tool, when applicable
814
815 - `name: string`
816
817 Name of the tool invoked
818
819 - `truncated: boolean`
820
821 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.
822
823 - `type: "tool_use"`
824
825 - `"tool_use"`
826
827 - `ToolResult object { content, integration_name, is_error, 5 more }`
828
829 Result returned by a tool invocation.
830
831 - `content: array of object { text, type }`
832
833 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.
834
835 - `text: string`
836
837 Text returned by the tool
838
839 - `type: "text"`
840
841 - `"text"`
842
843 - `integration_name: string or null`
844
845 Name of the integration that provides this tool, when applicable
846
847 - `is_error: boolean`
848
849 True when the tool reported an error
850
851 - `mcp_server_url: string or null`
852
853 Base URL (scheme, host, and path only) of the MCP server that provides this tool, when applicable
854
855 - `name: string`
856
857 Name of the tool that produced this result
858
859 - `tool_use_id: string or null`
860
861 ID of the tool_use block this result responds to
862
863 - `truncated: boolean`
864
865 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.
866
867 - `type: "tool_result"`
868
869 - `"tool_result"`
870
871 - `created_at: string`
872
873 Message creation timestamp - For human: when they sent the message, For assistant: when it completed the last content block
874
875 - `files: array of object { id, created_at, filename, 3 more } or null`
876
877 Binary file attachments uploaded by the user. Download via `GET /v1/compliance/apps/chats/files/{claude_file_id}/content`.
878
879 - `id: string`
880
881 File ID
882
883 - `created_at: string`
884
885 File creation timestamp
886
887 - `filename: string`
888
889 Display name of the file
890
891 - `md5: string or null`
892
893 Lowercase hex MD5 of the file's preferred downloadable variant, as recorded at upload time. Null when no stored hash is available.
894
895 - `mime_type: string or null`
896
897 MIME type of the file's preferred downloadable variant (e.g. 'application/pdf')
898
899 - `size_bytes: number or null`
900
901 Size in bytes of the file's preferred downloadable variant, if known. Null for older files uploaded before size was recorded.
902
903 - `generated_files: array of object { id, filename, md5, 2 more } or null`
904
905 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`.
906
907 - `id: string`
908
909 Opaque generated-file id, e.g. 'claude_gen_file_abc123'. Treat as an opaque string; the encoding may change without notice.
910
911 - `filename: string`
912
913 Display name of the generated file
914
915 - `md5: string or null`
916
917 Lowercase hex MD5 of the generated file, when available. Null when no stored hash is available.
918
919 - `mime_type: string or null`
920
921 MIME type reported by the tool that produced the file
922
923 - `size_bytes: number or null`
924
925 Size in bytes of the generated file, when available. Null when the file has expired or size is not recorded.
926
927 - `role: "assistant" or "user"`
928
929 Message sender (user or assistant)
930
931 - `"assistant"`
932
933 - `"user"`
934
935# Files
936
937## Get file metadata
938
939**get** `/v1/compliance/apps/chats/files/{claude_file_id}`
818## Chats › Files
819
820### Get file metadata
821
822**GET** `/v1/compliance/apps/chats/files/{claude_file_id}`
940823
941824Retrieves metadata for a file referenced in chat messages, without
942825downloading the file content. Use the sibling `/content` endpoint to
943826download the bytes.
944827
945### Path Parameters
828#### Path parameters
946829
947830- `claude_file_id: string`
948831
949832 The file ID (tagged ID, e.g., claude_file_abc123)
950833
951### Header Parameters
834#### Headers
952835
953836- `"x-api-key": optional string`
954837
955### Returns
838#### Returns
956839
957840- `id: string`
958841
from line 849
966849
967850 File creation timestamp
968851
852 format: date-time
853
969854- `filename: string or null`
970855
971856 Display name of the file, if set
from line 871
986871
987872 Size in bytes of the file's preferred downloadable variant, if known
988873
989### Example
990
991```http
874#### Example
875
876```bash
992877curl https://api.anthropic.com/v1/compliance/apps/chats/files/$CLAUDE_FILE_ID \
993878 -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY"
994879```
995880
996#### Response
881##### Response (200)
997882
998883```json
999884{
from line 897
1012897}
1013898```
1014899
1015## Delete file
1016
1017**delete** `/v1/compliance/apps/chats/files/{claude_file_id}`
900### Delete file
901
902**DELETE** `/v1/compliance/apps/chats/files/{claude_file_id}`
1018903
1019904Permanently deletes a specific file. This is a destructive
1020905operation that cannot be undone.
1021906
1022### Path Parameters
907#### Path parameters
1023908
1024909- `claude_file_id: string`
1025910
1026911 The file ID (tagged ID, e.g., claude_file_abc123)
1027912
1028### Header Parameters
913#### Headers
1029914
1030915- `"x-api-key": optional string`
1031916
1032### Returns
917#### Returns
1033918
1034919- `id: string`
1035920
from line 924
1039924
1040925 Constant string confirming deletion
1041926
1042 - `"claude_file_deleted"`
1043
1044### Example
1045
1046```http
927 default: claude_file_deleted
928
929#### Example
930
931```bash
1047932curl https://api.anthropic.com/v1/compliance/apps/chats/files/$CLAUDE_FILE_ID \
1048933 -X DELETE \
1049934 -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY"
1050935```
1051936
1052#### Response
937##### Response (200)
1053938
1054939```json
1055940{
from line 943
1058943}
1059944```
1060945
1061## Download file content
1062
1063**get** `/v1/compliance/apps/chats/files/{claude_file_id}/content`
946### Download file content
947
948**GET** `/v1/compliance/apps/chats/files/{claude_file_id}/content`
1064949
1065950Downloads the binary content of a file referenced in chat messages.
1066951
1067### Path Parameters
952#### Path parameters
1068953
1069954- `claude_file_id: string`
1070955
1071956 The file ID (tagged ID, e.g., claude_file_abc123)
1072957
1073### Header Parameters
958#### Headers
1074959
1075960- `"x-api-key": optional string`
1076961
1077### Example
1078
1079```http
962#### Example
963
964```bash
1080965curl https://api.anthropic.com/v1/compliance/apps/chats/files/$CLAUDE_FILE_ID/content \
1081966 -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY"
1082967```
1083968
1084## Domain Types
1085
1086### File Retrieve Response
1087
1088- `FileRetrieveResponse object { id, claude_chat_ids, created_at, 5 more }`
1089
1090 File metadata for GET /v1/compliance/apps/chats/files/{claude_file_id}.
1091
1092 Returns metadata only. Use the sibling `/content` endpoint to download
1093 the file bytes.
1094
1095 - `id: string`
1096
1097 File ID
1098
1099 - `claude_chat_ids: array of string`
1100
1101 Chats this file is attached to. A file can be referenced by messages across multiple chats.
1102
1103 - `created_at: string`
1104
1105 File creation timestamp
1106
1107 - `filename: string or null`
1108
1109 Display name of the file, if set
1110
1111 - `md5: string or null`
1112
1113 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.
1114
1115 - `message_ids: array of string`
1116
1117 Chat message IDs this file is attached to. A file can be referenced by multiple messages.
1118
1119 - `mime_type: string or null`
1120
1121 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).
1122
1123 - `size_bytes: number or null`
1124
1125 Size in bytes of the file's preferred downloadable variant, if known
1126
1127### File Delete Response
1128
1129- `FileDeleteResponse object { id, type }`
1130
1131 Response for deleting a compliance file.
1132
1133 - `id: string`
1134
1135 The ID of the file that was deleted
1136
1137 - `type: optional "claude_file_deleted"`
1138
1139 Constant string confirming deletion
1140
1141 - `"claude_file_deleted"`
1142
1143# Generated Files
1144
1145## Get Claude-generated file metadata
1146
1147**get** `/v1/compliance/apps/chats/generated-files/{claude_gen_file_id}`
969## Chats › Generated Files
970
971### Get Claude-generated file metadata
972
973**GET** `/v1/compliance/apps/chats/generated-files/{claude_gen_file_id}`
1148974
1149975Returns metadata for a file the assistant created via tool use.
1150976
1151977Use the sibling `/content` endpoint to download the bytes.
1152978
1153### Path Parameters
979#### Path parameters
1154980
1155981- `claude_gen_file_id: string`
1156982
1157983 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.
1158984
1159### Header Parameters
985#### Headers
1160986
1161987- `"x-api-key": optional string`
1162988
1163### Returns
989#### Returns
1164990
1165991- `id: string`
1166992
from line 1000
11741000
11751001 File creation timestamp, when available
11761002
1003 format: date-time
1004
11771005- `filename: string`
11781006
11791007 Display name of the generated file
from line 1018
11901018
11911019 Size in bytes of the stored file, when available
11921020
1193### Example
1194
1195```http
1021#### Example
1022
1023```bash
11961024curl https://api.anthropic.com/v1/compliance/apps/chats/generated-files/$CLAUDE_GEN_FILE_ID \
11971025 -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY"
11981026```
11991027
1200#### Response
1028##### Response (200)
12011029
12021030```json
12031031{
from line 1039
12111039}
12121040```
12131041
1214## Download a Claude-generated file
1215
1216**get** `/v1/compliance/apps/chats/generated-files/{claude_gen_file_id}/content`
1042### Download a Claude-generated file
1043
1044**GET** `/v1/compliance/apps/chats/generated-files/{claude_gen_file_id}/content`
12171045
12181046Downloads the binary content of a file the assistant created via tool use.
12191047
1220### Path Parameters
1048#### Path parameters
12211049
12221050- `claude_gen_file_id: string`
12231051
12241052 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.
12251053
1226### Header Parameters
1054#### Headers
12271055
12281056- `"x-api-key": optional string`
12291057
1230### Example
1231
1232```http
1058#### Example
1059
1060```bash
12331061curl https://api.anthropic.com/v1/compliance/apps/chats/generated-files/$CLAUDE_GEN_FILE_ID/content \
12341062 -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY"
12351063```
1236
1237## Domain Types
1238
1239### Generated File Retrieve Response
1240
1241- `GeneratedFileRetrieveResponse object { id, claude_chat_id, created_at, 4 more }`
1242
1243 Metadata for GET /v1/compliance/apps/chats/generated-files/{claude_gen_file_id}.
1244
1245 Returns metadata only. Use the sibling `/content` endpoint to download
1246 the bytes. The owning chat is included since the id is opaque; to find the
1247 specific message that produced the file, fetch
1248 `/v1/compliance/apps/chats/{claude_chat_id}/messages` and match on
1249 `generated_files[].id`.
1250
1251 - `id: string`
1252
1253 Opaque generated-file id, e.g. 'claude_gen_file_abc123'.
1254
1255 - `claude_chat_id: string`
1256
1257 The chat this generated file belongs to
1258
1259 - `created_at: string or null`
1260
1261 File creation timestamp, when available
1262
1263 - `filename: string`
1264
1265 Display name of the generated file
1266
1267 - `md5: string or null`
1268
1269 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.
1270
1271 - `mime_type: string or null`
1272
1273 MIME type of the stored file, when available
1274
1275 - `size_bytes: number or null`
1276
1277 Size in bytes of the stored file, when available
12781064
No line in this hunk matches that.