Knowledge

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.

Needs the permission to edit bots. Counts against your brand's write limit.

post/knowledge/{knowledge_id}/sources

Request

  • Base URL: https://api.landbot.io/v3
  • URL: https://api.landbot.io/v3/knowledge/{knowledge_id}/sources
  • Auth: one of:
    • API key in cookie sessionid
    • HTTP bearer
    • API key in header Authorization

Request body

type'text' | 'website' required
namestring

What the source is called. Needed for text; a website without one is named after its URL.

textstring

The text, for text.

urlstring

The page or the document, for website.

refresh_interval'never' | 'daily' | 'weekly' | 'biweekly' | 'monthly'

How often a website is read again.

Response

The source, waiting to be read

Example response

{
  "data": {
    "fail_reason": "crawl_error",
    "created_at": "2026-10-08T14:57:40",
    "updated_at": "2026-10-08T14:57:40"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.