Knowledge bases
Create and manage knowledge bases, and read the entries your agents answer from.
A knowledge base is a named collection of entries that an agent can draw on during a call. You can create, rename and delete knowledge bases here. Entries are read-only through this API.
| Endpoint | Request |
|---|---|
| List knowledge bases | GET/v1/knowledge-bases |
| Get a knowledge base | GET/v1/knowledge-bases/:id |
| Create a knowledge base | POST/v1/knowledge-bases |
| Update a knowledge base | PATCH/v1/knowledge-bases/:id |
| Delete a knowledge base | DEL/v1/knowledge-bases/:id |
| List entries | GET/v1/knowledge-bases/:id/entries |
The knowledge base object
Fields use camelCase. Optional fields are left out of the response when they have no value.
Attributes
idstringrequirednamestringrequireddescriptionstringentryCountintegerrequired0.createdAtstringrequiredupdatedAtstringrequiredThe entry object
Attributes
idstringrequiredknowledgeBaseIdstringrequiredquestionstringanswerstringrequiredcategorystringpriorityintegerrequired5.entryTypestringrequiredqa_pair, document or scraped_url.fileNamestringfileSizeintegermimeTypestringcreatedAtstringrequiredupdatedAtstringrequiredList knowledge bases
/v1/knowledge-basesread keyReturns your knowledge bases, sorted by name.
Query parameters
limitintegerdefault 50offsetintegerdefault 0searchstring* returns 400.pagination.total is the true number of matching knowledge bases.
A limit or offset outside the allowed range returns 400.
curl "https://backend.synthesys.app/api/v1/knowledge-bases?limit=10&search=support" \
-H "SYNTH_API_KEY: YOUR_API_KEY"{
"success": true,
"data": [
{
"id": "3f2a9c1e-7b4d-4e8a-9f10-2c6d8e1a5b70",
"name": "Support FAQ",
"description": "Answers to common support questions",
"createdAt": "2026-09-01T10:00:00+00:00",
"updatedAt": "2026-09-14T08:30:00+00:00",
"entryCount": 42
}
],
"pagination": { "total": 1, "limit": 10, "offset": 0 }
}Get a knowledge base
/v1/knowledge-bases/:idread keyReturns one knowledge base with its entry count.
Returns 404 if the knowledge base doesn't exist on your account. An ID that isn't a valid UUID returns 400.
curl https://backend.synthesys.app/api/v1/knowledge-bases/3f2a9c1e-7b4d-4e8a-9f10-2c6d8e1a5b70 \
-H "SYNTH_API_KEY: YOUR_API_KEY"{
"success": true,
"data": {
"id": "3f2a9c1e-7b4d-4e8a-9f10-2c6d8e1a5b70",
"name": "Support FAQ",
"description": "Answers to common support questions",
"createdAt": "2026-09-01T10:00:00+00:00",
"updatedAt": "2026-09-14T08:30:00+00:00",
"entryCount": 42
}
}Create a knowledge base
/v1/knowledge-baseswrite keyCreates an empty knowledge base and returns it with status 201. The body takes only the fields below. Other fields, such as agent_id, are ignored, so link a knowledge base to an agent in the dashboard.
Body parameters
namestringrequireddescriptionstringErrors:
400:nameis missing or empty, or a value is over its length limit.details.issuesnames the field.409: a knowledge base with this name already exists.
curl -X POST https://backend.synthesys.app/api/v1/knowledge-bases \
-H "SYNTH_API_KEY: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "Support FAQ", "description": "Answers to common support questions"}'{
"success": true,
"data": {
"id": "3f2a9c1e-7b4d-4e8a-9f10-2c6d8e1a5b70",
"name": "Support FAQ",
"description": "Answers to common support questions",
"createdAt": "2026-10-01T10:00:00+00:00",
"updatedAt": "2026-10-01T10:00:00+00:00",
"entryCount": 0
}
}Update a knowledge base
/v1/knowledge-bases/:idwrite keyChanges the name or description. Send at least one field.
Body parameters
namestringdescriptionstringErrors:
400: the body is empty,nameis empty, or a value is over its length limit.404: the knowledge base doesn't exist on your account.409: a knowledge base with this name already exists.
curl -X PATCH https://backend.synthesys.app/api/v1/knowledge-bases/3f2a9c1e-7b4d-4e8a-9f10-2c6d8e1a5b70 \
-H "SYNTH_API_KEY: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "Customer support FAQ"}'{
"success": true,
"data": {
"id": "3f2a9c1e-7b4d-4e8a-9f10-2c6d8e1a5b70",
"name": "Customer support FAQ",
"description": "Answers to common support questions",
"createdAt": "2026-09-01T10:00:00+00:00",
"updatedAt": "2026-10-01T10:00:00+00:00",
"entryCount": 0
}
}Delete a knowledge base
/v1/knowledge-bases/:iddelete keyDeletes the knowledge base and all its entries, and unlinks it from any agents that use it.
Returns 404 if the knowledge base doesn't exist on your account. An ID that isn't a valid UUID returns 400.
curl -X DELETE https://backend.synthesys.app/api/v1/knowledge-bases/3f2a9c1e-7b4d-4e8a-9f10-2c6d8e1a5b70 \
-H "SYNTH_API_KEY: YOUR_API_KEY"{
"success": true,
"message": "Knowledge base deleted successfully"
}List entries
/v1/knowledge-bases/:id/entriesread keyReturns the entries in a knowledge base. Here, pagination.total is the full number of matching entries.
Query parameters
limitintegerdefault 50offsetintegerdefault 0searchstring* returns 400.categorystringentry_typestringqa_pair, document or scraped_url.Errors:
400:entry_type,limit,offsetorsearchis invalid.404: the knowledge base doesn't exist on your account.
curl "https://backend.synthesys.app/api/v1/knowledge-bases/3f2a9c1e-7b4d-4e8a-9f10-2c6d8e1a5b70/entries?entry_type=qa_pair&limit=20" \
-H "SYNTH_API_KEY: YOUR_API_KEY"{
"success": true,
"data": [
{
"id": "a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"knowledgeBaseId": "3f2a9c1e-7b4d-4e8a-9f10-2c6d8e1a5b70",
"question": "What are your opening hours?",
"answer": "We are open from 9am to 5pm, Monday to Friday.",
"category": "general",
"priority": 5,
"entryType": "qa_pair",
"createdAt": "2026-09-01T10:05:00+00:00",
"updatedAt": "2026-09-01T10:05:00+00:00"
}
],
"pagination": { "total": 1, "limit": 20, "offset": 0 }
}