To enable the Compliance API, see the setup guide.
Set up the Compliance APIGet chat messages
GET/v1/compliance/apps/chats/{claude_chat_id}/messages
Retrieves message history and file metadata for a specific chat.
Path parameters
Query parameters
Headers
Returns
Get chat messages
cURL
curl https://api.anthropic.com/v1/compliance/apps/chats/$CLAUDE_CHAT_ID/messages \
-H 'anthropic-version: 2023-06-01' \
-H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY"Response 200
{
"id": "claude_chat_abc123",
"name": "Product Requirements Discussion",
"created_at": "2025-06-07T08:09:10Z",
"updated_at": "2025-06-07T08:10:05Z",
"organization_id": "org_abc123",
"organization_uuid": "abcdef01-2345-6789-abcd-ef0123456789",
"project_id": "claude_proj_xyz789",
"model": "claude-opus-5",
"user": {
"id": "user_xyz456",
"email_address": "user@example.com"
},
"href": "https://claude.ai/chat/abcdef01-2345-6789-abcd-ef0123456789",
"chat_messages": [
{
"id": "claude_chat_msg_abc123",
"role": "user",
"created_at": "2025-06-07T08:09:10Z",
"content": [
{
"type": "text",
"text": "Can you help me draft requirements for our new dashboard feature?",
"truncated": false,
"thinking_redacted": false
}
],
"files": [
{
"id": "claude_file_xyz789",
"filename": "dashboard_mockup_v1.pdf",
"mime_type": "application/pdf",
"size_bytes": 12345,
"md5": "5d41402abc4b2a76b9719d911017c592",
"created_at": "2025-06-07T08:09:10Z"
}
]
},
{
"id": "claude_chat_msg_def456",
"role": "assistant",
"created_at": "2025-06-07T08:09:11Z",
"content": [
{
"type": "text",
"text": "I'd be happy to help you draft requirements for your dashboard feature...",
"truncated": false,
"thinking_redacted": false
}
],
"artifacts": [
{
"id": "claude_artifact_abc123",
"version_id": "claude_artifact_version_xyz789",
"title": "Dashboard Requirements Draft",
"artifact_type": "text/markdown"
}
]
},
{
"id": "claude_chat_msg_ghi789",
"role": "user",
"created_at": "2025-06-07T08:10:00Z",
"content": [
{
"type": "text",
"text": "Are there any open support tickets about the dashboard?",
"truncated": false,
"thinking_redacted": false
}
]
},
{
"id": "claude_chat_msg_jkl012",
"role": "assistant",
"created_at": "2025-06-07T08:10:05Z",
"content": [
{
"type": "tool_use",
"id": "toolu_01Abc",
"name": "search_tickets",
"input": "{\"query\":\"dashboard\",\"status\":\"open\"}",
"truncated": false,
"integration_name": "Example Integration",
"mcp_server_url": "https://mcp.example.com"
},
{
"type": "tool_result",
"tool_use_id": "toolu_01Abc",
"name": "search_tickets",
"is_error": false,
"integration_name": "Example Integration",
"mcp_server_url": "https://mcp.example.com",
"content": [
{
"type": "text",
"text": "2 open tickets: #1042 Dashboard loads slowly; #1057 Export button missing"
}
],
"truncated": false
},
{
"type": "text",
"text": "There are two open tickets: one about slow loading and one about a missing export button.",
"truncated": false,
"thinking_redacted": false
}
]
}
],
"has_more": false,
"first_id": "eyJtc2dfdXVpZCI6ICIwZjcwYjA2Ni0uLi4ifQ==",
"last_id": "eyJtc2dfdXVpZCI6ICI3YzFlOWQ0Yi0uLi4ifQ=="
}Returns Examples
Response 200
{
"id": "claude_chat_abc123",
"name": "Product Requirements Discussion",
"created_at": "2025-06-07T08:09:10Z",
"updated_at": "2025-06-07T08:10:05Z",
"organization_id": "org_abc123",
"organization_uuid": "abcdef01-2345-6789-abcd-ef0123456789",
"project_id": "claude_proj_xyz789",
"model": "claude-opus-5",
"user": {
"id": "user_xyz456",
"email_address": "user@example.com"
},
"href": "https://claude.ai/chat/abcdef01-2345-6789-abcd-ef0123456789",
"chat_messages": [
{
"id": "claude_chat_msg_abc123",
"role": "user",
"created_at": "2025-06-07T08:09:10Z",
"content": [
{
"type": "text",
"text": "Can you help me draft requirements for our new dashboard feature?",
"truncated": false,
"thinking_redacted": false
}
],
"files": [
{
"id": "claude_file_xyz789",
"filename": "dashboard_mockup_v1.pdf",
"mime_type": "application/pdf",
"size_bytes": 12345,
"md5": "5d41402abc4b2a76b9719d911017c592",
"created_at": "2025-06-07T08:09:10Z"
}
]
},
{
"id": "claude_chat_msg_def456",
"role": "assistant",
"created_at": "2025-06-07T08:09:11Z",
"content": [
{
"type": "text",
"text": "I'd be happy to help you draft requirements for your dashboard feature...",
"truncated": false,
"thinking_redacted": false
}
],
"artifacts": [
{
"id": "claude_artifact_abc123",
"version_id": "claude_artifact_version_xyz789",
"title": "Dashboard Requirements Draft",
"artifact_type": "text/markdown"
}
]
},
{
"id": "claude_chat_msg_ghi789",
"role": "user",
"created_at": "2025-06-07T08:10:00Z",
"content": [
{
"type": "text",
"text": "Are there any open support tickets about the dashboard?",
"truncated": false,
"thinking_redacted": false
}
]
},
{
"id": "claude_chat_msg_jkl012",
"role": "assistant",
"created_at": "2025-06-07T08:10:05Z",
"content": [
{
"type": "tool_use",
"id": "toolu_01Abc",
"name": "search_tickets",
"input": "{\"query\":\"dashboard\",\"status\":\"open\"}",
"truncated": false,
"integration_name": "Example Integration",
"mcp_server_url": "https://mcp.example.com"
},
{
"type": "tool_result",
"tool_use_id": "toolu_01Abc",
"name": "search_tickets",
"is_error": false,
"integration_name": "Example Integration",
"mcp_server_url": "https://mcp.example.com",
"content": [
{
"type": "text",
"text": "2 open tickets: #1042 Dashboard loads slowly; #1057 Export button missing"
}
],
"truncated": false
},
{
"type": "text",
"text": "There are two open tickets: one about slow loading and one about a missing export button.",
"truncated": false,
"thinking_redacted": false
}
]
}
],
"has_more": false,
"first_id": "eyJtc2dfdXVpZCI6ICIwZjcwYjA2Ni0uLi4ifQ==",
"last_id": "eyJtc2dfdXVpZCI6ICI3YzFlOWQ0Yi0uLi4ifQ=="
}