Skip to main content

Batch Create Tenants
Warrant Cloud Only

Create up to 100 new tenants in one API request.

caution

This endpoint has been deprecated and will be phased out at the end of 2023. Please update any existing usages of it to use the Create Object endpoint instead.

Endpoint

POST /v1/tenants

Parameters

A batch create request takes a list of tenant objects (as defined in the create tenant API). Providing a tenantId for each tenant is optional. Warrant will generate a tenantId for all tenants without a provided id.

note

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

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

Request

curl "https://api.warrant.dev/v1/tenants" \
-X POST \
-H "Authorization: ApiKey YOUR_KEY" \
--data-raw \
'[{"tenantId":"new-tenant-1"},{"tenantId":"new-tenant-2"}]'

Response

[
{
"tenantId": "new-tenant-1",
"name": null
},
{
"tenantId": "new-tenant-2",
"name": null
}
]