---
title: "Get Document"
method: GET
path: "/api/v1/knowledge/{id}/documents/{documentId}"
tags: ["Knowledge Bases"]
---

# Get Document

`GET /api/v1/knowledge/{id}/documents/{documentId}`

Get details of a specific document in a knowledge base.

## Path parameters

- `id` string, required
- `documentId` string, required

## Query parameters

- `workspaceId` string, required

## Response `200`

Document details.

- object
  - `success` boolean — Whether the request was successful.
  - `data` object — Response payload containing the document details.
    - `document` KnowledgeDocumentDetail — Detailed document information including processing and connector details.
      - `id` string — Unique document identifier.
      - `knowledgeBaseId` string — Knowledge base this document belongs to.
      - `filename` string — Original filename.
      - `fileSize` integer — File size in bytes.
      - `mimeType` string — MIME type of the file.
      - `processingStatus` 'pending' | 'processing' | 'completed' | 'failed' — Current processing status.
      - `processingError` string, nullable — Error message if processing failed.
      - `processingStartedAt` string, date-time, nullable — When processing started.
      - `processingCompletedAt` string, date-time, nullable — When processing completed.
      - `chunkCount` integer — Number of chunks created.
      - `tokenCount` integer — Total token count.
      - `characterCount` integer — Total character count.
      - `enabled` boolean — Whether the document is enabled for search.
      - `connectorId` string, nullable — Connector ID if sourced from an external connector.
      - `connectorType` string, nullable — Connector type (e.g. google-drive, notion).
      - `sourceUrl` string, nullable — Original source URL for connector-sourced documents.
      - `createdAt` string, date-time — ISO 8601 timestamp when the document was uploaded.

## Other responses

- `401` — Invalid or missing API key. Ensure the X-API-Key header is set with a valid key.
- `403` — Access denied. You do not have permission to access this resource. For audit log endpoints, this requires an Enterprise subscription and organization admin/owner role.
- `404` — The requested resource was not found. Verify the ID is correct and belongs to your workspace.
- `429` — Rate limit exceeded. Wait for the duration specified in the Retry-After header before retrying. The X-RateLimit-* headers accompany every response from an authenticated v1 request — success and error alike — and are omitted only when the request fails authentication, since no rate-limit bucket is consulted in that case.

## Changes

- **2026-03-14** `86c22a5b6914` — 1 info
  - endpoint added
- **2026-03-02** `f8d20edc8aab` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/simstudioai/apis/sim-api/changes/api/v1/knowledge/:id/documents/:documentId/get.md)

---

[API](https://skmtc.dev/simstudioai/apis/sim-api.md) · [All operations](https://skmtc.dev/simstudioai/apis/sim-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/simstudioai/sim-api/revisions/66a471c5b1df/schema)
