Add a knowledge source
Adds a source to your knowledge library and queues it for indexing. Send JSON for pasted text (kind: text, with name and text, up to 200,000 characters), a website (kind: url; up to 20 pages of the same site are read) or a Google Sheet anyone with the link can view (kind: sheet). Send a file as multipart form data (file, and an optional name): PDF, Word (.docx), text, Markdown, CSV or HTML, up to 10 MB. The source is read before this returns; one that can’t be read isn’t saved. A website or sheet tab you already have answers 409 already_added with the existing source, unless you send again: true. Send an Idempotency-Key. Returns 201; the source is processing until its index is built, then ready.
Scopes: knowledge:write
Authorizations
An API key from Settings → API keys, sent as Authorization: Bearer kb_live_…. A workspace key starts kb_; a personal key starts kbp_ and acts as its owner.
Headers
A unique key (a UUID works) for this request. Retrying with the same key returns the first answer instead of running twice.
255The API version to answer as, a date (YYYY-MM-DD). Leave it out for the current version (2026-11-07). An unknown version is refused with 400 unsupported_api_version.
2026-11-07 "2026-11-07"