Skip to main content

Create a Tenant

Create a new tenant.

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

ParameterDescriptionTypeRequired
tenantIdUser defined string identifier for this tenant. If not provided, Warrant will create an id for the tenant and return it. In this case, you should store the id in your system for future reference. Note that tenantIds in Warrant must be composed of alphanumeric chars and/or '-', '_', and '@'.JSON bodyno
nameAn optional displayable name for this tenant.JSON bodyno

Create a Tenant with Provided ID

Request

curl "https://api.warrant.dev/v1/tenants" \
-X POST \
-H "Authorization: ApiKey YOUR_KEY" \
--data-raw \
'{"tenantId":"d6ed6474-784e-407e-a1ea-42a91d4c52b9", "name": "Dunder Mifflin"}'

Response

{
"tenantId": "d6ed6474-784e-407e-a1ea-42a91d4c52b9",
"name": "Dunder Mifflin"
}

Create a Tenant with Generated ID

Request

curl "https://api.warrant.dev/v1/tenants" \
-X POST \
-H "Authorization: ApiKey YOUR_KEY" \

Response

{
"tenantId": "d6ed6474-784e-407e-a1ea-42a91d4c52b9",
"name": null
}