Skip to main content
GET
/
v1
/
knowledge
List Knowledge Bases
curl --request GET \
  --url https://api.xpander.ai/v1/knowledge \
  --header 'x-api-key: <api-key>'
{
  "items": [
    {
      "id": "73dc30ca-bdbf-42f7-a39f-93aff4f8522e",
      "name": "Product Documentation",
      "description": "Contains product guides and API documentation",
      "type": "managed",
      "organization_id": "91fbe9bc-35b3-41e8-b59d-922fb5a0f031",
      "agent_id": null,
      "total_documents": 5
    }
  ],
  "total": 6,
  "page": 1,
  "per_page": 20,
  "total_pages": 1
}
Retrieve all knowledge bases in your organization with document counts and metadata.

Query Parameters

page
integer
default:1
Page number (starting from 1)
per_page
integer
default:20
Items per page (maximum 50)

Response

items
array
Array of knowledge base objects
total
integer
Total number of knowledge bases
page
integer
Current page number
per_page
integer
Number of items per page
total_pages
integer
Total number of pages available

Example Request

curl -X GET -H "x-api-key: <your-api-key>" \
  "https://api.xpander.ai/v1/knowledge?page=1&per_page=2"

Example Response

{
  "items": [
    {
      "id": "73dc30ca-bdbf-42f7-a39f-93aff4f8522e",
      "name": "Product Catalog",
      "description": "Complete product information and specifications",
      "type": "managed",
      "organization_id": "<org-id>",
      "agent_id": null,
      "total_documents": 12
    },
    {
      "id": "e21563bd-7c02-4f8f-9520-8c854f5c2ee6",
      "name": "Company Policies",
      "description": "Internal policies and procedures documentation",
      "type": "managed",
      "organization_id": "<org-id>",
      "agent_id": null,
      "total_documents": 8
    }
  ],
  "total": 5,
  "page": 1,
  "per_page": 2,
  "total_pages": 3
}

Notes

  • Knowledge bases are automatically filtered by your organization
  • total_documents reflects the number of documents currently indexed
  • Use pagination to retrieve large lists of knowledge bases

Authorizations

x-api-key
string
header
required

API Key for authentication

Query Parameters

page
integer
default:1

Page number (starting from 1)

Required range: x >= 1
per_page
integer
default:20

Items per page (max 50)

Required range: 1 <= x <= 50

Response

Successful Response

items
KnowledgeBaseItem · object[]
total
integer
page
integer
per_page
integer
total_pages
integer