Documents
api/compliance/apps/projects/documents
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/projects/documents Changed · +35 / -32 lines
### Path parameters ### Headers #### Response (200) ### Path parameters ### Headers #### Response (200) ### Path parameters ### Headers #### Response (200) ## Domain types ### Path Parameters ### Header Parameters #### Response ### Path Parameters ### Header Parameters #### Response ### Path Parameters ### Header Parameters #### Response ## Domain Types
---- -title: Documents -url: https://platform.claude.com/docs/en/api/compliance/apps/projects/documents ---- - # Documents ## Get project document content -**get** `/v1/compliance/apps/projects/documents/{document_id}` +**GET** `/v1/compliance/apps/projects/documents/{document_id}` Get detailed information for a specific project document. -### Path Parameters +### Path parameters - `document_id: string` The document ID (tagged ID, e.g., claude_proj_doc_abc123) -### Header Parameters +### Headers - `"x-api-key": optional string`
Document creation timestamp + format: date-time + - `filename: string` Document filename -- `user: object { id, email_address } or null` +- `user: object or null` The user who created a project or project document.
### Example -```http +```bash curl https://api.anthropic.com/v1/compliance/apps/projects/documents/$DOCUMENT_ID \ -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY" ``` -#### Response +#### Response (200) ```json {
## Get project document metadata -**get** `/v1/compliance/apps/projects/documents/{document_id}/metadata` +**GET** `/v1/compliance/apps/projects/documents/{document_id}/metadata` Returns metadata for a project document, without the content body.
fields here are computed over the UTF-8 encoding of that text, so a DLP consumer can dedupe or match hashes without downloading every document. -### Path Parameters +### Path parameters - `document_id: string` The document ID (tagged ID, e.g., claude_proj_doc_abc123) -### Header Parameters +### Headers - `"x-api-key": optional string`
Document creation timestamp + format: date-time + - `filename: string` Document filename
MIME type of the document content, always plain text - - `"text/plain"` + default: text/plain - `size_bytes: number` Size in bytes of the document content (UTF-8 encoded) -- `user: object { id, email_address } or null` +- `user: object or null` The user who created a project or project document.
### Example -```http +```bash curl https://api.anthropic.com/v1/compliance/apps/projects/documents/$DOCUMENT_ID/metadata \ -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY" ``` -#### Response +#### Response (200) ```json {
## Delete project document -**delete** `/v1/compliance/apps/projects/documents/{document_id}` +**DELETE** `/v1/compliance/apps/projects/documents/{document_id}` Delete a project document for compliance purposes. Hard-deletes the project document permanently. -### Path Parameters +### Path parameters - `document_id: string` The document ID (tagged ID, e.g., claude_proj_doc_abc123) -### Header Parameters +### Headers - `"x-api-key": optional string`
Constant string confirming deletion. - - `"claude_project_document_deleted"` + default: claude_project_document_deleted ### Example -```http +```bash curl https://api.anthropic.com/v1/compliance/apps/projects/documents/$DOCUMENT_ID \ -X DELETE \ -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY" ``` -#### Response +#### Response (200) ```json {
} ``` -## Domain Types +## Domain types ### Document Retrieve Response -- `DocumentRetrieveResponse object { id, content, created_at, 2 more }` +- `DocumentRetrieveResponse object` Project document information for compliance responses.
Document creation timestamp + format: date-time + - `filename: string` Document filename - - `user: object { id, email_address } or null` + - `user: object or null` The user who created a project or project document.
### Document Metadata Response -- `DocumentMetadataResponse object { id, claude_project_id, created_at, 5 more }` +- `DocumentMetadataResponse object` Project document metadata for GET /v1/compliance/apps/projects/documents/{document_id}/metadata.
Document creation timestamp + format: date-time + - `filename: string` Document filename
MIME type of the document content, always plain text - - `"text/plain"` + default: text/plain - `size_bytes: number` Size in bytes of the document content (UTF-8 encoded) - - `user: object { id, email_address } or null` + - `user: object or null` The user who created a project or project document.
### Document Delete Response -- `DocumentDeleteResponse object { id, type }` +- `DocumentDeleteResponse object` Response for deleting a project document.
Constant string confirming deletion. - - `"claude_project_document_deleted"` + default: claude_project_document_deleted