Skip to main content
POST
/
v1
/
sources
/
ingest
Ingest
curl --request POST \
  --url https://api.clarm.com/v1/sources/ingest \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form 'sources_json=<string>' \
  --form files.items='@example-file'
{
  "success": true,
  "message": "<string>",
  "results": [
    {
      "source_name": "<string>",
      "source_type": "file",
      "connector_id": 123,
      "documents_indexed": 123,
      "chunks_indexed": 123,
      "success": true,
      "error_message": "<string>"
    }
  ],
  "total_documents_indexed": 123,
  "total_chunks_indexed": 123,
  "collection_id": 123,
  "knowledge_source_ids": [
    123
  ]
}
Ingest and index sources of different types including files and web pages. This endpoint supports batch ingestion and returns once all documents have completed indexing.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

multipart/form-data
sources_json
string
required

JSON string containing sources configuration

files
file[]

Response

Successful Response

success
boolean
required
message
string
required
results
SourceResult · object[]
required
total_documents_indexed
integer
required
total_chunks_indexed
integer
required
collection_id
integer | null
knowledge_source_ids
integer[]