POST /knowledge-bases/{kb_id}/import
Record the job and return it queued. The ingest loop does the work.
202 rather than 201: nothing has been imported yet, and answering 201 with a
finished-looking body is how a caller concludes the import failed silently when the
counts are still zero a second later. RULE IJ-1 is why the work is not done inline —
a crashed inline import would leave a running row nothing may reclaim.
Name In Type Notes kb_idpath string (uuid) required —
Field Type Notes modeverbatim | analyzedoptional Default "verbatim". source_formatcsv | markdown | items | document | urloptional Default "items". object_keystring | null optional max length 1024 source_urlstring | null optional max length 2000 source_filenamestring | null optional max length 400 itemsstring[] | null optional — contentstring | null optional min length 1 max length 1000000
Status Description Body 202Successful Response IngestJobView422Validation Error HTTPValidationError
Only the success paths are declared
Any operation may also answer any status in the error catalogue , and
every failure body is the platform envelope — including the 422 this document types
as HTTPValidationError.
The body shows the fields the schema always carries. Which combination is legal is a service rule the schema cannot express, so read the description above before copying this.
curl -X POST https://your-deployment.example.com/knowledge-bases/{kb_id}/import \
-H " Authorization: Bearer $COBRE_TOKEN " \
-H " Content-Type: application/json " \
Field Type Notes idstring (uuid) required — kb_idstring (uuid) required — statusqueued | running | succeeded | failed | cancelledrequired — stageanalyzing | embedding | nulloptional — modeverbatim | analyzedrequired — source_formatcsv | markdown | items | document | urlrequired — source_filenamestring | null optional — source_urlstring | null optional — total_itemsinteger optional Default 0. processed_itemsinteger optional Default 0. created_itemsinteger optional Default 0. skippedIngestSkip[]optional — analyzer_run_idstring (uuid) | null optional — tokens_inputinteger optional Default 0. tokens_outputinteger optional Default 0. coststring optional Default "0". error_messagestring | null optional — started_atstring (date-time) | null optional — finished_atstring (date-time) | null optional — created_atstring (date-time) required —