REST API: sources and ingestion
Manage knowledge sources and observe asynchronous retraining work.
Source automation follows the same lifecycle as the dashboard. It creates or finds a source. Then it waits for the source to finish processing. It retrains the agent when the new knowledge is ready.
Website crawling and page crawling are different operations. For files, first get an upload URL. Then request processing for the returned file identifier. Keep file bytes and API credentials on trusted infrastructure only.
Poll for status during asynchronous ingestion. Request retrain logs only as often as you need to check progress. Use bounded backoff. Do not restart a crawl or retrain job many times. A successful submission means the system accepted the work. It is not proof that every page, file, or external connection finished indexing.
List and delete operations are source-type-specific. Do not substitute a website identifier for a page, Q&A, file, or Notion source identifier. Before a destructive cleanup, check which source the agent currently uses. Record enough information so that a person can recover from an accidental removal. See the generated reference for accepted crawl and upload payloads.
Use POST /agents/{id}/sources/notion/{notionSourceId}/sync to trigger a manual re-sync of an already-enabled Notion source, for example after editing the page in Notion and needing the change reflected sooner than the next scheduled sync. This endpoint requires the source to already exist; use the Notion connection guide to find and enable a Notion page as a source in the first place.