Create Agent Knowledge
POSThttps://a.klaviyo.com/api/agent-knowledge
Adds an Agent Knowledge item from a text snippet (source.source_type: snippet, requires title and content), a single URL (source.source_type: webpage, requires url), a Q&A pair (source.source_type: qa, requires question and answer), or a folder (source.source_type: folder, requires title). Set parent_id to create the item inside a folder.
Titles are unique across every knowledge type; a webpage's title is its normalized URL and a Q&A item's title is its question. Returns 409 Conflict if the title is already in use, if an entire-site webpage overlaps an existing one, or if the company has reached its knowledge item limit. The resource is fetchable immediately; clients can poll its status until indexing completes. For files, use POST /agent-knowledge-files.
- Revision header
revision: 2026-10-15.prerequired- Scopes
agents:write- Rate limits
- Burst:
10/sSteady:150/m
Query parameters
For more information please visit API overview
Headers
API endpoint revision (format: YYYY-MM-DD[.suffix])
2026-10-15.pre
Request body
Content type: application/vnd.api+jsonrequired
Show 2 fields
Show 2 fields
Source payload for the new item.
snippetrequirestitleandcontent;webpagerequiresurland does not accept caller-provided content;qarequiresquestionandanswer;folderrequirestitle. To upload a file, usePOST /agent-knowledge-files.Option 2:
AgentKnowledgeWebpageCreateSourceRequestCreate a webpage-backed knowledge source from a URL.
URL to scrape and index.
Crawl scope for the webpage.
single-pageindexes only the given URL;entire-sitecrawls URLs listed in the site's root sitemap;selected-pagescrawls those URLs across every English locale, except those underexclude_prefixes.Whether to periodically re-index the webpage.
URL paths to skip when crawling, each starting with
/, such as/blog/archive. Up to 500 paths of up to 2048 characters each. Only accepted withselected-pagesscope.
Folder to create the item in. Omit to create it at the top level.
Responses
201Success
Content type: application/vnd.api+json
Show 4 fields
Unique Agent Knowledge identifier.
Show 7 fields
Source payload for the knowledge item.
Option 2:
AgentKnowledgeWebpageResponseSourceThe knowledge item was created from a webpage.
Normalized URL for the webpage-backed knowledge item.
Page title from the webpage's HTML, once crawled; otherwise null.
Crawl scope for the webpage-backed knowledge item.
Whether the webpage is periodically re-indexed.
URL paths skipped when crawling a
selected-pageswebpage. Values are normalized and may include paths Customer Agent excludes automatically.Total number of pages discovered beneath this webpage, at any depth, in every indexing state. Use it with
indexed_child_countandpending_child_countto track the progress of a site crawl, which can take hours. Only populated when listed via GET /agent-knowledge; null when fetched by id via GET /agent-knowledge/{id}, and null for every non-webpage source.0is not null: it means a webpage with no pages beneath it yet.Number of those pages that have finished indexing. Null under the same conditions as
child_count. This andpending_child_countdo not necessarily add up tochild_count, which also counts pages that failed or were rejected.Number of those pages still waiting to be indexed. Null under the same conditions as
child_count. Pages that failed or were rejected are not counted here, so this is notchild_countminusindexed_child_count.
Option 4:
AgentKnowledgeFolderResponseSourceThe knowledge item is a folder that organizes other knowledge items.
Human-readable title for the folder.
Number of knowledge items nested under this folder at any depth (nested folders don't count themselves, only their contents do). Only populated when listed via GET /agent-knowledge; null when fetched by id via GET /agent-knowledge/{id}.
Indexing lifecycle state for the knowledge item.
Date and time when the knowledge item was created.
Date and time when the knowledge item was last updated.
Date and time when indexing completed, if available.
Error message when indexing failed; otherwise null.
ISO 3166-1 alpha-2 codes of the countries the knowledge item is available in. Null means it is available in every country.
Show 1 field
4XXClient Error
Content type: application/vnd.api+json
5XXServer Error
Content type: application/vnd.api+json