Skip to main content
PATCH
/
v1
/
gateway
/
sub-tenants
/
{id}
JavaScript
import Triglit from 'triglit';

const client = new Triglit({
  apiKey: 'My API Key',
});

const subTenant = await client.subTenants.update('st_abc123def456');

console.log(subTenant.id);
{
  "id": "st_abc123def456",
  "tenantId": "tenant_123",
  "subTenantId": "production",
  "name": "Production Environment",
  "isRegistered": true,
  "createdAt": "2024-01-15T10:30:00.000Z",
  "updatedAt": "2024-01-15T10:30:00.000Z",
  "description": "Main production environment for customer workflows"
}

Authorizations

X-API-Key
string
header
required

Chave de API do tenant (publishable key ou secret key)

Headers

X-API-Key
string
required

Chave de API do tenant (publishable key ou secret key)

Path Parameters

id
string
required

Sub-tenant registration ID

Example:

"st_abc123def456"

Body

application/json
name
string
Required string length: 1 - 255
description
string | null
Maximum string length: 1000

Response

Sub-tenant updated successfully

id
string
required

Unique registration identifier

Example:

"st_abc123def456"

tenantId
string
required

Tenant identifier

Example:

"tenant_123"

subTenantId
string
required

The actual sub-tenant identifier used in workflows/runs/metrics

Example:

"production"

name
string
required

Display name for the sub-tenant

Example:

"Production Environment"

isRegistered
boolean
required

Whether this sub-tenant is registered (always true for this DTO)

Example:

true

createdAt
string
required

Creation timestamp

Example:

"2024-01-15T10:30:00.000Z"

updatedAt
string
required

Last update timestamp

Example:

"2024-01-15T10:30:00.000Z"

description
string

Optional description

Example:

"Main production environment for customer workflows"