config.knowledge.ids.
Reading needs knowledge:read; every change needs knowledge:write.
Add a source
POST /v1/knowledge/sources takes JSON for text, a website or a sheet, and multipart form data for a file. It needs an Idempotency-Key.
The source is read before the request returns, so a page or file that can’t be read is refused rather than saved. The answer is
201:
processing until its index is built, then ready (or failed, with error). Subscribe to the knowledge.source.ready and knowledge.source.failed webhooks instead of polling.
Already added
Adding a website or sheet tab that’s already in the library answers409 with code already_added, and the body includes the existing source so you can use it instead. Send "again": true to add a second copy anyway.
Attach it to an agent
Put the source’sid in the agent’s config.knowledge.ids, then publish. See Agents.
Manage sources
Catalogs (listings imported from a spreadsheet with column mapping) have their own endpoints under
/v1/knowledge/catalog. See the Knowledge section of the API reference.