from line 1
1---
2title: Retrieve remote session messages
3url: https://platform.claude.com/docs/en/api/compliance/apps/sessions/remote/messages/list
4---
1# Retrieve remote session messages
52
6## Retrieve remote session messages
3**GET** `/v1/compliance/apps/sessions/remote/{claude_remote_session_id}/messages`
74
8**get** `/v1/compliance/apps/sessions/remote/{claude_remote_session_id}/messages`
9
105Retrieve one remote session's transcript: user prompts, assistant
116responses, and tool calls and results. Thinking blocks and images are
127not included.
from line 23
2823and for sessions outside the organizations the key may read. A
2924malformed session identifier returns 400.
3025
31### Path Parameters
26## Path parameters
3227
3328- `claude_remote_session_id: string`
3429
3530 The remote session identifier (`cse_...`) to retrieve
3631
37### Query Parameters
32## Query parameters
3833
3934- `limit: optional number`
4035
4136 Maximum results (default: 100, max: 1000)
4237
38 default: 100, maximum: 1000, minimum: 1
39
4340- `order: optional "asc" or "desc"`
4441
4542 Sort direction. `asc` (oldest-first) or `desc`.
4643
44 default: asc
45
4746 - `"asc"`
4847
4948 - `"desc"`
from line 55
5655
5756 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.
5857
58 default: 10000, maximum: 2147483647, minimum: -1
59
5960- `tool_use_input_max_bytes: optional number`
6061
6162 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.
6263
63### Header Parameters
64 default: 10000, maximum: 2147483647, minimum: -1
6465
66## Headers
67
6568- `"x-api-key": optional string`
6669
67### Returns
70## Returns
6871
69- `data: array of object { id, content, content_unavailable, 3 more }`
72- `data: array of object`
7073
7174 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.
7275
from line 77
7477
7578 Unique identifier for the message, e.g. `csev_abc123`
7679
77 - `content: array of object { text, truncated, type } or object { id, input, name, 2 more } or object { content, is_error, name, 3 more }`
80 - `content: array of object or object or object`
7881
7982 Content blocks within the message
8083
81 - `Text object { text, truncated, type }`
84 - `Text object`
8285
8386 Text content block.
8487
from line 93
9093
9194 True when `text` exceeded the server-defined maximum (approximately 1 MiB) and was shortened.
9295
96 default: false
97
9398 - `type: "text"`
9499
95 - `"text"`
100 default: text
96101
97 - `ToolUse object { id, input, name, 2 more }`
102 - `ToolUse object`
98103
99104 Tool invocation requested by the assistant.
100105
from line 119
114119
115120 True when `input` was shortened. Pass `tool_use_input_max_bytes=-1` to request full content, subject to the server-side maximum.
116121
122 default: false
123
117124 - `type: "tool_use"`
118125
119 - `"tool_use"`
126 default: tool_use
120127
121 - `ToolResult object { content, is_error, name, 3 more }`
128 - `ToolResult object`
122129
123130 Result returned by a tool invocation.
124131
125 - `content: array of object { text, type }`
132 - `content: array of object`
126133
127134 Text content returned by the tool. Non-text item types are omitted.
128135
from line 139
132139
133140 - `type: "text"`
134141
135 - `"text"`
142 default: text
136143
137144 - `is_error: boolean`
138145
from line 157
150157
151158 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.
152159
160 default: false
161
153162 - `type: "tool_result"`
154163
155 - `"tool_result"`
164 default: tool_result
156165
157166 - `content_unavailable: boolean`
158167
159168 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'.
160169
170 default: false
171
161172 - `created_at: string`
162173
163174 When the message was recorded (RFC 3339, UTC)
164175
176 format: date-time
177
165178 - `role: "assistant" or "user"`
166179
167180 Message sender (`user` or `assistant`)
from line 191
178191
179192 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.
180193
181- `session: object { id, agent_id, claude_project_id, 7 more }`
194- `session: object`
182195
183196 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.
184197
from line 211
198211
199212 When the session was created (RFC 3339, UTC)
200213
214 format: date-time
215
201216 - `organization_uuid: string`
202217
203218 UUID of the organization the session belongs to
from line 221
206221
207222 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.
208223
209 - `started_by_user: object { id, email_address } or null`
224 - `started_by_user: object or null`
210225
211226 A user associated with a remote session.
212227
from line 241
226241
227242 When the session was last modified (RFC 3339, UTC)
228243
229 - `user: object { id, email_address } or null`
244 format: date-time
230245
246 - `user: object or null`
247
231248 A user associated with a remote session.
232249
233250 - `id: string`
from line 255
238255
239256 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.
240257
241### Example
258## Example
242259
243```http
260```bash
244261curl https://api.anthropic.com/v1/compliance/apps/sessions/remote/$CLAUDE_REMOTE_SESSION_ID/messages \
245262 -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY"
246263```
247264
248#### Response
265### Response (200)
249266
250267```json
251268{
No line in this hunk matches that.