Teach an agent something
Adds a source, and answers it pending: it is read in the background, so list the sources
until it is finished or failed. It is live as soon as it is read. Knowledge has no draft,
so an agent that is already published answers from it too.
text is a text you write, up to 200,000 characters. website is a page the agent reads from
url. A link to a document served as PDF, Word, Markdown, RTF, plain text or HTML is read the
same way, for what it says. document is a file you upload, sent as multipart/form-data:
a .pdf, .docx, .txt, .md, .rtf or .html of up to 5 MB, named after the file unless
you give it a name.
Needs the permission to edit bots. Counts against your brand's write limit.
Path Parameters
- Type: stringFormat: uuidknowledge
_id requiredThe agent's knowledge, as it answers
knowledge.repository_id.
Body·
- Type: "text" or "website"enumtyperequired
- Type: stringname
What the source is called. Needed for
text; awebsitewithout one is named after its URL. - Type: stringenumrefresh
_interval How often a
websiteis read again.valuesneverdailyweeklybiweeklymonthly - Type: stringtext
The text, for
text. - Type: stringurl
The page or the document, for
website.
Responses
- application/json
- application/json
- application/json
- application/json
- application/json
- application/json
- application/json
- application/json
curl https://api.landbot.io/v3/knowledge/123e4567-e89b-12d3-a456-426614174000/sources \
--request POST \
--header 'Content-Type: application/json' \
--cookie 'sessionid=YOUR_SECRET_TOKEN' \
--data '{
"type": "text",
"name": "",
"text": "",
"url": "",
"refresh_interval": "never"
}'
{
"data": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"type": "text",
"name": "string",
"status": "pending",
"fail_reason": "crawl_error",
"refresh_interval": "never",
"created_at": "2026-10-08T14:57:40",
"updated_at": "2026-10-08T14:57:40"
}
}