POST /api/v2/knowledge/ingestions is the one place on the platform where a
stored document becomes knowledge — something an agent can
retrieve and quote.
Uploading a file does not do this. Extracting fields from it does not do this.
Publication is a deliberate, separate act, and this endpoint is the whole of it.
job_id. See Jobs.
Exactly two fields are read
document_id and knowledge_group. Both are requests rather than authority:
document_idnames a document resolved inside your own isolation boundary.knowledge_groupnames the body of knowledge it lands in.
It needs two scopes, not one
The second scope is enforced in the service rather than on the route because it
is a fact about the operation rather than about the URL.
The resource
scope is the word — group or company_wide — and it is stored alongside
group_id so both survive. group_id is null for the company-wide case and
for a group that has since been deleted; scope still says which was asked for,
which is why both are kept.
indexed is the field to check. Until it is true, the document is stored but no
agent will retrieve from it.
Reading needs knowledge:read.
Withdrawing
knowledge:write.
DELETE withdraws the knowledge. It does not delete the document.Publication is a deliberate act, and a deliberate act with no undo is a one-way
door — but the undo has to stop at the same line the publication crossed.
Deleting the file is DELETE /documents/{id}, which needs documents:delete.Listing
knowledge:read. Returns next_cursor, read back as cursor.
Errors are never an oracle
A cross-workspace document, another environment’s ingestion, a knowledge group belonging to somebody else, and an id that was never issued all produce the same 404. A refusal from the execution context is a 403 about your scopes, which reveals nothing about whether any object exists.Related
Knowledge concepts
What a knowledge group is, how retrieval works, and what an agent is allowed
to quote.
Documents
Getting the file in, and reading the representation this indexes.

