Skip to content
Dashboard

Get a knowledge base

GET
/knowledge-bases/{id}
curl --request GET \
--url https://app.whatsetter.com/api/v1/knowledge-bases/example \
--header 'Authorization: Bearer <token>'

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.

id
required

A base id from GET /knowledge-bases, or a campaign’s knowledge_base_id

string

The knowledge base

Media typeapplication/json
object
data
object
id
string
name
string | null
campaign_ids

The agents that answer from this base (the id of GET /campaigns).

Array<string>
sources
object
websites
integer
files
integer
answers
integer
created_at
string format: date-time
sources
Array<object>
object
id

null for the answers, which have their own endpoint.

string | null
kind
string
Allowed values: website file answers
name
string | null
status
string
Allowed values: ready reading failed empty
created_at
string format: date-time
url

Websites only.

string | null
pages_read

Websites only.

integer
pages_found

Websites only.

integer
last_read_at

Websites only.

string | null format: date-time
pages

Files only.

integer | null
size_bytes

Files only.

integer | null
editable

Files only. true for a text file (.txt, .md): PATCH …/files/{fileId} rewrites it.

boolean
answers

Answers only.

integer
answers_limit

How many answers the plan lets this base hold.

integer
can_add_answers

false on a plan that reads its knowledge but adds none.

boolean
files_limit

How many files the plan lets this base hold.

integer
can_add_files

false on a plan that reads its knowledge but adds none.

boolean
Example
{
"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
}
}

Missing, unknown or revoked API key

Media typeapplication/json
object
error
object
code
string
message
string
Examplegenerated
{
"error": {
"code": "example",
"message": "example"
}
}

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)

Media typeapplication/json
object
error
object
code
string
message
string
Examplegenerated
{
"error": {
"code": "example",
"message": "example"
}
}

Resource not found in this workspace

Media typeapplication/json
object
error
object
code
string
message
string
Examplegenerated
{
"error": {
"code": "example",
"message": "example"
}
}