Add a new record (with auto-generated object ID)
Adds a record to an index or replaces it.
- If the record doesn’t have an object ID, a new record with an auto-generated object ID is added to your index.
- If a record with the specified object ID exists, the existing record is replaced.
- If a record with the specified object ID doesn’t exist, a new record is added to your index.
- If you add a record to an index that doesn’t exist yet, a new index is created.
partial operation.
To add, update, or replace multiple records, use the batch operation.
This operation is subject to indexing rate limits.
Required ACL: addObjectAuthorizations
Your Algolia application ID.
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
Name of the index on which to perform the operation.
"ALGOLIA_INDEX_NAME"
Body
The record. A schemaless object with attributes that are useful in the context of search and discovery.
The body is of type object.
Response
Created
Date and time when the object was created, in RFC 3339 format.
"2023-07-04T12:49:15Z"
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.
1514562690001
Unique record identifier.
"test-record-123"