Knowledge
Manage your Knowledge Base programmatically so chat and intel can ground answers on your own material.
Add a source
Section titled “Add a source”POST /api/knowledge
Add a source by URL or by text. The source is queued for indexing and
becomes usable once its status reaches indexed.
| Field | Type | Description |
|---|---|---|
url | string | Index a single web page. |
text | string | Index raw text you provide. |
name | string | Optional display name. |
# Add a URLcurl https://ai.mixerlead.com/api/knowledge \ -H "Authorization: Bearer $MIXERLEAD_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "url": "https://example.com/whitepaper", "name": "Whitepaper" }'{ "id": "kb_…", "status": "indexing" }To upload a file, send a multipart/form-data request with a file field:
curl https://ai.mixerlead.com/api/knowledge \ -H "Authorization: Bearer $MIXERLEAD_API_KEY" \ -F "file=@./brand-guidelines.pdf"Crawl a site
Section titled “Crawl a site”POST /api/knowledge/crawl
| Field | Type | Required | Description |
|---|---|---|---|
seedUrl | string | ✅ | The starting URL to crawl. |
maxPages | number | — | Maximum pages to index. |
curl https://ai.mixerlead.com/api/knowledge/crawl \ -H "Authorization: Bearer $MIXERLEAD_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "seedUrl": "https://example.com/docs", "maxPages": 12 }'{ "crawlId": "…", "status": "indexing", "maxPages": 12 }List sources
Section titled “List sources”GET /api/knowledge
{ "sources": [ { "id": "kb_…", "type": "url", "source_url_or_path": "https://example.com/whitepaper", "status": "indexed", "chunk_count": 42, "enabled": 1, "created_at": "2026-06-11T10:00:00Z", "indexed_at": "2026-06-11T10:01:12Z", "last_error": null } ]}Enable or disable a source
Section titled “Enable or disable a source”PATCH /api/knowledge/{id}
Only enabled sources are used for grounding. Disable a source to remove it from answers without deleting it.
curl -X PATCH https://ai.mixerlead.com/api/knowledge/kb_123 \ -H "Authorization: Bearer $MIXERLEAD_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "enabled": false }'Re‑index a source
Section titled “Re‑index a source”POST /api/knowledge/{id}/reindex
Re‑runs indexing for a single source (to pick up changes or recover from an error).
Delete a source
Section titled “Delete a source”DELETE /api/knowledge/{id}
curl -X DELETE https://ai.mixerlead.com/api/knowledge/kb_123 \ -H "Authorization: Bearer $MIXERLEAD_API_KEY"Related
Section titled “Related” Knowledge Base guide The feature in the app.
Chat & models Use grounded knowledge in chat.
Errors & rate limits Status codes and retries.