Skip to content

Update a tenant

PATCH
/tenants/{id}
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.

id
required
string

Tenant ID (UUID)

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

#6366f1
description
string

Example

Updated description
name
string

Example

Updated Name

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"
}