createTenant
Creates a new tenant.
Parameters
tenant - An object that contains the information about the tenant. The payload is defined below.
Payload
key - A unique id by which Permit will identify the tenant. The tenant key must be url-friendly (slugified).
name - A descriptive name for the tenant.
description - optional - A longer description of the tenant.
attributes - optional - Arbitraty tenant attributes that will be used to enforce attribute-based access control policies.
{
key: "key",
name: "name",
description: "description",
attributes: {}
}
Implementation
const response = await permit.api.createTenant(JSON.stringify(tenant));