API Reference
Knowledge Base API
Programmatically manage knowledge base articles — create, update, search, and monitor retrieval analytics.
5 min read Updated July 2026
Endpoints
GET
/v1/knowledge/articlesList articlesPOST
/v1/knowledge/articlesCreate an articleGET
/v1/knowledge/articles/:idRetrieve an articlePATCH
/v1/knowledge/articles/:idUpdate an articleDELETE
/v1/knowledge/articles/:idDelete an articlePOST
/v1/knowledge/articles/:id/archiveArchive an articlePOST
/v1/knowledge/searchSearch articlesGET
/v1/knowledge/gapsList knowledge gapsCreate an article
POST /v1/knowledge/articles
Request body parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| title | string | Yes | Article title — used as the primary retrieval signal |
| body | string | Yes | Article body text. Plain text or Markdown. |
| tags | string[] | No | Topic tags for filtering and retrieval context |
| status | string | No | published (default) or draft. Drafts are not used in AI retrieval. |
Response
Searching the knowledge base
Use the search endpoint to query your knowledge base using natural language — the same way Liya's AI retrieval works internally.
POST /v1/knowledge/search
Knowledge gap API
Programmatically access detected knowledge gaps — topics customers asked about where no article was found. Useful for building custom gap-triage workflows or exporting gaps to a content management system.
GET /v1/knowledge/gaps
Use the Knowledge Gap API to build a weekly digest for your content team — export the top 10 gaps as a Notion database or Jira tickets to ensure new articles are written promptly.