import Stigg from '@stigg/typescript';
const client = new Stigg({
apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted
});
const response = await client.v1.events.beta.customers.retrieveGovernance('id');
console.log(response.data);import os
from stigg import Stigg
client = Stigg(
api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted
)
response = client.v1.events.beta.customers.retrieve_governance(
id="id",
)
print(response.data)package main
import (
"context"
"fmt"
"github.com/stiggio/stigg-go"
"github.com/stiggio/stigg-go/option"
)
func main() {
client := stigg.NewClient(
option.WithAPIKey("My API Key"),
)
response, err := client.V1.Events.Beta.Customers.GetGovernance(
context.TODO(),
"id",
stigg.V1EventBetaCustomerGetGovernanceParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)
}
package io.stigg.example;
import io.stigg.client.StiggClient;
import io.stigg.client.okhttp.StiggOkHttpClient;
import io.stigg.models.v1.events.beta.customers.CustomerRetrieveGovernanceParams;
import io.stigg.models.v1.events.beta.customers.CustomerRetrieveGovernanceResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
StiggClient client = StiggOkHttpClient.fromEnv();
CustomerRetrieveGovernanceResponse response = client.v1().events().beta().customers().retrieveGovernance("id");
}
}require "stigg"
stigg = Stigg::Client.new(api_key: "My API Key")
response = stigg.v1.events.beta.customers.retrieve_governance("id")
puts(response)using System;
using Stigg.Client;
using Stigg.Client.Models.V1.Events.Beta.Customers;
StiggClient client = new();
CustomerRetrieveGovernanceParams parameters = new() { ID = "id" };
var response = await client.V1.Events.Beta.Customers.RetrieveGovernance(parameters);
Console.WriteLine(response);stigg v1:events:beta:customers retrieve-governance \
--api-key 'My API Key' \
--id idcurl --request GET \
--url https://api.stigg.io/api/v1-beta/customers/{id}/governance \
--header 'X-API-KEY: <api-key>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.stigg.io/api/v1-beta/customers/{id}/governance",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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;
}{
"data": [
{
"entityId": "team-eng",
"displayName": "Engineering",
"parentId": "org-acme",
"entityTypeId": "team",
"featureId": "ai-tokens",
"scopeEntityIds": [],
"usageLimit": 1000,
"currentUsage": 820,
"utilization": 0.82,
"cadence": "P1M",
"usagePeriodStart": "2026-05-01T00:00:00.000Z",
"usagePeriodEnd": "2026-06-01T00:00:00.000Z"
},
{
"entityId": "team-eng",
"displayName": "Engineering",
"parentId": "org-acme",
"entityTypeId": "team",
"featureId": "ai-tokens",
"scopeEntityIds": [
"model-a"
],
"usageLimit": 500,
"currentUsage": 130,
"utilization": 0.26,
"cadence": "P1M",
"usagePeriodStart": "2026-05-01T00:00:00.000Z",
"usagePeriodEnd": "2026-06-01T00:00:00.000Z"
}
],
"pagination": {
"next": null
}
}{
"message": "<string>",
"code": "BadUserInput",
"reason": "<string>"
}{
"message": "<string>",
"code": "Unauthenticated"
}{
"message": "<string>",
"code": "IdentityForbidden"
}{
"message": "<string>",
"code": "RateLimitExceeded"
}Get a list of governance nodes
Queries the customer’s governance hierarchy tree, returning a cursor-paginated list of nodes with their usage configuration (limit, cadence, scope) and current usage, sortable and filterable by usage. Each node carries parentId so the tree can be rebuilt client-side. Usage is read from a periodically-refreshed read model and never gates access.
import Stigg from '@stigg/typescript';
const client = new Stigg({
apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted
});
const response = await client.v1.events.beta.customers.retrieveGovernance('id');
console.log(response.data);import os
from stigg import Stigg
client = Stigg(
api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted
)
response = client.v1.events.beta.customers.retrieve_governance(
id="id",
)
print(response.data)package main
import (
"context"
"fmt"
"github.com/stiggio/stigg-go"
"github.com/stiggio/stigg-go/option"
)
func main() {
client := stigg.NewClient(
option.WithAPIKey("My API Key"),
)
response, err := client.V1.Events.Beta.Customers.GetGovernance(
context.TODO(),
"id",
stigg.V1EventBetaCustomerGetGovernanceParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)
}
package io.stigg.example;
import io.stigg.client.StiggClient;
import io.stigg.client.okhttp.StiggOkHttpClient;
import io.stigg.models.v1.events.beta.customers.CustomerRetrieveGovernanceParams;
import io.stigg.models.v1.events.beta.customers.CustomerRetrieveGovernanceResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
StiggClient client = StiggOkHttpClient.fromEnv();
CustomerRetrieveGovernanceResponse response = client.v1().events().beta().customers().retrieveGovernance("id");
}
}require "stigg"
stigg = Stigg::Client.new(api_key: "My API Key")
response = stigg.v1.events.beta.customers.retrieve_governance("id")
puts(response)using System;
using Stigg.Client;
using Stigg.Client.Models.V1.Events.Beta.Customers;
StiggClient client = new();
CustomerRetrieveGovernanceParams parameters = new() { ID = "id" };
var response = await client.V1.Events.Beta.Customers.RetrieveGovernance(parameters);
Console.WriteLine(response);stigg v1:events:beta:customers retrieve-governance \
--api-key 'My API Key' \
--id idcurl --request GET \
--url https://api.stigg.io/api/v1-beta/customers/{id}/governance \
--header 'X-API-KEY: <api-key>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.stigg.io/api/v1-beta/customers/{id}/governance",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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;
}{
"data": [
{
"entityId": "team-eng",
"displayName": "Engineering",
"parentId": "org-acme",
"entityTypeId": "team",
"featureId": "ai-tokens",
"scopeEntityIds": [],
"usageLimit": 1000,
"currentUsage": 820,
"utilization": 0.82,
"cadence": "P1M",
"usagePeriodStart": "2026-05-01T00:00:00.000Z",
"usagePeriodEnd": "2026-06-01T00:00:00.000Z"
},
{
"entityId": "team-eng",
"displayName": "Engineering",
"parentId": "org-acme",
"entityTypeId": "team",
"featureId": "ai-tokens",
"scopeEntityIds": [
"model-a"
],
"usageLimit": 500,
"currentUsage": 130,
"utilization": 0.26,
"cadence": "P1M",
"usagePeriodStart": "2026-05-01T00:00:00.000Z",
"usagePeriodEnd": "2026-06-01T00:00:00.000Z"
}
],
"pagination": {
"next": null
}
}{
"message": "<string>",
"code": "BadUserInput",
"reason": "<string>"
}{
"message": "<string>",
"code": "Unauthenticated"
}{
"message": "<string>",
"code": "IdentityForbidden"
}{
"message": "<string>",
"code": "RateLimitExceeded"
}Authorizations
Server API Key
Headers
Account ID — optional when authenticating with a user JWT (Bearer token); falls back to the user's first membership. Ignored for API-key auth.
Environment ID — required when authenticating with a user JWT (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is intrinsic to the key).
Path Parameters
The customer ID.
1 - 255^[a-zA-Z0-9][a-zA-Z0-9_|.@-]*$Query Parameters
Maximum number of items to return
1 <= x <= 100Return items that come after this cursor
255Feature ids to include, repeated per value (e.g. ?featureIds=ai-tokens&featureIds=seats). Omit both featureIds and currencyIds for tree mode — every node in the hierarchy with no usage configuration attached.
Currency ids to include, repeated per value (e.g. ?currencyIds=credits). Omit both featureIds and currencyIds for tree mode.
Sort key: utilization (default, cross-capability-safe), currentUsage, usageLimit, scopeSize, id, or createdAt.
utilization, currentUsage, usageLimit, scopeSize, id, createdAt Sort direction: asc or desc (default desc).
asc, desc Filter by configuration scope: all (default), nodeWide ([] only), or scoped (non-empty only).
all, nodeWide, scoped Only nodes with utilization ≥ this value (e.g. 0.8 for ≥80%, 1 for at/over limit).
x >= 0Filter to one or more entity types, repeated per value (e.g. ?entityTypeIds=team&entityTypeIds=user).
Case-insensitive substring match on the entity id or its display name (%/_ matched literally).
1 - 255Related topics
Get a list of assignmentsGet a list of entitysNode.js SDKGet a list of entity typesSetting up governance