Get a tenant
GET
/tenants/{id}
const url = 'https://localhost:3000/api/v1/tenants/example';const options = {method: 'GET', headers: {Authorization: '<Authorization>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://localhost:3000/api/v1/tenants/example \ --header 'Authorization: <Authorization>'Returns details of a specific tenant (must be a member)
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Tenant ID (UUID)
Responses
Section titled “Responses”Tenant details with user’s role
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
role
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", "role": "admin", "slug": "my-org", "trigger_count": 3, "updated_at": "2024-01-15T10:30:00Z"}Invalid ID
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"}Not a member
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"}