Add a document to a knowledge base
Registers a document. For file sources (pdf/docx/txt) the response carries a short-lived presigned PUT URL the client uploads to, then calls the complete endpoint. For url sources, ingestion starts immediately.
Authentication
Bearer authentication of the form Bearer <token>, where token is your auth token.
Path parameters
Request
Required when source_type is url.
Exact file size in bytes. REQUIRED (> 0) for file sources (pdf/docx/txt); omit for url. Bound into the presigned PUT’s Content-Length, so the upload must send exactly this many bytes or S3 rejects it. Omitting it for a file source returns 400. (Expressed as prose, not a JSON-Schema if/then conditional, because the contract validator — kin-openapi — rejects 3.1 if/then siblings.)
Response
Presigned PUT URL for file sources; empty for url sources.