Admin API Reference
Programmatically manage tenants, agents, and policies. Ideal for Infrastructure-as-Code (Terraform/Pulumi).
https://api.trustgate.ai/api
POST
/agentsProvision New Agent
Creates a new Agent Identity and returns a fresh API key. Store this key immediately as it is shown only once.
Parameters
name
string • Required
Display name (e.g. 'Production-Bot').
tenant_id
string • Required
Organization ID to attach.
policy_id
string • Optional
ID of Access Policy.
cURL Request
curl -X POST https://api.trustgate.ai/api/agents \
-H "Authorization: Bearer ADMIN_KEY" \
-d '{
"name": "Production-Bot",
"tenant_id": "org_123"
}'GET
/system/configGet System Config
Retrieve global settings, including configured providers, RBAC roles, and maintenance status.
cURL Request
curl https://api.trustgate.ai/api/system/config \ -H "Authorization: Bearer ADMIN_KEY"
PUT
/policies/{id}Update Policy
Dynamically update access rules or budget limits without redeploying the gateway.
Parameters
monthly_budget
float • Optional
New budget limit.
allowed_models
array • Optional
List of allowed model IDs.
cURL Request
curl -X PUT https://api.trustgate.ai/api/policies/pol_abc \
-H "Authorization: Bearer ADMIN_KEY" \
-d '{
"monthly_budget": 500.00
}'