JavaScript
import { TrophyApiClient } from '@trophyso/node';
const trophy = new TrophyApiClient({
apiKey: 'YOUR_API_KEY'
});
const response = await trophy.admin.tenants.update([
{
id: '550e8400-e29b-41d4-a716-446655440000',
name: 'Acme Corporation'
}
]);from trophy import TrophyApi
client = TrophyApi(api_key='YOUR_API_KEY')
response = client.admin.tenants.update([
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Acme Corporation"
}
])import (
"context"
api "github.com/trophyso/trophy-go"
trophyclient "github.com/trophyso/trophy-go/client"
"github.com/trophyso/trophy-go/option"
)
client := trophyclient.NewClient(
option.WithApiKey("YOUR_API_KEY"),
)
response, err := client.Admin.Tenants.Update(context.TODO(), api.UpdateTenantsRequest{})curl --request PATCH \
--url https://admin.trophy.so/v1/tenants \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
[
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Acme Corporation"
}
]
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://admin.trophy.so/v1/tenants",
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([
[
'id' => '550e8400-e29b-41d4-a716-446655440000',
'name' => 'Acme Corporation'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.patch("https://admin.trophy.so/v1/tenants")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("[\n {\n \"id\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"name\": \"Acme Corporation\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://admin.trophy.so/v1/tenants")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"id\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"name\": \"Acme Corporation\"\n }\n]"
response = http.request(request)
puts response.read_body{
"updated": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"customerId": "customer_12345",
"name": "Acme Corporation",
"status": "active",
"created": "2026-01-15T09:30:00.000Z",
"updated": "2026-05-16T10:00:00.000Z"
}
],
"issues": []
}{
"error": "<string>"
}{
"error": "<string>"
}Admin
Update tenants
Update tenants by ID.
PATCH
/
tenants
JavaScript
import { TrophyApiClient } from '@trophyso/node';
const trophy = new TrophyApiClient({
apiKey: 'YOUR_API_KEY'
});
const response = await trophy.admin.tenants.update([
{
id: '550e8400-e29b-41d4-a716-446655440000',
name: 'Acme Corporation'
}
]);from trophy import TrophyApi
client = TrophyApi(api_key='YOUR_API_KEY')
response = client.admin.tenants.update([
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Acme Corporation"
}
])import (
"context"
api "github.com/trophyso/trophy-go"
trophyclient "github.com/trophyso/trophy-go/client"
"github.com/trophyso/trophy-go/option"
)
client := trophyclient.NewClient(
option.WithApiKey("YOUR_API_KEY"),
)
response, err := client.Admin.Tenants.Update(context.TODO(), api.UpdateTenantsRequest{})curl --request PATCH \
--url https://admin.trophy.so/v1/tenants \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
[
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Acme Corporation"
}
]
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://admin.trophy.so/v1/tenants",
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([
[
'id' => '550e8400-e29b-41d4-a716-446655440000',
'name' => 'Acme Corporation'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.patch("https://admin.trophy.so/v1/tenants")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("[\n {\n \"id\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"name\": \"Acme Corporation\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://admin.trophy.so/v1/tenants")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"id\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"name\": \"Acme Corporation\"\n }\n]"
response = http.request(request)
puts response.read_body{
"updated": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"customerId": "customer_12345",
"name": "Acme Corporation",
"status": "active",
"created": "2026-01-15T09:30:00.000Z",
"updated": "2026-05-16T10:00:00.000Z"
}
],
"issues": []
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Body
application/json
Array of tenants to update. Each item must include an ID and at least one of customerId or name.
Required array length:
1 - 100 elementsWas this page helpful?
⌘I