---
title: "List Documents"
method: GET
path: "/api/v1/knowledge/documents"
tags: ["knowledge-documents"]
---

# List Documents

`GET /api/v1/knowledge/documents`

## Request

- Base URL: `https://api.gnosari.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.gnosari.com/api/v1/knowledge/documents`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-AUTH-TOKEN`

List indexed knowledge documents with pagination and filtering.

Returns documents from the user's account with optional filtering
by source. Documents are retrieved from OpenSearch.

**Filters:**
- `source_id`: Filter to documents from a specific knowledge source

**Pagination:**
- `limit`: Number of documents per page (default: 50, max: 100)
- `offset`: Number of documents to skip

**Security:**
The index is determined by the authenticated user's account ID.
Users can only access documents from their own account.

## Query parameters

- `source_id` string, nullable: Filter by source ID
- `skip` integer: Number of items to skip
- `limit` integer: Maximum items to return

## Response `200`

Successful Response

- PaginatedResponseDocumentSummary
  - `data` DocumentSummary[], required
    - `id` string, required: OpenSearch document ID
    - `title` string, required: Document title
    - `source_id` string, required: ID of the knowledge source
    - `content_preview` string: First 500 characters of content
    - `indexed_at` string, date-time, nullable: When the document was indexed
  - `pagination` PaginationMeta, required
    - `total` integer, required
    - `skip` integer, required
    - `limit` integer, required
    - `has_more` boolean, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/gnosari/apis/gnosari-api.md) · [All operations](https://skmtc.dev/gnosari/apis/gnosari-api/llms.txt) · [OpenAPI document](https://skmtc.dev/gnosari/apis/gnosari-api/revisions/f299cf53ae5f?raw)
