Vexar API

Knowledge Base

The knowledge base feeds the AI with your content. Entries (“chunks”) can be plain text, FAQ pairs, or crawled pages, and are embedded for semantic search. The number of chunks is plan-limited. Authentication required.

GET /api/v1/sites/{id}/knowledge Auth

List knowledge entries (paginated).

ParamTypeInDescription
pageintqueryPage (default 1)
per_pageintqueryPage size (default 20, max 100)
typestringqueryFilter by content_type
searchstringquerySearch title/content
Response
{
  "success": true,
  "data": [ { "id": 7, "title": "Returns", "content_type": "faq", "content_preview": "…", "is_active": true } ],
  "pagination": { "total": 120, "page": 1, "per_page": 20, "pages": 6 },
  "last_rescan_at": null
}
POST /api/v1/sites/{id}/knowledge Auth

Add an entry. type: custom (text) or faq. For FAQ send question + content (the answer).

Request body
{ "type": "faq", "question": "Do you ship worldwide?", "content": "Yes, we ship to 50+ countries." }
Response
{ "success": true, "chunk": { "id": 8, "title": "Do you ship worldwide?", "content_type": "faq" } }
GET /api/v1/knowledge/{id} Auth

Get a single entry.

Response
{ "success": true, "chunk": { … } }
PUT /api/v1/knowledge/{id} Auth

Update title/content (re-embeds on content change).

Request body
{ "content": "Updated answer." }
Response
{ "success": true, "chunk": { … } }
DELETE /api/v1/knowledge/{id} Auth

Delete an entry.

Response
{ "success": true, "message": "Deleted" }
POST /api/v1/sites/{id}/knowledge/rebuild Auth

Delete crawled (non-manual) entries and re-crawl the site.

Response
{ "success": true, "message": "Knowledge rebuild started" }
DELETE /api/v1/sites/{id}/knowledge/all Auth

Delete all knowledge entries for the site.

Response
{ "success": true, "deleted": 120, "message": "All knowledge cleared" }