Skip to main content
POST
/
1
/
indexes
/
{indexName}
/
batch
curl
curl --request POST \
  --url https://algolia_application_id.algolia.net/1/indexes/ALGOLIA_INDEX_NAME/batch \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --header 'x-algolia-api-key: ALGOLIA_API_KEY' \
  --header 'x-algolia-application-id: ALGOLIA_APPLICATION_ID' \
  --data '
{
  "requests": [
    {
      "action": "addObject",
      "body": {
        "name": "Betty Jane McCamey",
        "company": "Vita Foods Inc.",
        "email": "betty@mccamey.com"
      }
    },
    {
      "action": "addObject",
      "body": {
        "name": "Gayla geimer",
        "company": "Ortman McCain Co.",
        "email": "gayla@geimer.com"
      }
    }
  ]
}
'
{
  "taskID": 1514562690001,
  "objectIDs": [
    "record-1",
    "record-2"
  ]
}
Batching index updates reduces latency and increases data integrity.
  • Actions are applied in the order they’re specified.
  • Actions are equivalent to the individual API requests of the same name.
This operation is subject to indexing rate limits. Required ACL: addObject

Authorizations

x-algolia-application-id
string
header
required

Your Algolia application ID.

x-algolia-api-key
string
header
required

Your Algolia API key with the necessary permissions to make the request. Permissions are controlled through access control lists (ACL) and access restrictions. The required ACL to make a request is listed in each endpoint's reference.

Path Parameters

indexName
string
required

Name of the index on which to perform the operation.

Example:

"ALGOLIA_INDEX_NAME"

Body

application/json

Batch parameters.

requests
batchRequest Β· object[]
required

Response

OK

taskID
integer<int64>
required

Unique identifier of a task.

A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the task operation and this task ID.

Example:

1514562690001

objectIDs
string[]
required

Unique record identifiers.

Example:
["record-1", "record-2"]
Last modified on March 23, 2026