Skip to main content
POST
/
1
/
indexes
/
{indexName}
/
{objectID}
/
partial
curl
curl --request POST \
  --url 'https://algolia_application_id.algolia.net/1/indexes/ALGOLIA_INDEX_NAME/test-record-123/partial?createIfNotExists=true' \
  --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 '{}'
{
  "taskID": 1514562690001,
  "updatedAt": "2023-07-04T12:49:15Z",
  "objectID": "test-record-123"
}
  • If a record with the specified object ID doesn’t exist, a new record is added to the index if createIfNotExists is true.
  • If the index doesn’t exist yet, this method creates a new index.
  • Use first-level attributes only. Nested attributes aren’t supported. If you specify a nested attribute, this operation replaces its first-level ancestor.
To update attributes without replacing the full record, use these built-in operations. These operations are useful when the initial data isn’t available.
  • Increment: increment a numeric attribute.
  • Decrement: decrement a numeric attribute.
  • Add: append a number or string element to an array attribute.
  • Remove: remove all matching number or string elements from an array attribute made of numbers or strings.
  • AddUnique: add a number or string element to an array attribute made of numbers or strings only if it’s not already present.
  • IncrementFrom: increment a numeric integer attribute only if the provided value matches the current value. Otherwise, the update is ignored. Example: If you pass an IncrementFrom value of 2 for the version attribute but the current value is 1, the API ignores the update. If the object doesn’t exist, the API only creates it if you pass an IncrementFrom value of 0.
  • IncrementSet: increment a numeric integer attribute only if the provided value is greater than the current value. Otherwise, the update is ignored. Example: If you pass an IncrementSet value of 2 for the version attribute and the current value is 1, the API updates the object. If the object doesn’t exist yet, the API only creates it if you pass an IncrementSet value greater than 0.
Specify an operation by providing an object with the attribute to update as the key and its value as an object with these properties:
  • _operation: the operation to apply on the attribute.
  • value: the right-hand side argument to the operation, for example, increment or decrement step, or a value to add or remove.
When updating multiple attributes or using multiple operations targeting the same record, use a single partial update for faster processing. 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"

objectID
string
required

Unique record identifier.

Example:

"test-record-123"

Query Parameters

createIfNotExists
boolean
default:true

Whether to create a new record if it doesn't exist.

Body

application/json

Attributes with their values.

Attributes to update.

Response

OK

Response, taskID, unique object identifier, and an update timestamp.

taskID
integer<int64>

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

updatedAt
string

Date and time when the object was updated, in RFC 3339 format.

Example:

"2023-07-04T12:49:15Z"

objectID
string

Unique record identifier.

Example:

"test-record-123"

Last modified on March 23, 2026