> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getbutter.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Document

Get details of a specific knowledge base document.

### Headers

<ParamField header="X-API-Key" type="string" required>
  Your API key for authentication.
</ParamField>

<ParamField header="X-Organization-Id" type="string" required>
  The organization ID.
</ParamField>

### Path Parameters

<ParamField path="documentation_id" type="string" required>
  The unique identifier of the document (format: `doc_[a-f0-9]{12,}`).
</ParamField>

### Permissions

* `kb:read` (all roles)

### Response

<ResponseField name="success" type="boolean">
  Indicates if the request was successful.
</ResponseField>

<ResponseField name="data" type="object">
  The full document object.

  <Expandable title="properties">
    <ResponseField name="documentation_id" type="string">
      Unique document identifier.
    </ResponseField>

    <ResponseField name="name" type="string">
      Document name.
    </ResponseField>

    <ResponseField name="type" type="string">
      Document type (`file` or `text`).
    </ResponseField>

    <ResponseField name="client_id" type="string">
      Organization ID.
    </ResponseField>

    <ResponseField name="s3_key" type="string">
      S3 key for file storage.
    </ResponseField>

    <ResponseField name="s3_uri" type="string">
      Full S3 URI.
    </ResponseField>

    <ResponseField name="content_type" type="string">
      MIME type (for files).
    </ResponseField>

    <ResponseField name="size" type="integer">
      File size in bytes (for files).
    </ResponseField>

    <ResponseField name="filename" type="string">
      Original filename (for files).
    </ResponseField>

    <ResponseField name="content" type="string">
      Text content (for text documents).
    </ResponseField>

    <ResponseField name="word_count" type="integer">
      Word count (for text documents).
    </ResponseField>

    <ResponseField name="processing_status" type="string">
      Processing status: `pending`, `processing`, `completed`, or `failed`.
    </ResponseField>

    <ResponseField name="processing_error" type="string">
      Error message if processing failed.
    </ResponseField>

    <ResponseField name="page_count" type="integer">
      Number of pages (for files).
    </ResponseField>

    <ResponseField name="vector_count" type="integer">
      Number of vectors uploaded to Pinecone.
    </ResponseField>

    <ResponseField name="last_processed_at" type="string">
      ISO 8601 timestamp of last processing attempt.
    </ResponseField>

    <ResponseField name="created_at" type="string">
      ISO 8601 timestamp of creation.
    </ResponseField>

    <ResponseField name="updated_at" type="string">
      ISO 8601 timestamp of last update.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseExample>
  ```json Response theme={null}
  {
    "success": true,
    "data": {
      "documentation_id": "doc_a1b2c3d4e5f6",
      "name": "Product Manual.pdf",
      "type": "file",
      "client_id": "org_abc123",
      "s3_key": "knowledge-base/org_abc123/doc_a1b2c3d4e5f6.pdf",
      "s3_uri": "s3://bucket/knowledge-base/org_abc123/doc_a1b2c3d4e5f6.pdf",
      "content_type": "application/pdf",
      "size": 2450000,
      "filename": "Product Manual.pdf",
      "processing_status": "completed",
      "page_count": 42,
      "vector_count": 156,
      "last_processed_at": "2024-01-16T14:45:00Z",
      "created_at": "2024-01-15T10:30:00Z",
      "updated_at": "2024-01-16T14:45:00Z"
    }
  }
  ```
</ResponseExample>
