Bulk upsert objects (server token only)
POST
/v1/batch/objects
const url = 'http://localhost:3000/v1/batch/objects';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"objects":[{"type":"example","id":"example","custom":{}}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:3000/v1/batch/objects \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "objects": [ { "type": "example", "id": "example", "custom": {} } ] }'Cold-start import. Partial failure is still a 200 — check each item’s ok.
Re-running is safe: upsert is idempotent.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
objects
required
Array<object>
object
type
required
string
id
required
string
custom
required
object
key
additional properties
any
Examplegenerated
{ "objects": [ { "type": "example", "id": "example", "custom": {} } ]}Responses
Section titled “Responses”Envelope accepted. Per-item results, ordered and same-length as the input; a failed item never rolls back the rest.
Media typeapplication/json
object
results
required
Array<object>
object
index
required
integer
ok
required
boolean
id
Present when ok for users/activities
string
code
§8 error code, present when not ok
string
Examplegenerated
{ "results": [ { "index": 1, "ok": true, "id": "example", "code": "example" } ]}Envelope invalid (0 items, more than 100 items, or malformed shape).
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
requestId
required
string
fields
Present only for VALIDATION_FAILED.
Array<object>
object
path
string
message
string
Example
{ "error": { "code": "VALIDATION_FAILED" }}Authenticated but not permitted.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
requestId
required
string
fields
Present only for VALIDATION_FAILED.
Array<object>
object
path
string
message
string
Example
{ "error": { "code": "VALIDATION_FAILED" }}Batch rate limit exceeded. Batch routes charge a separate 600 requests/min window per tenant — never the normal tenant limit.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
requestId
required
string
fields
Present only for VALIDATION_FAILED.
Array<object>
object
path
string
message
string
Example
{ "error": { "code": "VALIDATION_FAILED" }}Headers
Section titled “Headers”Retry-After
integer