Create Agent Knowledge File
POSThttps://a.klaviyo.com/api/agent-knowledge-files
Uploads a file (PDF, DOCX, TXT, etc.) and indexes its contents as Agent Knowledge with source_type: file.
Returns the new Agent Knowledge resource immediately; clients can poll its status until indexing completes.
- Revision header
revision: 2026-07-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-07-15.pre
Request body
Content type: multipart/form-datarequired
Human-readable title for the file-backed knowledge item.
File to upload and index as Agent Knowledge.
Responses
201Success
Content type: application/vnd.api+json
Show 4 fields
Unique Agent Knowledge identifier.
Show 6 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.
Crawl scope for the webpage-backed knowledge item.
Whether the webpage is periodically re-indexed.
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.
Show 1 field
4XXClient Error
Content type: application/vnd.api+json
5XXServer Error
Content type: application/vnd.api+json