Follow Discord
Sweep 22 Oct 2026 · 04:32Z Build v2.1.308 527 read Stable v2.1.308 Latest v2.1.308 Next v2.1.308 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One change · api

Sessions changedapi/compliance/apps/sessions

Nearest release: v2.1.245, published an hour after this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.

Recorded here
Lines+193added
Lines−557removed
From line 1 where the diff opens
First seen 14 Aug 2026 this site's first read of the page
Recorded edits14to this page, all time

## Sessions › Local ### List local sessions #### Query parameters #### Headers #### Returns #### Example ##### Response (200) ### Retrieve a local session #### Path parameters #### Headers #### Returns #### Example ##### Response (200) ## Sessions › Local › Messages ### Retrieve local session messages #### Path parameters #### Query parameters #### Headers #### Returns #### Example ##### Response (200) ## Sessions › Remote ### List remote sessions #### Query parameters #### Headers #### Returns #### Example ##### Response (200) ## Sessions › Remote › Messages ### Retrieve remote session messages #### Path parameters #### Query parameters #### Headers #### Returns #### Example ##### Response (200) # Local ## List local sessions ### Query Parameters ### Header Parameters ### Returns ### Example #### Response ## Retrieve a local session ### Path Parameters ### Header Parameters ### Returns ### Example #### Response ## Domain Types ### Local List Response ### Local Retrieve Response # Messages ## Retrieve local session messages ### Path Parameters ### Query Parameters ### Header Parameters ### Returns ### Example #### Response ## Domain Types ### Message List Response # Remote ## List remote sessions ### Query Parameters ### Header Parameters ### Returns ### Example #### Response ## Domain Types ### Remote List Response # Messages ## Retrieve remote session messages ### Path Parameters ### Query Parameters ### Header Parameters ### Returns ### Example #### Response ## Domain Types ### Message List Response

The whole hunk

from line 1, old and new numbered
/
lines

The two sides of this change are more than 400 edits apart, too far apart to line up, so this is the differ's own diff of it and the words inside a line are not marked.

from line 1
1---
2title: Sessions
3url: https://platform.claude.com/docs/en/api/compliance/apps/sessions
4---
5 
61# Sessions
72 
8# Local
9 
10## List local sessions
11 
12**get** `/v1/compliance/apps/sessions/local`
3## Sessions › Local
4 
5### List local sessions
6 
7**GET** `/v1/compliance/apps/sessions/local`
138 
149List local sessions across the organizations the key may read.
1510 
1611Results are ordered by `created_at` descending. Pagination is
1712forward-only via `next_page`; there is no reverse cursor.
1813 
19### Query Parameters
20 
21- `created_at: optional object { gte, lt }`
14#### Query parameters
15 
16- `created_at: optional object`
2217 
2318 - `gte: optional string`
2419 
2520 Only return sessions whose first inference call is at or after this time (RFC 3339; a UTC offset is required).
2621 
22 format: date-time
23 
2724 - `lt: optional string`
2825 
2926 Only return sessions whose first inference call is strictly before this time (RFC 3339; a UTC offset is required).
3027 
28 format: date-time
29 
3130- `limit: optional number`
3231 
3332 Maximum results (default: 100, max: 500)
3433 
34 default: 100, maximum: 500, minimum: 1
35 
3536- `page: optional string`
3637 
3738 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.
3839 
39- `updated_at: optional object { gte }`
40- `updated_at: optional object`
4041 
4142 - `gte: optional string`
4243 
4344 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.
4445 
45### Header Parameters
46 format: date-time
47 
48#### Headers
4649 
4750- `"x-api-key": optional string`
4851 
49### Returns
50 
51- `data: array of object { id, created_at, organization_uuid, 5 more }`
52#### Returns
53 
54- `data: array of object`
5255 
5356 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.
5457 
from line 63
6063 
6164 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.
6265 
66 format: date-time
67 
6368 - `organization_uuid: string`
6469 
6570 UUID of the child organization the session belongs to
from line 75
7075 
7176 - `type: "compliance_local_session"`
7277 
73 - `"compliance_local_session"`
78 default: compliance_local_session
7479 
7580 - `updated_at: string`
7681 
7782 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.
7883 
79 - `user: object { id, email_address }`
84 format: date-time
85 
86 - `user: object`
8087 
8188 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.
8289 
from line 103
96103 
97104 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.
98105 
99### Example
100 
101```http
106#### Example
107 
108```bash
102109curl https://api.anthropic.com/v1/compliance/apps/sessions/local \
103110 -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY"
104111```
105112 
106#### Response
113##### Response (200)
107114 
108115```json
109116{
from line 132
125132}
126133```
127134 
128## Retrieve a local session
129 
130**get** `/v1/compliance/apps/sessions/local/{local_session_id}`
135### Retrieve a local session
136 
137**GET** `/v1/compliance/apps/sessions/local/{local_session_id}`
131138 
132139Retrieve one local session.
133140 
from line 143
136143enforced when the response is served: a session whose every
137144inference call has aged out returns 404.
138145 
139### Path Parameters
146#### Path parameters
140147 
141148- `local_session_id: string`
142149 
143### Header Parameters
150#### Headers
144151 
145152- `"x-api-key": optional string`
146153 
147### Returns
154#### Returns
148155 
149156- `id: string`
150157 
from line 161
154161 
155162 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.
156163 
164 format: date-time
165 
157166- `organization_uuid: string`
158167 
159168 UUID of the child organization the session belongs to
from line 173
164173 
165174- `type: "compliance_local_session"`
166175 
167 - `"compliance_local_session"`
176 default: compliance_local_session
168177 
169178- `updated_at: string`
170179 
171180 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.
172181 
173- `user: object { id, email_address }`
182 format: date-time
183 
184- `user: object`
174185 
175186 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.
176187 
from line 197
186197 
187198 Workspace identifier (tagged ID, prefixed `wrkspc_`). Null for sessions not attributed to a workspace.
188199 
189### Example
190 
191```http
200#### Example
201 
202```bash
192203curl https://api.anthropic.com/v1/compliance/apps/sessions/local/$LOCAL_SESSION_ID \
193204 -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY"
194205```
195206 
196#### Response
207##### Response (200)
197208 
198209```json
199210{
from line 222
211222}
212223```
213224 
214## Domain Types
215 
216### Local List Response
217 
218- `LocalListResponse object { id, created_at, organization_uuid, 5 more }`
219 
220 A Cowork or Claude Code session that a user ran on their own computer
221 while signed in with their organization account.
222 
223 - `id: string`
224 
225 Local session identifier, prefixed `clls_`. Unique within the parent organization. Treat as an opaque string; the format may change without notice.
226 
227 - `created_at: string`
228 
229 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.
230 
231 - `organization_uuid: string`
232 
233 UUID of the child organization the session belongs to
234 
235 - `product_surface: string or null`
236 
237 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.
238 
239 - `type: "compliance_local_session"`
240 
241 - `"compliance_local_session"`
242 
243 - `updated_at: string`
244 
245 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.
246 
247 - `user: object { id, email_address }`
248 
249 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.
250 
251 - `id: string`
252 
253 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.
254 
255 - `email_address: string or null`
256 
257 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.
258 
259 - `workspace_id: string or null`
260 
261 Workspace identifier (tagged ID, prefixed `wrkspc_`). Null for sessions not attributed to a workspace.
262 
263### Local Retrieve Response
264 
265- `LocalRetrieveResponse object { id, created_at, organization_uuid, 5 more }`
266 
267 A Cowork or Claude Code session that a user ran on their own computer
268 while signed in with their organization account.
269 
270 - `id: string`
271 
272 Local session identifier, prefixed `clls_`. Unique within the parent organization. Treat as an opaque string; the format may change without notice.
273 
274 - `created_at: string`
275 
276 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.
277 
278 - `organization_uuid: string`
279 
280 UUID of the child organization the session belongs to
281 
282 - `product_surface: string or null`
283 
284 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.
285 
286 - `type: "compliance_local_session"`
287 
288 - `"compliance_local_session"`
289 
290 - `updated_at: string`
291 
292 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.
293 
294 - `user: object { id, email_address }`
295 
296 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.
297 
298 - `id: string`
299 
300 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.
301 
302 - `email_address: string or null`
303 
304 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.
305 
306 - `workspace_id: string or null`
307 
308 Workspace identifier (tagged ID, prefixed `wrkspc_`). Null for sessions not attributed to a workspace.
309 
310# Messages
311 
312## Retrieve local session messages
313 
314**get** `/v1/compliance/apps/sessions/local/{local_session_id}/messages`
225## Sessions › Local › Messages
226 
227### Retrieve local session messages
228 
229**GET** `/v1/compliance/apps/sessions/local/{local_session_id}/messages`
315230 
316231Read one local session's transcript, oldest-first by default.
317232 
from line 238
323238honored for 24 hours: a cursor older than that is rejected with an
324239explicit 400; restart the walk to read under the current boundary.
325240 
326### Path Parameters
241#### Path parameters
327242 
328243- `local_session_id: string`
329244 
330### Query Parameters
245#### Query parameters
331246 
332247- `limit: optional number`
333248 
334249 Maximum results (default: 100, max: 1000)
335250 
251 default: 100, maximum: 1000, minimum: 1
252 
336253- `order: optional "asc" or "desc"`
337254 
338255 Sort direction. `asc` (oldest-first, default) or `desc`.
339256 
257 default: asc
258 
340259 - `"asc"`
341260 
342261 - `"desc"`
from line 268
349268 
350269 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.
351270 
271 default: 10000, maximum: 2147483647, minimum: -1
272 
352273- `tool_use_input_max_bytes: optional number`
353274 
354275 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.
355276 
356### Header Parameters
277 default: 10000, maximum: 2147483647, minimum: -1
278 
279#### Headers
357280 
358281- `"x-api-key": optional string`
359282 
360### Returns
361 
362- `data: array of object { id, content, created_at, 4 more }`
283#### Returns
284 
285- `data: array of object`
363286 
364287 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.
365288 
from line 290
367290 
368291 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.
369292 
370 - `content: array of object { text, truncated, type } or object { id, input, name, 2 more } or object { content, is_error, name, 3 more }`
293 - `content: array of object or object or object`
371294 
372295 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`.
373296 
374 - `Text object { text, truncated, type }`
297 - `Text object`
375298 
376299 Text content block.
377300 
from line 306
383306 
384307 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.
385308 
309 default: false
310 
386311 - `type: "text"`
387312 
388 - `"text"`
389 
390 - `ToolUse object { id, input, name, 2 more }`
313 default: text
314 
315 - `ToolUse object`
391316 
392317 Tool invocation requested by the assistant.
393318 
from line 332
407332 
408333 True when `input` was shortened. Pass `tool_use_input_max_bytes=-1` to request the server maximum.
409334 
335 default: false
336 
410337 - `type: "tool_use"`
411338 
412 - `"tool_use"`
413 
414 - `ToolResult object { content, is_error, name, 3 more }`
339 default: tool_use
340 
341 - `ToolResult object`
415342 
416343 Result returned by a tool invocation.
417344 
418 - `content: array of object { text, type }`
345 - `content: array of object`
419346 
420347 Text content returned by the tool. Non-text item types are omitted and signalled via `truncated` with an in-band item-count marker.
421348 
from line 352
425352 
426353 - `type: "text"`
427354 
428 - `"text"`
355 default: text
429356 
430357 - `is_error: boolean`
431358 
from line 370
443370 
444371 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.
445372 
373 default: false
374 
446375 - `type: "tool_result"`
447376 
448 - `"tool_result"`
377 default: tool_result
449378 
450379 - `created_at: string`
451380 
452381 When the message was recorded (RFC 3339, UTC)
453382 
383 format: date-time
384 
454385 - `model: string or null`
455386 
456387 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.
457388 
458 - `provenance: object { reason, type } or object { type } or object { type } or null`
389 - `provenance: object or object or object or null`
459390 
460391 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.
461392 
462 - `ContentUnavailable object { reason, type }`
393 - `ContentUnavailable object`
463394 
464395 The turn's content cannot be returned; `content` is empty.
465396 
from line 400
469400 
470401 - `type: "content_unavailable"`
471402 
472 - `"content_unavailable"`
473 
474 - `ClientAsserted object { type }`
403 default: content_unavailable
404 
405 - `ClientAsserted object`
475406 
476407 Assistant content the client supplied as conversation history
477408 rather than produced by Claude during this session. `content` shows
from line 412
481412 
482413 - `type: "client_asserted"`
483414 
484 - `"client_asserted"`
485 
486 - `SyntheticMarker object { type }`
415 default: client_asserted
416 
417 - `SyntheticMarker object`
487418 
488419 A transcript marker generated by the endpoint rather than sent by
489420 either party during the session. Marker messages indicate that the
from line 428
497428 
498429 - `type: "synthetic_marker"`
499430 
500 - `"synthetic_marker"`
431 default: synthetic_marker
501432 
502433 - `role: "assistant" or "user"`
503434 
from line 440
509440 
510441 - `type: "compliance_local_session_message"`
511442 
512 - `"compliance_local_session_message"`
443 default: compliance_local_session_message
513444 
514445- `next_page: string or null`
515446 
516447 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.
517448 
518- `session: object { id, created_at, organization_uuid, 5 more }`
449- `session: object`
519450 
520451 The local session the messages belong to. `user.email_address` is always null on this endpoint; the messages endpoint does not resolve email addresses.
521452 
from line 458
527458 
528459 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.
529460 
461 format: date-time
462 
530463 - `organization_uuid: string`
531464 
532465 UUID of the child organization the session belongs to
from line 470
537470 
538471 - `type: "compliance_local_session"`
539472 
540 - `"compliance_local_session"`
473 default: compliance_local_session
541474 
542475 - `updated_at: string`
543476 
544477 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.
545478 
546 - `user: object { id, email_address }`
479 format: date-time
480 
481 - `user: object`
547482 
548483 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.
549484 
from line 494
559494 
560495 Workspace identifier (tagged ID, prefixed `wrkspc_`). Null for sessions not attributed to a workspace.
561496 
562### Example
563 
564```http
497#### Example
498 
499```bash
565500curl https://api.anthropic.com/v1/compliance/apps/sessions/local/$LOCAL_SESSION_ID/messages \
566501 -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY"
567502```
568503 
569#### Response
504##### Response (200)
570505 
571506```json
572507{
from line 542
607542}
608543```
609544 
610## Domain Types
611 
612### Message List Response
613 
614- `MessageListResponse object { id, content, created_at, 4 more }`
615 
616 A single user or assistant turn in a local session transcript.
617 
618 - `id: string`
619 
620 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.
621 
622 - `content: array of object { text, truncated, type } or object { id, input, name, 2 more } or object { content, is_error, name, 3 more }`
623 
624 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`.
625 
626 - `Text object { text, truncated, type }`
627 
628 Text content block.
629 
630 - `text: string`
631 
632 Text content from the user or the assistant
633 
634 - `truncated: boolean`
635 
636 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.
637 
638 - `type: "text"`
639 
640 - `"text"`
641 
642 - `ToolUse object { id, input, name, 2 more }`
643 
644 Tool invocation requested by the assistant.
645 
646 - `id: string or null`
647 
648 Tool-use ID, e.g. 'toolu_01AbC...'
649 
650 - `input: string`
651 
652 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.
653 
654 - `name: string`
655 
656 Name of the tool invoked
657 
658 - `truncated: boolean`
659 
660 True when `input` was shortened. Pass `tool_use_input_max_bytes=-1` to request the server maximum.
661 
662 - `type: "tool_use"`
663 
664 - `"tool_use"`
665 
666 - `ToolResult object { content, is_error, name, 3 more }`
667 
668 Result returned by a tool invocation.
669 
670 - `content: array of object { text, type }`
671 
672 Text content returned by the tool. Non-text item types are omitted and signalled via `truncated` with an in-band item-count marker.
673 
674 - `text: string`
675 
676 Text returned by the tool
677 
678 - `type: "text"`
679 
680 - `"text"`
681 
682 - `is_error: boolean`
683 
684 True when the tool reported an error
685 
686 - `name: string`
687 
688 Name of the tool that produced this result
689 
690 - `tool_use_id: string or null`
691 
692 ID of the tool_use block this result responds to
693 
694 - `truncated: boolean`
695 
696 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.
697 
698 - `type: "tool_result"`
699 
700 - `"tool_result"`
701 
702 - `created_at: string`
703 
704 When the message was recorded (RFC 3339, UTC)
705 
706 - `model: string or null`
707 
708 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.
709 
710 - `provenance: object { reason, type } or object { type } or object { type } or null`
711 
712 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.
713 
714 - `ContentUnavailable object { reason, type }`
715 
716 The turn's content cannot be returned; `content` is empty.
717 
718 - `reason: string`
719 
720 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.
721 
722 - `type: "content_unavailable"`
723 
724 - `"content_unavailable"`
725 
726 - `ClientAsserted object { type }`
727 
728 Assistant content the client supplied as conversation history
729 rather than produced by Claude during this session. `content` shows
730 what the model received but its authorship is not verified; this can
731 result from normal request or client processing, not only client
732 modification. Never on user-role messages.
733 
734 - `type: "client_asserted"`
735 
736 - `"client_asserted"`
737 
738 - `SyntheticMarker object { type }`
739 
740 A transcript marker generated by the endpoint rather than sent by
741 either party during the session. Marker messages indicate that the
742 prompt history diverged from what was captured, that the request's
743 `system` field was present but is not shown, or that
744 prompt-carried history was suppressed because the session spans the
745 child organization's retention boundary and those turns cannot be
746 placed against it (the marker's text names the cause). Markers that
747 report a mismatch with captured history can result from normal request
748 or client processing, not only client modification.
749 
750 - `type: "synthetic_marker"`
751 
752 - `"synthetic_marker"`
753 
754 - `role: "assistant" or "user"`
755 
756 Message sender (`user` or `assistant`)
757 
758 - `"assistant"`
759 
760 - `"user"`
761 
762 - `type: "compliance_local_session_message"`
763 
764 - `"compliance_local_session_message"`
765 
766# Remote
767 
768## List remote sessions
769 
770**get** `/v1/compliance/apps/sessions/remote`
545## Sessions › Remote
546 
547### List remote sessions
548 
549**GET** `/v1/compliance/apps/sessions/remote`
771550 
772551List remote sessions (Cowork sessions that run in Anthropic-managed
773552cloud environments) across the organizations the key may read.
from line 566
787566forward-only: pass the response's `next_page` value back as `page` to
788567retrieve the next page, and stop when `next_page` is null.
789568 
790### Query Parameters
791 
792- `created_at: optional object { gt, gte, lt, lte }`
569#### Query parameters
570 
571- `created_at: optional object`
793572 
794573 - `gt: optional string`
795574 
796575 Filter remote sessions created after this time (RFC 3339 format)
797576 
577 format: date-time
578 
798579 - `gte: optional string`
799580 
800581 Filter remote sessions created at or after this time (RFC 3339 format)
801582 
583 format: date-time
584 
802585 - `lt: optional string`
803586 
804587 Filter remote sessions created before this time (RFC 3339 format)
805588 
589 format: date-time
590 
806591 - `lte: optional string`
807592 
808593 Filter remote sessions created at or before this time (RFC 3339 format)
809594 
595 format: date-time
596 
810597- `limit: optional number`
811598 
812599 Maximum results (default: 100, max: 500)
813600 
601 default: 100, maximum: 500, minimum: 1
602 
814603- `organization_ids: optional array of string`
815604 
816605 Filter to specific child organization identifiers. Omit to enumerate every child organization the key may read.
817606 
607 maxItems: 500
608 
818609- `page: optional string`
819610 
820611 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 614
823614 
824615 Filter to sessions owned by specific users (max 10 per request). Agent-owned sessions are excluded when this filter is set.
825616 
826### Header Parameters
617 maxItems: 10
618 
619#### Headers
827620 
828621- `"x-api-key": optional string`
829622 
830### Returns
831 
832- `data: array of object { id, agent_id, claude_project_id, 7 more }`
623#### Returns
624 
625- `data: array of object`
833626 
834627 - `id: string`
835628 
from line 640
847640 
848641 When the session was created (RFC 3339, UTC)
849642 
643 format: date-time
644 
850645 - `organization_uuid: string`
851646 
852647 UUID of the organization the session belongs to
from line 650
855650 
856651 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.
857652 
858 - `started_by_user: object { id, email_address } or null`
653 - `started_by_user: object or null`
859654 
860655 A user associated with a remote session.
861656 
from line 670
875670 
876671 When the session was last modified (RFC 3339, UTC)
877672 
878 - `user: object { id, email_address } or null`
673 format: date-time
674 
675 - `user: object or null`
879676 
880677 A user associated with a remote session.
881678 
from line 688
891688 
892689 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.
893690 
894### Example
895 
896```http
691#### Example
692 
693```bash
897694curl https://api.anthropic.com/v1/compliance/apps/sessions/remote \
898695 -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY"
899696```
900697 
901#### Response
698##### Response (200)
902699 
903700```json
904701{
from line 718
921718}
922719```
923720 
924## Domain Types
925 
926### Remote List Response
927 
928- `RemoteListResponse object { id, agent_id, claude_project_id, 7 more }`
929 
930 Metadata for one remote session, as returned in the list response
931 and in the messages response's `session` field.
932 
933 Carries session attributes only, not transcript content. Use the
934 messages endpoint to retrieve a session's transcript.
935 
936 - `id: string`
937 
938 Remote session identifier
939 
940 - `agent_id: string or null`
941 
942 Identifier of the automated agent that owns the session. Null for user-owned sessions. At most one of `user` and `agent_id` is set.
943 
944 - `claude_project_id: string or null`
945 
946 ID of the project the session is bound to. Null when the session has no project binding.
947 
948 - `created_at: string`
949 
950 When the session was created (RFC 3339, UTC)
951 
952 - `organization_uuid: string`
953 
954 UUID of the organization the session belongs to
955 
956 - `product_surface: string or null`
957 
958 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.
959 
960 - `started_by_user: object { id, email_address } or null`
961 
962 A user associated with a remote session.
963 
964 - `id: string`
965 
966 User identifier
967 
968 - `email_address: string or null`
969 
970 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.
971 
972 - `status: string`
973 
974 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.
975 
976 - `updated_at: string`
977 
978 When the session was last modified (RFC 3339, UTC)
979 
980 - `user: object { id, email_address } or null`
981 
982 A user associated with a remote session.
983 
984 - `id: string`
985 
986 User identifier
987 
988 - `email_address: string or null`
989 
990 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.
991 
992# Messages
993 
994## Retrieve remote session messages
995 
996**get** `/v1/compliance/apps/sessions/remote/{claude_remote_session_id}/messages`
721## Sessions › Remote › Messages
722 
723### Retrieve remote session messages
724 
725**GET** `/v1/compliance/apps/sessions/remote/{claude_remote_session_id}/messages`
997726 
998727Retrieve one remote session's transcript: user prompts, assistant
999728responses, and tool calls and results. Thinking blocks and images are
from line 745
1016745and for sessions outside the organizations the key may read. A
1017746malformed session identifier returns 400.
1018747 
1019### Path Parameters
748#### Path parameters
1020749 
1021750- `claude_remote_session_id: string`
1022751 
1023752 The remote session identifier (`cse_...`) to retrieve
1024753 
1025### Query Parameters
754#### Query parameters
1026755 
1027756- `limit: optional number`
1028757 
1029758 Maximum results (default: 100, max: 1000)
1030759 
760 default: 100, maximum: 1000, minimum: 1
761 
1031762- `order: optional "asc" or "desc"`
1032763 
1033764 Sort direction. `asc` (oldest-first) or `desc`.
1034765 
766 default: asc
767 
1035768 - `"asc"`
1036769 
1037770 - `"desc"`
from line 777
1044777 
1045778 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.
1046779 
780 default: 10000, maximum: 2147483647, minimum: -1
781 
1047782- `tool_use_input_max_bytes: optional number`
1048783 
1049784 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.
1050785 
1051### Header Parameters
786 default: 10000, maximum: 2147483647, minimum: -1
787 
788#### Headers
1052789 
1053790- `"x-api-key": optional string`
1054791 
1055### Returns
1056 
1057- `data: array of object { id, content, content_unavailable, 3 more }`
792#### Returns
793 
794- `data: array of object`
1058795 
1059796 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.
1060797 
from line 799
1062799 
1063800 Unique identifier for the message, e.g. `csev_abc123`
1064801 
1065 - `content: array of object { text, truncated, type } or object { id, input, name, 2 more } or object { content, is_error, name, 3 more }`
802 - `content: array of object or object or object`
1066803 
1067804 Content blocks within the message
1068805 
1069 - `Text object { text, truncated, type }`
806 - `Text object`
1070807 
1071808 Text content block.
1072809 
from line 815
1078815 
1079816 True when `text` exceeded the server-defined maximum (approximately 1 MiB) and was shortened.
1080817 
818 default: false
819 
1081820 - `type: "text"`
1082821 
1083 - `"text"`
1084 
1085 - `ToolUse object { id, input, name, 2 more }`
822 default: text
823 
824 - `ToolUse object`
1086825 
1087826 Tool invocation requested by the assistant.
1088827 
from line 841
1102841 
1103842 True when `input` was shortened. Pass `tool_use_input_max_bytes=-1` to request full content, subject to the server-side maximum.
1104843 
844 default: false
845 
1105846 - `type: "tool_use"`
1106847 
1107 - `"tool_use"`
1108 
1109 - `ToolResult object { content, is_error, name, 3 more }`
848 default: tool_use
849 
850 - `ToolResult object`
1110851 
1111852 Result returned by a tool invocation.
1112853 
1113 - `content: array of object { text, type }`
854 - `content: array of object`
1114855 
1115856 Text content returned by the tool. Non-text item types are omitted.
1116857 
from line 861
1120861 
1121862 - `type: "text"`
1122863 
1123 - `"text"`
864 default: text
1124865 
1125866 - `is_error: boolean`
1126867 
from line 879
1138879 
1139880 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.
1140881 
882 default: false
883 
1141884 - `type: "tool_result"`
1142885 
1143 - `"tool_result"`
886 default: tool_result
1144887 
1145888 - `content_unavailable: boolean`
1146889 
1147890 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'.
1148891 
892 default: false
893 
1149894 - `created_at: string`
1150895 
1151896 When the message was recorded (RFC 3339, UTC)
1152897 
898 format: date-time
899 
1153900 - `role: "assistant" or "user"`
1154901 
1155902 Message sender (`user` or `assistant`)
from line 913
1166913 
1167914 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.
1168915 
1169- `session: object { id, agent_id, claude_project_id, 7 more }`
916- `session: object`
1170917 
1171918 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.
1172919 
from line 933
1186933 
1187934 When the session was created (RFC 3339, UTC)
1188935 
936 format: date-time
937 
1189938 - `organization_uuid: string`
1190939 
1191940 UUID of the organization the session belongs to
from line 943
1194943 
1195944 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.
1196945 
1197 - `started_by_user: object { id, email_address } or null`
946 - `started_by_user: object or null`
1198947 
1199948 A user associated with a remote session.
1200949 
from line 963
1214963 
1215964 When the session was last modified (RFC 3339, UTC)
1216965 
1217 - `user: object { id, email_address } or null`
966 format: date-time
967 
968 - `user: object or null`
1218969 
1219970 A user associated with a remote session.
1220971 
from line 977
1226977 
1227978 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.
1228979 
1229### Example
1230 
1231```http
980#### Example
981 
982```bash
1232983curl https://api.anthropic.com/v1/compliance/apps/sessions/remote/$CLAUDE_REMOTE_SESSION_ID/messages \
1233984 -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY"
1234985```
1235986 
1236#### Response
987##### Response (200)
1237988 
1238989```json
1239990{
from line 1025
12741025 }
12751026}
12761027```
1277 
1278## Domain Types
1279 
1280### Message List Response
1281 
1282- `MessageListResponse object { id, content, content_unavailable, 3 more }`
1283 
1284 A single user or assistant turn in a remote session transcript.
1285 
1286 `content` is a discriminated union of `text`, `tool_use`, and
1287 `tool_result` blocks.
1288 
1289 - `id: string`
1290 
1291 Unique identifier for the message, e.g. `csev_abc123`
1292 
1293 - `content: array of object { text, truncated, type } or object { id, input, name, 2 more } or object { content, is_error, name, 3 more }`
1294 
1295 Content blocks within the message
1296 
1297 - `Text object { text, truncated, type }`
1298 
1299 Text content block.
1300 
1301 - `text: string`
1302 
1303 Text content from the user or the assistant
1304 
1305 - `truncated: boolean`
1306 
1307 True when `text` exceeded the server-defined maximum (approximately 1 MiB) and was shortened.
1308 
1309 - `type: "text"`
1310 
1311 - `"text"`
1312 
1313 - `ToolUse object { id, input, name, 2 more }`
1314 
1315 Tool invocation requested by the assistant.
1316 
1317 - `id: string or null`
1318 
1319 Tool-use ID, e.g. 'toolu_01AbC...'
1320 
1321 - `input: string`
1322 
1323 Arguments passed to the tool, as a JSON-encoded string. May be shortened — see the `truncated` field
1324 
1325 - `name: string`
1326 
1327 Name of the tool invoked
1328 
1329 - `truncated: boolean`
1330 
1331 True when `input` was shortened. Pass `tool_use_input_max_bytes=-1` to request full content, subject to the server-side maximum.
1332 
1333 - `type: "tool_use"`
1334 
1335 - `"tool_use"`
1336 
1337 - `ToolResult object { content, is_error, name, 3 more }`
1338 
1339 Result returned by a tool invocation.
1340 
1341 - `content: array of object { text, type }`
1342 
1343 Text content returned by the tool. Non-text item types are omitted.
1344 
1345 - `text: string`
1346 
1347 Text returned by the tool
1348 
1349 - `type: "text"`
1350 
1351 - `"text"`
1352 
1353 - `is_error: boolean`
1354 
1355 True when the tool reported an error
1356 
1357 - `name: string`
1358 
1359 Name of the tool that produced this result
1360 
1361 - `tool_use_id: string or null`
1362 
1363 ID of the tool_use block this result responds to
1364 
1365 - `truncated: boolean`
1366 
1367 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.
1368 
1369 - `type: "tool_result"`
1370 
1371 - `"tool_result"`
1372 
1373 - `content_unavailable: boolean`
1374 
1375 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'.
1376 
1377 - `created_at: string`
1378 
1379 When the message was recorded (RFC 3339, UTC)
1380 
1381 - `role: "assistant" or "user"`
1382 
1383 Message sender (`user` or `assistant`)
1384 
1385 - `"assistant"`
1386 
1387 - `"user"`
1388 
1389 - `sent_by_user_id: string or null`
1390 
1391 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`.
13921028 
Feedback