Skip to main content

Create a Tenant

Create a new tenant.

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

Sample Request

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

Sample Response

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

Create a Tenant with Generated ID

Sample Request

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

Sample Response

{
"userId": "d6ed6474-784e-407e-a1ea-42a91d4c52b9"
}