> ## Documentation Index
> Fetch the complete documentation index at: https://docs.botcadence.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List sources

> List knowledge-base sources for a project

Returns a paginated list of knowledge-base sources (files, URLs, and domains).

## Authentication

<ParamField header="X-API-Key" type="string" required>
  Project API key for this organization and project. Format: `bot_live_…`
</ParamField>

## Path parameters

<ParamField path="organization_id" type="string" required>
  Organization ID. Must match the API key.
</ParamField>

<ParamField path="project_id" type="string" required>
  Project ID. Must match the API key.
</ParamField>

## Query parameters

<ParamField query="skip" type="integer" default="0">
  Number of records to skip.
</ParamField>

<ParamField query="limit" type="integer" default="20">
  Page size. Range: `1`–`100`.
</ParamField>

<ParamField query="filters" type="string">
  JSON filter object, for example `{"source_type":"files","sync_status":"success"}`.
</ParamField>

<ParamField query="sort" type="string">
  JSON sort object, for example `{"created_at":-1}`.
</ParamField>

## Response

<ResponseField name="items" type="array" required>
  Source objects with type, sync status, size/type metadata, and creator info.
</ResponseField>

<ResponseField name="pagination" type="object" required>
  Pagination metadata.
</ResponseField>

## Errors

<ResponseField name="401" type="Unauthorized">
  Missing, invalid, or revoked API key.
</ResponseField>

<ResponseField name="403" type="Forbidden">
  API key is not authorized for this organization or project.
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -G "https://backend.botcadence.com/organizations/ORG_ID/projects/PROJECT_ID/sources" \
    -H "X-API-Key: bot_live_YOUR_KEY" \
    --data-urlencode "skip=0" \
    --data-urlencode "limit=20" \
    --data-urlencode 'filters={"source_type":"files"}'
  ```

  ```javascript JavaScript theme={null}
  const params = new URLSearchParams({
    skip: "0",
    limit: "20",
    filters: JSON.stringify({ source_type: "files" }),
  });

  const response = await fetch(
    `https://backend.botcadence.com/organizations/${organizationId}/projects/${projectId}/sources?${params}`,
    { headers: { "X-API-Key": process.env.BOTCADENCE_API_KEY } }
  );
  ```

  ```python Python theme={null}
  import json
  import os
  import requests

  response = requests.get(
      f"https://backend.botcadence.com/organizations/{organization_id}/projects/{project_id}/sources",
      headers={"X-API-Key": os.environ["BOTCADENCE_API_KEY"]},
      params={
          "skip": 0,
          "limit": 20,
          "filters": json.dumps({"source_type": "files"}),
      },
  )
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "status": "success",
    "message": "Sources retrieved successfully",
    "data": {
      "items": [
        {
          "_id": "665f50000000000000000001",
          "name": "faq.pdf",
          "source_type": "files",
          "sync_status": "success",
          "file_size": 204800,
          "file_type": "application/pdf",
          "created_at": "2026-07-21T10:00:00Z",
          "updated_at": "2026-07-21T10:05:00Z"
        }
      ],
      "pagination": {
        "total": 1,
        "page": 1,
        "page_size": 20,
        "total_pages": 1,
        "has_next": false,
        "has_prev": false
      }
    },
    "status_code": 200
  }
  ```
</ResponseExample>
