Skip to main content

Create Tenant

This API creates a new tenant. A tenant represents an isolated workspace that owns its own users, groups, and configurations.

Endpoint Details

URL/v1/auth/tenants
MethodPOST
AuthorizationBearer Token

Request Headers

HeaderTypeDescription
Content-TypeStringMust be application/json

Request Body

Use the following format to make a request:

JSON Request
{
"name": "testing",
"slug": "testing",
"description": ""
}

Parameters

ParameterTypeDescription
nameStringName of the tenant
slugStringUnique slug identifier of the tenant
descriptionStringOptional description of the tenant

Response

Here is an example response after the request has been successfully processed:

Response
{
"tenant": {
"id": "0c44159c-9fdd-4dce-b03f-c0eb5ee806d7",
"name": "testing",
"slug": "testing",
"status": "active",
"owner_user_id": "0a937c60-0ed4-4d06-870a-2e284b54287d",
"created_by": "0a937c60-0ed4-4d06-870a-2e284b54287d",
"updated_by": "0a937c60-0ed4-4d06-870a-2e284b54287d",
"created_at": 1784187637,
"updated_at": 1784187637
}
}

Field Descriptions

FieldTypeDescription
idUUIDUnique identifier of the tenant
nameStringName of the tenant
slugStringUnique slug identifier of the tenant
statusStringCurrent status of the tenant
owner_user_idUUIDIdentifier of the user who owns the tenant
created_byUUIDIdentifier of the user who created the tenant
updated_byUUIDIdentifier of the user who last updated the tenant
created_atIntegerCreation timestamp in Unix format
updated_atIntegerLast update timestamp in Unix format

info
  • A valid Bearer Token is required to access this endpoint.
  • The slug must be unique across the system.
  • A newly created tenant is set to active status by default.
  • Unix timestamp fields can be converted to a human-readable date and time format as needed.