Repository Public
1---2title: Documents3url: https://platform.claude.com/docs/en/api/compliance/apps/projects/documents4---56# Documents78## Get project document content910**GET** `/v1/compliance/apps/projects/documents/{document_id}`1112Get detailed information for a specific project document.1314### Path parameters1516- `document_id: string`1718 The document ID (tagged ID, e.g., claude_proj_doc_abc123)1920### Headers2122- `"x-api-key": optional string`2324### Returns2526- `id: string`2728 Project document identifier (tagged ID)2930- `content: string`3132 Document text content3334- `created_at: string`3536 Document creation timestamp3738 format: date-time3940- `filename: string`4142 Document filename4344- `user: object or null`4546 The user who created a project or project document.4748 Fields that reference this type are null when the creator's account has49 been deleted or the creator is no longer a member of an organization the50 key may read.5152 - `id: string`5354 User identifier (tagged ID)5556 - `email_address: string`5758 User's email address5960### Example6162```bash63curl https://api.anthropic.com/v1/compliance/apps/projects/documents/$DOCUMENT_ID \64 -H 'anthropic-version: 2023-06-01' \65 -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY"66```6768#### Response (200)6970```json71{72 "id": "claude_proj_doc_01Qr8StUvWxYzAbCdEfGhJjK",73 "content": "# Design notes\n\n- Item one\n- Item two\n",74 "created_at": "2025-03-12T18:22:41.123456Z",75 "filename": "design-notes.txt",76 "user": {77 "id": "user_01WCz1FkmYMm4gnmykNKUu3Q",78 "email_address": "jane.doe@example.com"79 }80}81```8283## Get project document metadata8485**GET** `/v1/compliance/apps/projects/documents/{document_id}/metadata`8687Returns metadata for a project document, without the content body.8889Use the sibling `GET /v1/compliance/apps/projects/documents/{document_id}`90endpoint to fetch the document text. The `md5` and `size_bytes`91fields here are computed over the UTF-8 encoding of that text, so a DLP92consumer can dedupe or match hashes without downloading every document.9394### Path parameters9596- `document_id: string`9798 The document ID (tagged ID, e.g., claude_proj_doc_abc123)99100### Headers101102- `"x-api-key": optional string`103104### Returns105106- `id: string`107108 Project document identifier (tagged ID)109110- `claude_project_id: string`111112 The project this document belongs to113114- `created_at: string`115116 Document creation timestamp117118 format: date-time119120- `filename: string`121122 Document filename123124- `md5: string`125126 Lowercase hex MD5 of the document content (UTF-8 encoded). Matches the `content` field returned by the sibling content endpoint.127128- `mime_type: "text/plain"`129130 MIME type of the document content, always plain text131132 default: text/plain133134- `size_bytes: number`135136 Size in bytes of the document content (UTF-8 encoded)137138- `user: object or null`139140 The user who created a project or project document.141142 Fields that reference this type are null when the creator's account has143 been deleted or the creator is no longer a member of an organization the144 key may read.145146 - `id: string`147148 User identifier (tagged ID)149150 - `email_address: string`151152 User's email address153154### Example155156```bash157curl https://api.anthropic.com/v1/compliance/apps/projects/documents/$DOCUMENT_ID/metadata \158 -H 'anthropic-version: 2023-06-01' \159 -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY"160```161162#### Response (200)163164```json165{166 "id": "id",167 "claude_project_id": "claude_project_id",168 "created_at": "2019-12-27T18:11:19.117Z",169 "filename": "filename",170 "md5": "md5",171 "mime_type": "text/plain",172 "size_bytes": 0,173 "user": {174 "id": "user_01WCz1FkmYMm4gnmykNKUu3Q",175 "email_address": "jane.doe@example.com"176 }177}178```179180## Delete project document181182**DELETE** `/v1/compliance/apps/projects/documents/{document_id}`183184Delete a project document for compliance purposes.185186Hard-deletes the project document permanently.187188### Path parameters189190- `document_id: string`191192 The document ID (tagged ID, e.g., claude_proj_doc_abc123)193194### Headers195196- `"x-api-key": optional string`197198### Returns199200- `type: "claude_project_document_deleted"`201202 Constant string confirming deletion.203204 default: claude_project_document_deleted205206- `id: string`207208 The ID of the project document that was deleted209210### Example211212```bash213curl https://api.anthropic.com/v1/compliance/apps/projects/documents/$DOCUMENT_ID \214 -X DELETE \215 -H 'anthropic-version: 2023-06-01' \216 -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY"217```218219#### Response (200)220221```json222{223 "id": "id",224 "type": "claude_project_document_deleted"225}226```227228## Domain types229230### Document Retrieve Response231232- `DocumentRetrieveResponse object`233234 Project document information for compliance responses.235236 - `id: string`237238 Project document identifier (tagged ID)239240 - `content: string`241242 Document text content243244 - `created_at: string`245246 Document creation timestamp247248 format: date-time249250 - `filename: string`251252 Document filename253254 - `user: object or null`255256 The user who created a project or project document.257258 Fields that reference this type are null when the creator's account has259 been deleted or the creator is no longer a member of an organization the260 key may read.261262 - `id: string`263264 User identifier (tagged ID)265266 - `email_address: string`267268 User's email address269270### Document Delete Response271272- `DocumentDeleteResponse object`273274 Response for deleting a project document.275276 - `type: "claude_project_document_deleted"`277278 Constant string confirming deletion.279280 default: claude_project_document_deleted281282 - `id: string`283284 The ID of the project document that was deleted285286### Document Metadata Response287288- `DocumentMetadataResponse object`289290 Project document metadata for GET /v1/compliance/apps/projects/documents/{document_id}/metadata.291292 Returns metadata only. Use the sibling endpoint (without `/metadata`)293 to fetch the document text content.294295 - `id: string`296297 Project document identifier (tagged ID)298299 - `claude_project_id: string`300301 The project this document belongs to302303 - `created_at: string`304305 Document creation timestamp306307 format: date-time308309 - `filename: string`310311 Document filename312313 - `md5: string`314315 Lowercase hex MD5 of the document content (UTF-8 encoded). Matches the `content` field returned by the sibling content endpoint.316317 - `mime_type: "text/plain"`318319 MIME type of the document content, always plain text320321 default: text/plain322323 - `size_bytes: number`324325 Size in bytes of the document content (UTF-8 encoded)326327 - `user: object or null`328329 The user who created a project or project document.330331 Fields that reference this type are null when the creator's account has332 been deleted or the creator is no longer a member of an organization the333 key may read.334335 - `id: string`336337 User identifier (tagged ID)338339 - `email_address: string`340341 User's email address342