Skip to main content
The ingestion API lets you programmatically add, list, and remove documents in the Hadiq.io index. It is useful for custom pipelines where you already control document extraction and want to push content into Hadiq.io without configuring a connector. All ingestion endpoints require admin or curator role and are served under the /api/Hadiq.io-api prefix.
Documents ingested through this API are tracked separately from connector-synced documents and can only be deleted via this API.

Ingest a document

Indexes a single document. If a document with the same id already exists, it is updated in place.

Request body

object
required
The document to ingest.
integer
Connector-credential pair to associate the document with. Defaults to the system ingestion CC pair if omitted.

Response

string
The ID of the document that was indexed (either the id you provided or the derived ID).
boolean
true if the document was newly created, false if it replaced an existing document.

List ingested documents

Returns a minimal list of all documents that were ingested via the ingestion API.

Response

An array of DocMinimalInfo objects.
string
Document identifier.
string
Human-readable title (the semantic_identifier set at ingestion time).
Link to the source document, if provided.

Delete an ingested document

Removes a document from the Hadiq.io index and database. Only documents originally ingested via the ingestion API can be deleted through this endpoint.

Path parameters

string
required
The document_id returned when the document was ingested (or the id field you provided).
Returns 204 No Content on success.
Deletion is permanent. The document is removed from both the vector index and the database. You must re-ingest the document if you need it back.

List documents by CC pair

Returns minimal info for all documents associated with a specific connector-credential pair.

Path parameters

integer
required
The CC pair whose documents to list.

Response

Same as list ingested documents — an array of DocMinimalInfo objects.

Bulk ingestion pattern

To ingest many documents efficiently, loop over your documents and call the ingestion endpoint for each one. The endpoint is idempotent — re-ingesting a document with the same id updates it in place.
Python

Error codes