Files
api/compliance/apps/chats/files
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.
api/compliance/apps/chats/files Changed · +23 / -24 lines
### Path parameters ### Headers #### Response (200) ### Path parameters ### Headers #### Response (200) ### Path parameters ### Headers ## Domain types ### Path Parameters ### Header Parameters #### Response ### Path Parameters ### Header Parameters #### Response ### Path Parameters ### Header Parameters ## Domain Types
---- -title: Files -url: https://platform.claude.com/docs/en/api/compliance/apps/chats/files ---- - # Files ## Get file metadata -**get** `/v1/compliance/apps/chats/files/{claude_file_id}` +**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. -### Path Parameters +### Path parameters - `claude_file_id: string` The file ID (tagged ID, e.g., claude_file_abc123) -### Header Parameters +### Headers - `"x-api-key": optional string`
File creation timestamp + format: date-time + - `filename: string or null` Display name of the file, if set
### Example -```http +```bash curl https://api.anthropic.com/v1/compliance/apps/chats/files/$CLAUDE_FILE_ID \ -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY" ``` -#### Response +#### Response (200) ```json {
## Delete file -**delete** `/v1/compliance/apps/chats/files/{claude_file_id}` +**DELETE** `/v1/compliance/apps/chats/files/{claude_file_id}` Permanently deletes a specific file. This is a destructive operation that cannot be undone. -### Path Parameters +### Path parameters - `claude_file_id: string` The file ID (tagged ID, e.g., claude_file_abc123) -### Header Parameters +### Headers - `"x-api-key": optional string`
Constant string confirming deletion - - `"claude_file_deleted"` + default: claude_file_deleted ### Example -```http +```bash curl https://api.anthropic.com/v1/compliance/apps/chats/files/$CLAUDE_FILE_ID \ -X DELETE \ -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY" ``` -#### Response +#### Response (200) ```json {
## Download file content -**get** `/v1/compliance/apps/chats/files/{claude_file_id}/content` +**GET** `/v1/compliance/apps/chats/files/{claude_file_id}/content` Downloads the binary content of a file referenced in chat messages. -### Path Parameters +### Path parameters - `claude_file_id: string` The file ID (tagged ID, e.g., claude_file_abc123) -### Header Parameters +### Headers - `"x-api-key": optional string` ### Example -```http +```bash curl https://api.anthropic.com/v1/compliance/apps/chats/files/$CLAUDE_FILE_ID/content \ -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY" ``` -## Domain Types +## Domain types ### File Retrieve Response -- `FileRetrieveResponse object { id, claude_chat_ids, created_at, 5 more }` +- `FileRetrieveResponse object` File metadata for GET /v1/compliance/apps/chats/files/{claude_file_id}.
File creation timestamp + format: date-time + - `filename: string or null` Display name of the file, if set
### File Delete Response -- `FileDeleteResponse object { id, type }` +- `FileDeleteResponse object` Response for deleting a compliance file.
Constant string confirming deletion - - `"claude_file_deleted"` + default: claude_file_deleted