中文 ← MyDocs

Get project document metadata

get /v1/compliance/apps/projects/documents/{document_id}/metadata

Returns metadata for a project document, without the content body.

Use the sibling GET /v1/compliance/apps/projects/documents/{document_id} endpoint to fetch the document text. The md5 and size_bytes 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

  • document_id: string

    The document ID (tagged ID, e.g., claude_proj_doc_abc123)

Header Parameters

  • "x-api-key": optional string

Returns

  • id: string

    Project document identifier (tagged ID)

  • claude_project_id: string

    The project this document belongs to

  • created_at: string

    Document creation timestamp

  • filename: string

    Document filename

  • md5: string

    Lowercase hex MD5 of the document content (UTF-8 encoded). Matches the content field returned by the sibling content endpoint.

  • mime_type: "text/plain"

    MIME type of the document content, always plain text

    • "text/plain"
  • size_bytes: number

    Size in bytes of the document content (UTF-8 encoded)

  • user: object { id, email_address }

    User information for project creator.

    • id: string

      User identifier (tagged ID)

    • email_address: string

      User's email address

Example

curl https://api.anthropic.com/v1/compliance/apps/projects/documents/$DOCUMENT_ID/metadata \
    -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY"

Response

{
  "id": "id",
  "claude_project_id": "claude_project_id",
  "created_at": "2019-12-27T18:11:19.117Z",
  "filename": "filename",
  "md5": "md5",
  "mime_type": "text/plain",
  "size_bytes": 0,
  "user": {
    "id": "id",
    "email_address": "email_address"
  }
}