---
title: "Return a list of Knowledge Base Items."
method: GET
path: "/v1/voice-agents/knowledge-base/list"
---

# Return a list of Knowledge Base Items.

`GET /v1/voice-agents/knowledge-base/list`

## Query parameters

- `voiceAgentId` string — Optional UUID of the voice agent to filter associated knowledge bases items.
- `isActive` boolean — Optional boolean indicating whether to fetch active knowledge base items.
- `used` string — Optional boolean-like string indicating whether to fetch used knowledge base items in any voice agent.
- `skip` string — Page number for pagination. Defaults to '1'.
- `take` string — Number of items to take for pagination. Defaults to '10'.
- `search` string — A search query to filter knowledge base items' names.
- `type` string[] — An array of knowledge base item type to filter by.
- `status` string[] — An array of knowledge base item status to filter by.
- `extensions` string[] — An array of knowledge base item extensions to filter by when the type is FILE.
- `sortField` 'words' | 'createdAt' | 'fileSize' — The field name to sort the results by
- `sortOrder` 'asc' | 'desc' — Sort order. Can be 'asc' or 'desc'.

## Response `200`

Successful response

- ListKnowledgeBaseItemsResponse
  - `success` boolean
  - `message` string
  - `data` object
    - `total` number — The total number of knowledge base items over all pages.
    - `filtered` number — The filtered/returned number of knowledge base items.
    - `items` KnowledgeBaseItem[]
      - `id` string — The unique identifier of the knowledge base item.
      - `userId` string — The user ID associated with the knowledge base item.
      - `projectId` string — The project ID associated with the knowledge base item.
      - `itemName` string — The name of the knowledge base item.
      - `fileSize` string — The size of the file.
      - `type` 'TEXT' | 'URL' | 'FILE' — The type of the knowledge base item.
      - `status` string — The current status of the knowledge base item.
      - `failureReason` string — The reason for failure if the item processing failed.
      - `content` string — The text content of the knowledge base item.
      - `itemUrl` string — The URL of the knowledge base item.
      - `itemUrls` string[] — The URLs of the item (required when the type is URL).
      - `wordsNumber` number — The words count in the knowledge base item.
      - `extension` string — The extension of the knowledge base item in case it was a file.
      - `createdAt` string, date-time — The timestamp when the knowledge base item was created.
      - `isActive` boolean — Indicates whether the knowledge base item is currently active in any voice agent.
      - `used` boolean — Indicates whether the knowledge base item is currently used in any voice agent. Can be used in filtering.

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `500` — Server Side Error

---

[API](https://skmtc.net/tryhamsa/apis/hamsa-api.md) · [All operations](https://skmtc.net/tryhamsa/apis/hamsa-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/tryhamsa/hamsa-api/versions/ecbeb5d8dc13/schema)
