Workspaces
Update Workspace
Rename a workspace or change its externalId. A field you leave out is kept.
Scope: tenants:write.
PATCH
/
tenants
/
{tenantID}
Update Workspace
curl --request PATCH \
--url https://api.clustr-ai.com/api/org/v1/tenants/{tenantID} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Acme Europe"
}
'import requests
url = "https://api.clustr-ai.com/api/org/v1/tenants/{tenantID}"
payload = { "name": "Acme Europe" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Acme Europe'})
};
fetch('https://api.clustr-ai.com/api/org/v1/tenants/{tenantID}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.clustr-ai.com/api/org/v1/tenants/{tenantID}",
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' => 'Acme Europe'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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 := "https://api.clustr-ai.com/api/org/v1/tenants/{tenantID}"
payload := strings.NewReader("{\n \"name\": \"Acme Europe\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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("https://api.clustr-ai.com/api/org/v1/tenants/{tenantID}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Acme Europe\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.clustr-ai.com/api/org/v1/tenants/{tenantID}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Acme Europe\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "3f6c1d2e-8a4b-4c1f-9e2d-7b5a0c9e1f42",
"name": "Acme",
"createdAt": "2026-10-13T09:30:00Z",
"externalId": "client-1234",
"suspendedAt": "2023-11-07T05:31:56Z"
}
}{
"success": false,
"error": {
"code": "BAD_REQUEST",
"message": "Invalid request body."
}
}{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or revoked API key"
}
}{
"success": false,
"error": {
"code": "FORBIDDEN",
"message": "This key lacks the tenants:write scope"
}
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Resource not found"
}
}{
"success": false,
"error": {
"code": "CONFLICT",
"message": "This external ID is already used in the organization."
}
}{
"success": false,
"error": {
"code": "RATE_LIMITED",
"message": "Too many requests"
}
}{
"success": false,
"error": {
"code": "UPSTREAM_UNAVAILABLE",
"message": "The organization service is unavailable"
}
}Authorizations
Organization API key (clo_...). The X-API-Key header is also accepted in place of Authorization: Bearer.
Path Parameters
The workspace's id, or the externalId you gave it. An id that is not one of your workspaces answers 404.
Maximum string length:
200Body
application/json
⌘I
Update Workspace
curl --request PATCH \
--url https://api.clustr-ai.com/api/org/v1/tenants/{tenantID} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Acme Europe"
}
'import requests
url = "https://api.clustr-ai.com/api/org/v1/tenants/{tenantID}"
payload = { "name": "Acme Europe" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Acme Europe'})
};
fetch('https://api.clustr-ai.com/api/org/v1/tenants/{tenantID}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.clustr-ai.com/api/org/v1/tenants/{tenantID}",
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' => 'Acme Europe'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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 := "https://api.clustr-ai.com/api/org/v1/tenants/{tenantID}"
payload := strings.NewReader("{\n \"name\": \"Acme Europe\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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("https://api.clustr-ai.com/api/org/v1/tenants/{tenantID}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Acme Europe\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.clustr-ai.com/api/org/v1/tenants/{tenantID}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Acme Europe\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "3f6c1d2e-8a4b-4c1f-9e2d-7b5a0c9e1f42",
"name": "Acme",
"createdAt": "2026-10-13T09:30:00Z",
"externalId": "client-1234",
"suspendedAt": "2023-11-07T05:31:56Z"
}
}{
"success": false,
"error": {
"code": "BAD_REQUEST",
"message": "Invalid request body."
}
}{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or revoked API key"
}
}{
"success": false,
"error": {
"code": "FORBIDDEN",
"message": "This key lacks the tenants:write scope"
}
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Resource not found"
}
}{
"success": false,
"error": {
"code": "CONFLICT",
"message": "This external ID is already used in the organization."
}
}{
"success": false,
"error": {
"code": "RATE_LIMITED",
"message": "Too many requests"
}
}{
"success": false,
"error": {
"code": "UPSTREAM_UNAVAILABLE",
"message": "The organization service is unavailable"
}
}