Skip to main content

Batch Create Objects
Warrant Cloud Only

Create up to 100 new objects in one API request.

Endpoint

POST /v2/objects

Request

Body


A list of objects (as defined in the create object API). Providing a objectId for each object is optional. Warrant will generate a objectId for all objects without a provided id.


note

Each batch create request can create up to 100 new objects. Requests containing more than 100 objects will fail.

Batch creates are atomic operations. If any error (client or server) is encountered during creation, none of the objects will be created. Batch create requests can therefore be safely retried.

POST /v2/objects
curl "https://api.warrant.dev/v2/objects" \
-X POST \
-H "Authorization: ApiKey YOUR_KEY" \
--data-raw \
'[{"objectType":"user","objectId":"d6ed6474-784e-407e-a1ea-42a91d4c52b9"},{"objectType":"user"}]'

Response

200 OK
[
{
"objectType": "user",
"objectId": "d6ed6474-784e-407e-a1ea-42a91d4c52b9"
},
{
"objectType": "user",
"objectId": "59ed2c60-6945-42dc-b770-d3a78212ffdf"
}
]