Update a tenant
PATCH
/tenants/{id}
const url = 'https://localhost:3000/api/v1/tenants/example';const options = { method: 'PATCH', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"color":"#6366f1","description":"Updated description","name":"Updated Name"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://localhost:3000/api/v1/tenants/example \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "color": "#6366f1", "description": "Updated description", "name": "Updated Name" }'Updates tenant details. Requires admin or owner role.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Tenant ID (UUID)
Request Body
Section titled “Request Body”Updated details
Media typeapplication/json
object
color
Color follows the same hex rule as CreateTenantRequest. An empty string clears the colour; nil leaves it untouched.
string
Example
#6366f1description
string
Example
Updated descriptionname
string
Example
Updated NameResponses
Section titled “Responses”Updated tenant
Media typeapplication/json
object
color
required
Color is a user-chosen hex value (same data as groups.color and triggers.color), not an os-* theme token. Empty when the tenant has none.
string
created_at
required
string format: date-time
description
string
id
required
string format: uuid
name
required
string
owner_id
required
string format: uuid
plan
required
string
slug
required
string
trigger_count
required
integer
updated_at
required
string format: date-time
Example
{ "color": "#6366f1", "created_at": "2024-01-15T10:30:00Z", "description": "My organization description", "id": "550e8400-e29b-41d4-a716-446655440000", "name": "My Organization", "owner_id": "550e8400-e29b-41d4-a716-446655440000", "plan": "free", "slug": "my-org", "trigger_count": 3, "updated_at": "2024-01-15T10:30:00Z"}Invalid request
Media typeapplication/json
object
error
required
string
message
string
Example
{ "error": "invalid_request", "message": "Invalid request body"}Unauthorized
Media typeapplication/json
object
error
required
string
message
string
Example
{ "error": "invalid_request", "message": "Invalid request body"}Insufficient permissions
Media typeapplication/json
object
error
required
string
message
string
Example
{ "error": "invalid_request", "message": "Invalid request body"}Tenant not found
Media typeapplication/json
object
error
required
string
message
string
Example
{ "error": "invalid_request", "message": "Invalid request body"}Internal error
Media typeapplication/json
object
error
required
string
message
string
Example
{ "error": "invalid_request", "message": "Invalid request body"}