Get file metadata
GET/v1/compliance/apps/chats/files/{claude_file_id}
Retrieves metadata for a file referenced in chat messages, without
downloading the file content. Use the sibling /content endpoint to
download the bytes.
Returns
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.
Get file metadata
cURL
curl https://api.anthropic.com/v1/compliance/apps/chats/files/$CLAUDE_FILE_ID \
-H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY"{
"id": "claude_file_xyz789",
"filename": "quarterly_report.pdf",
"mime_type": "application/pdf",
"size_bytes": 1048576,
"md5": "5d41402abc4b2a76b9719d911017c592",
"created_at": "2024-01-15T10:30:00Z",
"message_ids": [
"claude_chat_msg_abc123"
],
"claude_chat_ids": [
"claude_chat_def456"
]
}Returns Examples
{
"id": "claude_file_xyz789",
"filename": "quarterly_report.pdf",
"mime_type": "application/pdf",
"size_bytes": 1048576,
"md5": "5d41402abc4b2a76b9719d911017c592",
"created_at": "2024-01-15T10:30:00Z",
"message_ids": [
"claude_chat_msg_abc123"
],
"claude_chat_ids": [
"claude_chat_def456"
]
}