---
title: "List Knowledge Base Documents"
method: GET
path: "/knowledge-bases/{kbId}/documents"
tags: ["Knowledge Base"]
---

# List Knowledge Base Documents

`GET /knowledge-bases/{kbId}/documents`

## Request

- Base URL: `https://api.speakai.co/v1`
- URL: `https://api.speakai.co/v1/knowledge-bases/{kbId}/documents`
- Auth: API key in header `x-speakai-key` and API key in header `x-access-token`

### List Documents

Lists every document in the collection, newest first. Each item's full text is not included -- fetch it separately from Get Document Text.

## Path parameters

- `kbId` string, required

## Response `200`

OK

- object
  - `status` 'success'
  - `data` object[]
    - `documentId` string: Server-generated. Immutable.
    - `knowledgeBaseId` string
    - `source` 'upload' | 'website' | 'manual': This endpoint set only creates manual documents; upload and website documents come from endpoints not covered here.
    - `title` string
    - `description` string, nullable
    - `fileName` string, nullable: Set only for an uploaded file.
    - `mimeType` string, nullable
    - `sizeBytes` number
    - `sourceUrl` string, nullable: Set only for a website document.
    - `pageUrl` string, nullable: Set only for a website document.
    - `status` 'uploaded' | 'parsing' | 'parsed' | 'embedding' | 'ready' | 'failed'
    - `error` string, nullable
    - `parse` object, nullable
      - `engine` string
      - `pages` number
      - `costUsd` number
      - `parsedAt` string, date-time
    - `createdAt` string, date-time

## Other responses

- `404`: Not Found

---

[API](https://skmtc.dev/speakai/apis/speak-ai-api.md) · [All operations](https://skmtc.dev/speakai/apis/speak-ai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/speakai/apis/speak-ai-api/revisions/52d777e6d46e?raw)
