# Get a knowledge base

`GET https://app.whatsetter.com/api/v1/knowledge-bases/{id}`

One base with its sources, one entry per website and per file, and one
entry for all its answers. `status` tells whether the agent can use a
source: `ready`, `reading` (being read), `failed` (could not be read)
or `empty` (nothing readable in it). `answers_limit`, `files_limit`
and the two `can_add_…` flags say what the workspace's plan allows.
A file's `id` reads its whole text (GET …/files/{fileId}); `editable`
tells whether that text can be rewritten through the API (a `.txt` or
`.md` file). Websites, PDF and Word files are added from the dashboard.
Requires scope `knowledge:read`.

## Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `id` | path | string | yes |  |

## Example request

```bash
curl --request GET \
  --url 'https://app.whatsetter.com/api/v1/knowledge-bases/{id}' \
  --header 'Authorization: Bearer ws_live_…'
```

## Responses

### 200: The knowledge base

```json
{
  "data": {
    "id": "68c1f1c4001a09be5d10",
    "name": "Salle Horizon",
    "campaign_ids": [
      "68c1f0a2003b6f1d2e77"
    ],
    "created_at": "2026-09-02T09:19:48.000+00:00",
    "sources": [
      {
        "id": "68c1f1d80033a1b07c55",
        "kind": "website",
        "name": "salle-horizon.fr",
        "status": "ready",
        "created_at": "2026-09-02T09:20:08.000+00:00",
        "url": "https://salle-horizon.fr",
        "pages_read": 12,
        "pages_found": 13,
        "last_read_at": "2026-10-05T03:17:02.000+00:00"
      },
      {
        "id": "68d40b7e000f1c2d3a66",
        "kind": "file",
        "name": "tarifs-2026.pdf",
        "status": "ready",
        "created_at": "2026-09-24T15:02:54.000+00:00",
        "pages": 3,
        "size_bytes": 184220,
        "editable": false
      },
      {
        "id": "68e61c2a0019f0a4d3b1",
        "kind": "file",
        "name": "opening-hours.txt",
        "status": "ready",
        "created_at": "2026-10-09T08:40:10.000+00:00",
        "pages": null,
        "size_bytes": 2310,
        "editable": true
      },
      {
        "id": null,
        "kind": "answers",
        "name": null,
        "status": "ready",
        "created_at": "2026-09-03T08:11:40.000+00:00",
        "answers": 14
      }
    ],
    "answers_limit": 200,
    "can_add_answers": true,
    "files_limit": 5,
    "can_add_files": true
  }
}
```

### 401: Missing, unknown or revoked API key

```json
{
  "error": {
    "code": "",
    "message": ""
  }
}
```

### 403: The key lacks the required scope (`insufficient_scope`), the plan does not have this part of the API (`not_in_plan`), or Instagram is not enabled on the workspace (`instagram_not_enabled`, Instagram routes)

```json
{
  "error": {
    "code": "",
    "message": ""
  }
}
```

### 404: Resource not found in this workspace

```json
{
  "error": {
    "code": "",
    "message": ""
  }
}
```


Source: https://docs.whatsetter.com/api-reference/operations/getknowledgebase/
