tenants
Update Tenant
Update tenant configuration.
Requires OWNER or ADMIN role in the tenant.
PATCH
/
v1
/
tenants
/
{tenant_id}
Update Tenant
curl --request PATCH \
--url http://localhost:8000/v1/tenants/{tenant_id} \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"idp_config": {
"configuration": {}
},
"settings": {
"description": "<string>",
"timezone": "<string>",
"brand_name": "<string>",
"brand_color": "<string>",
"theme_overrides": {}
}
}
'import requests
url = "http://localhost:8000/v1/tenants/{tenant_id}"
payload = {
"name": "<string>",
"idp_config": { "configuration": {} },
"settings": {
"description": "<string>",
"timezone": "<string>",
"brand_name": "<string>",
"brand_color": "<string>",
"theme_overrides": {}
}
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
idp_config: {configuration: {}},
settings: {
description: '<string>',
timezone: '<string>',
brand_name: '<string>',
brand_color: '<string>',
theme_overrides: {}
}
})
};
fetch('http://localhost:8000/v1/tenants/{tenant_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8000",
CURLOPT_URL => "http://localhost:8000/v1/tenants/{tenant_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'idp_config' => [
'configuration' => [
]
],
'settings' => [
'description' => '<string>',
'timezone' => '<string>',
'brand_name' => '<string>',
'brand_color' => '<string>',
'theme_overrides' => [
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:8000/v1/tenants/{tenant_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"idp_config\": {\n \"configuration\": {}\n },\n \"settings\": {\n \"description\": \"<string>\",\n \"timezone\": \"<string>\",\n \"brand_name\": \"<string>\",\n \"brand_color\": \"<string>\",\n \"theme_overrides\": {}\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("http://localhost:8000/v1/tenants/{tenant_id}")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"idp_config\": {\n \"configuration\": {}\n },\n \"settings\": {\n \"description\": \"<string>\",\n \"timezone\": \"<string>\",\n \"brand_name\": \"<string>\",\n \"brand_color\": \"<string>\",\n \"theme_overrides\": {}\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8000/v1/tenants/{tenant_id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"idp_config\": {\n \"configuration\": {}\n },\n \"settings\": {\n \"description\": \"<string>\",\n \"timezone\": \"<string>\",\n \"brand_name\": \"<string>\",\n \"brand_color\": \"<string>\",\n \"theme_overrides\": {}\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"settings": {
"description": "<string>",
"timezone": "<string>"
},
"idp_config": {},
"branding": {
"brand_name": "<string>",
"brand_color": "<string>",
"logo_url": "<string>",
"logo_dark_url": "<string>",
"favicon_url": "<string>",
"theme_overrides": {}
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Headers
Path Parameters
Cookies
Body
application/json
Response
Successful Response
Tenant response model.
Tenant ID
Tenant name
User-configurable tenant settings
Show child attributes
Show child attributes
External IdP configuration
Resolved branding (colors, logo URLs, theme overrides)
Show child attributes
Show child attributes
⌘I
Update Tenant
curl --request PATCH \
--url http://localhost:8000/v1/tenants/{tenant_id} \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"idp_config": {
"configuration": {}
},
"settings": {
"description": "<string>",
"timezone": "<string>",
"brand_name": "<string>",
"brand_color": "<string>",
"theme_overrides": {}
}
}
'import requests
url = "http://localhost:8000/v1/tenants/{tenant_id}"
payload = {
"name": "<string>",
"idp_config": { "configuration": {} },
"settings": {
"description": "<string>",
"timezone": "<string>",
"brand_name": "<string>",
"brand_color": "<string>",
"theme_overrides": {}
}
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
idp_config: {configuration: {}},
settings: {
description: '<string>',
timezone: '<string>',
brand_name: '<string>',
brand_color: '<string>',
theme_overrides: {}
}
})
};
fetch('http://localhost:8000/v1/tenants/{tenant_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8000",
CURLOPT_URL => "http://localhost:8000/v1/tenants/{tenant_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'idp_config' => [
'configuration' => [
]
],
'settings' => [
'description' => '<string>',
'timezone' => '<string>',
'brand_name' => '<string>',
'brand_color' => '<string>',
'theme_overrides' => [
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:8000/v1/tenants/{tenant_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"idp_config\": {\n \"configuration\": {}\n },\n \"settings\": {\n \"description\": \"<string>\",\n \"timezone\": \"<string>\",\n \"brand_name\": \"<string>\",\n \"brand_color\": \"<string>\",\n \"theme_overrides\": {}\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("http://localhost:8000/v1/tenants/{tenant_id}")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"idp_config\": {\n \"configuration\": {}\n },\n \"settings\": {\n \"description\": \"<string>\",\n \"timezone\": \"<string>\",\n \"brand_name\": \"<string>\",\n \"brand_color\": \"<string>\",\n \"theme_overrides\": {}\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8000/v1/tenants/{tenant_id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"idp_config\": {\n \"configuration\": {}\n },\n \"settings\": {\n \"description\": \"<string>\",\n \"timezone\": \"<string>\",\n \"brand_name\": \"<string>\",\n \"brand_color\": \"<string>\",\n \"theme_overrides\": {}\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"settings": {
"description": "<string>",
"timezone": "<string>"
},
"idp_config": {},
"branding": {
"brand_name": "<string>",
"brand_color": "<string>",
"logo_url": "<string>",
"logo_dark_url": "<string>",
"favicon_url": "<string>",
"theme_overrides": {}
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}