Open in documentation hub (sidebar) · 中文

Batch index upload

Batch write or update records in the specified index.

API overview

Method POST
Path /1/indexes/{indexName}/batch
Base URL example https://api.prophetes.ai
Full URL example https://api.prophetes.ai/1/indexes/{indexName}/batch

Demo Download

Download our official Demos to quickly integrate Insight Search into your application:

Python Demo
Uses standard library urllib with no additional dependencies
Java Demo
Uses java.net.http.HttpClient with no third-party dependencies

Authentication

Request headers must include:

Header Description
x-insight-application-id Application ID
x-insight-api-key API Key (write permission required)
Content-Type application/json

Request body format

The body is a JSON array of document objects (fields follow your index schema).

[
  { "status": 2, "ct": "2026-03-03 14:47:02", "ut": "2026-03-03 14:47:02" },
  { "status": 3, "ct": "2026-03-03 14:47:12", "ut": "2026-03-03 14:47:12" }
]

Response structure

{
  "objectIDs": [
    "bc00308e8ff44bdaad9ccf2277f6fcea",
    "6793c499c2f14419acca9c0ce94403a8"
  ],
  "taskID": 1776101089469
}

Example

curl 'https://api.prophetes.ai/1/indexes/INSIGHT_INDEX_NAME/batch' \
  -X POST \
  -H 'x-insight-api-key: INSIGHT_API_KEY' \
  -H 'x-insight-application-id: INSIGHT_APPLICATION_ID' \
  -H 'Content-Type: application/json' \
  --data-raw '[{"status": 2, "ct": "2026-03-03 14:47:02", "ut": "2026-03-03 14:47:02"}, {"status": 3, "ct": "2026-03-03 14:47:12", "ut": "2026-03-03 14:47:12"}]'