Write records
POST /1/indexes/:index/records — upsert or delete records in a single versioned batch.
Requires a write or admin key.
Request
- Up to 1,000 operations per batch, 5,000,000 bytes total.
- Each record is capped at 100,000 bytes.
objectIDis required and at most 512 characters.version, if omitted, is assigned by the server at accept time. Pass your own to get last-writer-wins semantics — see Versions and last-writer-wins.
Response
applied and ignoredAsStale always sum to the number of operations you sent. An upsert identical to the stored record counts as applied without being re-indexed, and dataVersion only advances when at least one operation changed something — see Unchanged records. queued is present only when the primary was momentarily overloaded and the write was accepted onto the overflow queue instead of applied directly — see Overflow below.
Example
Overflow
Writes go directly to the index's primary. If the primary is momentarily overloaded, the API accepts the write onto a queue and answers with a 202 and a taskId instead of dataVersion directly:
Poll Tasks with that taskId to confirm the write applied. This is the exception, not the normal path — most writes apply directly and return a real dataVersion immediately.
Deleting a record
A delete becomes a versioned tombstone, kept for 30 days so a delayed, older upsert cannot resurrect it. To clear an entire partition instead of individual records, see Clear a partition.