Skip to main content

Update Tenant

This API updates an existing tenant, including its name, slug, and description.

Endpoint Details

URL/v1/auth/tenants/id
MethodPUT
AuthorizationBearer Token

Request Headers

HeaderTypeDescription
Content-TypeStringMust be application/json

Request Path

To update an existing tenant, use the following request format:

/v1/auth/tenants/319a6060-fa5b-436b-95a5-77214d3d5c7d

Path Parameter

ParameterTypeDescription
idUUIDUnique identifier of the tenant to update

Request Body

Use the following format to make a request:

JSON Request
{
"name": "dummy",
"slug": "dummy",
"description": "contoh"
}

Body Parameters

ParameterTypeDescription
nameStringUpdated name of the tenant
slugStringUnique slug identifier of the tenant
descriptionStringOptional description of the tenant

Response

Here is an example response when the data is successfully updated:

Response
{
"tenant": {
"id": "319a6060-fa5b-436b-95a5-77214d3d5c7d",
"name": "dummy",
"slug": "dummy",
"status": "active",
"owner_user_id": "0a937c60-0ed4-4d06-870a-2e284b54287d",
"description": "contoh",
"created_by": "0a937c60-0ed4-4d06-870a-2e284b54287d",
"updated_by": "0a937c60-0ed4-4d06-870a-2e284b54287d",
"created_at": 1784187547,
"updated_at": 1784187828
}
}

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
descriptionStringDescription of 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 id path parameter must reference an existing tenant.
  • Unix timestamp fields can be converted to a human-readable date and time format as needed.