List Tenants
This API returns a list of tenants available within the system.
Endpoint Details
| URL | /v1/auth/tenants |
| Method | GET |
| Authorization | Bearer Token |
Request Headers
| Header | Type | Description |
|---|---|---|
| Content-Type | String | Must be application/json |
Response
Here is an example of a response when viewing a list of data:
Response
{
"tenants": [
{
"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
},
{
"id": "319a6060-fa5b-436b-95a5-77214d3d5c7d",
"name": "dummy",
"slug": "dummy",
"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": 1784187547,
"updated_at": 1784187547
},
{
"id": "5ebde17c-01a1-4394-977b-9e611250cf5d",
"name": "Default",
"slug": "default",
"status": "active",
"owner_user_id": "2ecec31b-ed78-4c8d-84b1-0d051e975951",
"created_by": "2ecec31b-ed78-4c8d-84b1-0d051e975951",
"updated_by": "2ecec31b-ed78-4c8d-84b1-0d051e975951",
"created_at": 1778660882,
"updated_at": 1778660882
}
],
"pagination": {
"total": 3,
"page": 1,
"page_size": 3,
"last_page": 1
}
}
Field Descriptions
| Field | Type | Description |
|---|---|---|
| id | UUID | Unique identifier of the tenant |
| name | String | Name of the tenant |
| slug | String | Unique slug identifier of the tenant |
| status | String | Current status of the tenant |
| owner_user_id | UUID | Identifier of the user who owns the tenant |
| created_by | UUID | Identifier of the user who created the tenant |
| updated_by | UUID | Identifier of the user who last updated the tenant |
| created_at | Integer | Creation timestamp in Unix format |
| updated_at | Integer | Last update timestamp in Unix format |
| total | Integer | Total number of tenants available |
| page | Integer | Current page number |
| page_size | Integer | Number of records returned per page |
| last_page | Integer | Total number of available pages |
info
- A valid Bearer Token is required to access this endpoint.
- The response returns all tenants available to the authenticated user.
- The
statusfield indicates whether a tenant isactiveorsuspended. - Unix timestamp fields can be converted to a human-readable date and time format as needed.