Request body.
Optionalagent?: stringAgent ID (agt_...) that owns this source. Mutually exclusive with team and user.
Optionalmetadata?: Record<string, unknown>Arbitrary key-value metadata to attach to the source. Returned as-is on reads.
Optionalorg?: stringOrganization ID (org_...). Required for system-owned sources that have no individual owner (team, user, or agent).
Optionalparent_source?: stringParent knowledge source ID (ksrc_...). Use to create a child source.
Optionalpayload?: Record<string, unknown>Type-specific configuration for the source. Shape depends on type.
Optionalstate?: stringInitial state of the source. One of "active" (default) or "paused". Paused sources do not trigger ingestion automatically.
Optionalteam?: stringTeam ID (team_...) that owns this source. Mutually exclusive with user and agent.
Optionalthread?: stringThread ID (thr_...) to associate this source with, if applicable.
Knowledge source type. Must be one of the values returned by GET /api/v1/knowledge_sources/kinds.
Optionaluser?: stringUser ID (usr_...) that owns this source. Mutually exclusive with team and agent.
The newly created knowledge source.
Delete a knowledge source
Permanently deletes the knowledge source identified by source. This action is
irreversible — all documents, embeddings, and ingestion history associated with the
source are removed.
The authenticated caller must own the source or have sufficient permissions within its
parent organization. Returns 204 No Content on success.
Knowledge source ID (ksrc_...) to delete.
Empty response. The source has been permanently deleted.
Retrieve a knowledge source
Returns the knowledge source identified by source. The authenticated caller must have
access to the source's parent organization or be the individual owner of the source.
Use the list endpoint to retrieve many sources at once or to discover sources by type
or owner.
Knowledge source ID (ksrc_...) to retrieve.
The requested knowledge source.
Trigger ingestion on a knowledge source
Starts an ingestion run on the specified knowledge source and returns the ingestion
object. Exactly one of two modes must be chosen per request:
Push mode (file or content) — available for knowledge/documents sources only.
Supply the document bytes either as a reference to an already-uploaded file (file) or
as an inline blob (content). The runner stores the bytes and indexes the resulting
document. title and metadata are persisted on the document in push mode.
Pull mode (pull: true) — re-triggers ingestion using the source's own configured
data. Use this to re-scrape a scrape/site, re-fetch a web/link, or re-process a
file/document. Not valid for knowledge/documents (which has no upstream — push new
bytes instead) or for source kinds populated by server-driven flows. title and
metadata are ignored in pull mode.
If an ingestion is already active for the source, the existing ingestion is returned
rather than creating a duplicate.
Knowledge source ID (ksrc_...) to ingest.
Request body.
Optionalcontent?: {Inline document bytes to push to the source. Mutually exclusive with file and pull.
Optionalfile?: stringID of an already-uploaded file (fil_...). The runner reads filename and content type from the stored file. Upload the file via POST /v1/files first. Mutually exclusive with content and pull.
Optionalmetadata?: Record<string, unknown>Arbitrary key-value metadata to attach to the ingested document. Applied in push mode only; ignored when pull: true.
Optionalpull?: booleanWhen true, re-triggers ingestion using the source's own configured data. Re-scrapes a scrape/site, re-fetches a web/link, or re-processes a file/document. Mutually exclusive with file and content. Not valid for knowledge/documents sources.
Optionaltitle?: stringDisplay title for the ingested document. Applied in push mode only; ignored when pull: true.
The created ingestion, or an existing active ingestion if one is already running.
List knowledge sources
Returns a paginated list of knowledge sources visible to the authenticated caller.
Results are ordered by creation time descending.
Use the type, installation, agent, org, and owner_scope filters to narrow the
result set. Combine owner_scope: "system" with org to list org-level sources that
have no individual owner. Combine owner_scope: "individual" with agent to list
sources owned by a specific agent.
Pagination is page-number based. The default page size is 25.
Optionalparams: {Query parameters.
Optionalagent?: stringAgent ID (agt_...). Returns only sources owned by or associated with this agent.
Optionalinstallation?: stringInstallation ID (ins_...). Returns only sources associated with this installation.
Optionalorg?: stringOrganization ID (org_...). Returns only sources belonging to this organization. Combine with owner_scope: "system" to retrieve org-level system sources.
OptionalownerScope?: "system" | "any" | "individual"Filter by ownership scope. One of "any" (default — returns all visible sources), "individual" (only sources owned by a user, team, or agent), or "system" (only sources with no individual owner, typically org-level).
Optionalpage?: numberPage number to retrieve. Defaults to 1.
OptionalpageSize?: numberNumber of knowledge sources to return per page. Defaults to 25.
Optionalsearch?: stringFilter sources whose type contains this string. Case-insensitive substring match.
Optionaltype?: stringExact knowledge source type to filter by, e.g. "knowledge/documents".
Successful response
Update a knowledge source
Updates the mutable fields of an existing knowledge source and returns the updated
object. Only fields provided in the request body are changed; omitted fields retain
their current values.
You can update the type-specific payload, the metadata map, and the state. To
pause a source and prevent automatic ingestion, set state to "paused". To resume,
set it back to "active".
Knowledge source ID (ksrc_...) to update.
Request body.
Optionalmetadata?: Record<string, unknown>Arbitrary key-value metadata to attach to the source. Replaces the entire existing metadata map when provided.
Optionalpayload?: Record<string, unknown>Type-specific configuration to replace on the source. Shape depends on the source type. Replaces the entire existing payload when provided.
Optionalstate?: stringDesired state of the source. One of "active" or "paused". Paused sources do not trigger ingestion automatically.
The updated knowledge source.
Create a knowledge source Creates a new knowledge source of the requested type and returns the created object. Only types listed by
GET /api/v1/knowledge_sources/kindsmay be created through this endpoint. Other source types — such aswebhook/inbound,connectors/*/emails, andthread/messages— are provisioned automatically by server-driven flows (webhook auto-provisioning, installation activation, connector lifecycle events) and cannot be created directly via the API. Exactly one ofteam,user,agent, ororgmust identify the owner of the new source. Omitorgwhen an individual owner (team,user, oragent) is supplied; includeorgalone for org-level system-owned sources.