Skip to main content
POST
/
1
/
indexes
/
*
/
batch
curl
curl --request POST \
  --url 'https://algolia_application_id.algolia.net/1/indexes/*/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","indexName":"contacts","body":{"name":"Betty Jane McCamey","company":"Vita Foods Inc.","email":"betty@mccamey.com"}},{"action":"addObject","indexName":"public_contacts","body":{"name":"Gayla Geimer","company":"Ortman McCain Co.","email":"gayla@geimer.com"}}]}'
{
  "taskID": {},
  "objectIDs": [
    "record-1",
    "record-2"
  ]
}

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.

Body

application/json

Batch parameters.

requests
multipleBatchRequest · object[]
required

Response

OK

taskID
object
required

Task IDs. One for each index.

objectIDs
string[]
required

Unique record identifiers.

Example:
["record-1", "record-2"]
I