Messages changedapi/compliance/apps/sessions/local/messages
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+82added
Lines−59removed
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
### Path parameters ### Query parameters ### Headers #### Response (200) ## Domain types ### Path Parameters ### Query Parameters ### Header Parameters #### Response ## Domain Types
The whole hunk
from line 1, old and new numbered
/
from line 1
1---
2title: Messages
3url: https://platform.claude.com/docs/en/api/compliance/apps/sessions/local/messages
4---
5
61# Messages
72
83## Retrieve local session messages
94
10**get** `/v1/compliance/apps/sessions/local/{local_session_id}/messages`
5**GET** `/v1/compliance/apps/sessions/local/{local_session_id}/messages`
116
127Read one local session's transcript, oldest-first by default.
138
from line 14
1914honored for 24 hours: a cursor older than that is rejected with an
2015explicit 400; restart the walk to read under the current boundary.
2116
22### Path Parameters
17### Path parameters
2318
2419- `local_session_id: string`
2520
26### Query Parameters
21### Query parameters
2722
2823- `limit: optional number`
2924
3025 Maximum results (default: 100, max: 1000)
3126
27 default: 100, maximum: 1000, minimum: 1
28
3229- `order: optional "asc" or "desc"`
3330
3431 Sort direction. `asc` (oldest-first, default) or `desc`.
3532
33 default: asc
34
3635 - `"asc"`
3736
3837 - `"desc"`
from line 44
4544
4645 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.
4746
47 default: 10000, maximum: 2147483647, minimum: -1
48
4849- `tool_use_input_max_bytes: optional number`
4950
5051 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.
5152
52### Header Parameters
53 default: 10000, maximum: 2147483647, minimum: -1
5354
55### Headers
56
5457- `"x-api-key": optional string`
5558
5659### Returns
5760
58- `data: array of object { id, content, created_at, 4 more }`
61- `data: array of object`
5962
6063 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.
6164
from line 66
6366
6467 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.
6568
66 - `content: array of object { text, truncated, type } or object { id, input, name, 2 more } or object { content, is_error, name, 3 more }`
69 - `content: array of object or object or object`
6770
6871 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`.
6972
70 - `Text object { text, truncated, type }`
73 - `Text object`
7174
7275 Text content block.
7376
from line 82
7982
8083 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.
8184
85 default: false
86
8287 - `type: "text"`
8388
84 - `"text"`
89 default: text
8590
86 - `ToolUse object { id, input, name, 2 more }`
91 - `ToolUse object`
8792
8893 Tool invocation requested by the assistant.
8994
from line 108
103108
104109 True when `input` was shortened. Pass `tool_use_input_max_bytes=-1` to request the server maximum.
105110
111 default: false
112
106113 - `type: "tool_use"`
107114
108 - `"tool_use"`
115 default: tool_use
109116
110 - `ToolResult object { content, is_error, name, 3 more }`
117 - `ToolResult object`
111118
112119 Result returned by a tool invocation.
113120
114 - `content: array of object { text, type }`
121 - `content: array of object`
115122
116123 Text content returned by the tool. Non-text item types are omitted and signalled via `truncated` with an in-band item-count marker.
117124
from line 128
121128
122129 - `type: "text"`
123130
124 - `"text"`
131 default: text
125132
126133 - `is_error: boolean`
127134
from line 146
139146
140147 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.
141148
149 default: false
150
142151 - `type: "tool_result"`
143152
144 - `"tool_result"`
153 default: tool_result
145154
146155 - `created_at: string`
147156
148157 When the message was recorded (RFC 3339, UTC)
149158
159 format: date-time
160
150161 - `model: string or null`
151162
152163 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.
153164
154 - `provenance: object { reason, type } or object { type } or object { type } or null`
165 - `provenance: object or object or object or null`
155166
156167 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.
157168
158 - `ContentUnavailable object { reason, type }`
169 - `ContentUnavailable object`
159170
160171 The turn's content cannot be returned; `content` is empty.
161172
from line 176
165176
166177 - `type: "content_unavailable"`
167178
168 - `"content_unavailable"`
179 default: content_unavailable
169180
170 - `ClientAsserted object { type }`
181 - `ClientAsserted object`
171182
172183 Assistant content the client supplied as conversation history
173184 rather than produced by Claude during this session. `content` shows
from line 188
177188
178189 - `type: "client_asserted"`
179190
180 - `"client_asserted"`
191 default: client_asserted
181192
182 - `SyntheticMarker object { type }`
193 - `SyntheticMarker object`
183194
184195 A transcript marker generated by the endpoint rather than sent by
185196 either party during the session. Marker messages indicate that the
from line 204
193204
194205 - `type: "synthetic_marker"`
195206
196 - `"synthetic_marker"`
207 default: synthetic_marker
197208
198209 - `role: "assistant" or "user"`
199210
from line 216
205216
206217 - `type: "compliance_local_session_message"`
207218
208 - `"compliance_local_session_message"`
219 default: compliance_local_session_message
209220
210221- `next_page: string or null`
211222
212223 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.
213224
214- `session: object { id, created_at, organization_uuid, 5 more }`
225- `session: object`
215226
216227 The local session the messages belong to. `user.email_address` is always null on this endpoint; the messages endpoint does not resolve email addresses.
217228
from line 234
223234
224235 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.
225236
237 format: date-time
238
226239 - `organization_uuid: string`
227240
228241 UUID of the child organization the session belongs to
from line 246
233246
234247 - `type: "compliance_local_session"`
235248
236 - `"compliance_local_session"`
249 default: compliance_local_session
237250
238251 - `updated_at: string`
239252
240253 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.
241254
242 - `user: object { id, email_address }`
255 format: date-time
243256
257 - `user: object`
258
244259 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.
245260
246261 - `id: string`
from line 272
257272
258273### Example
259274
260```http
275```bash
261276curl https://api.anthropic.com/v1/compliance/apps/sessions/local/$LOCAL_SESSION_ID/messages \
262277 -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY"
263278```
264279
265#### Response
280#### Response (200)
266281
267282```json
268283{
from line 318
303318}
304319```
305320
306## Domain Types
321## Domain types
307322
308323### Message List Response
309324
310- `MessageListResponse object { id, content, created_at, 4 more }`
325- `MessageListResponse object`
311326
312327 A single user or assistant turn in a local session transcript.
313328
from line 330
315330
316331 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.
317332
318 - `content: array of object { text, truncated, type } or object { id, input, name, 2 more } or object { content, is_error, name, 3 more }`
333 - `content: array of object or object or object`
319334
320335 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`.
321336
322 - `Text object { text, truncated, type }`
337 - `Text object`
323338
324339 Text content block.
325340
from line 346
331346
332347 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.
333348
349 default: false
350
334351 - `type: "text"`
335352
336 - `"text"`
353 default: text
337354
338 - `ToolUse object { id, input, name, 2 more }`
355 - `ToolUse object`
339356
340357 Tool invocation requested by the assistant.
341358
from line 372
355372
356373 True when `input` was shortened. Pass `tool_use_input_max_bytes=-1` to request the server maximum.
357374
375 default: false
376
358377 - `type: "tool_use"`
359378
360 - `"tool_use"`
379 default: tool_use
361380
362 - `ToolResult object { content, is_error, name, 3 more }`
381 - `ToolResult object`
363382
364383 Result returned by a tool invocation.
365384
366 - `content: array of object { text, type }`
385 - `content: array of object`
367386
368387 Text content returned by the tool. Non-text item types are omitted and signalled via `truncated` with an in-band item-count marker.
369388
from line 392
373392
374393 - `type: "text"`
375394
376 - `"text"`
395 default: text
377396
378397 - `is_error: boolean`
379398
from line 410
391410
392411 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.
393412
413 default: false
414
394415 - `type: "tool_result"`
395416
396 - `"tool_result"`
417 default: tool_result
397418
398419 - `created_at: string`
399420
400421 When the message was recorded (RFC 3339, UTC)
401422
423 format: date-time
424
402425 - `model: string or null`
403426
404427 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.
405428
406 - `provenance: object { reason, type } or object { type } or object { type } or null`
429 - `provenance: object or object or object or null`
407430
408431 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.
409432
410 - `ContentUnavailable object { reason, type }`
433 - `ContentUnavailable object`
411434
412435 The turn's content cannot be returned; `content` is empty.
413436
from line 440
417440
418441 - `type: "content_unavailable"`
419442
420 - `"content_unavailable"`
443 default: content_unavailable
421444
422 - `ClientAsserted object { type }`
445 - `ClientAsserted object`
423446
424447 Assistant content the client supplied as conversation history
425448 rather than produced by Claude during this session. `content` shows
from line 452
429452
430453 - `type: "client_asserted"`
431454
432 - `"client_asserted"`
455 default: client_asserted
433456
434 - `SyntheticMarker object { type }`
457 - `SyntheticMarker object`
435458
436459 A transcript marker generated by the endpoint rather than sent by
437460 either party during the session. Marker messages indicate that the
from line 468
445468
446469 - `type: "synthetic_marker"`
447470
448 - `"synthetic_marker"`
471 default: synthetic_marker
449472
450473 - `role: "assistant" or "user"`
451474
from line 480
457480
458481 - `type: "compliance_local_session_message"`
459482
460 - `"compliance_local_session_message"`
483 default: compliance_local_session_message
461484
No line in this hunk matches that.