curl -X PUT "https://app.runtm.com/api/cloud/organizations/org_abc123/limits" \
-H "Authorization: Bearer runtm_xxx" \
-H "X-Organization-Id: org_abc123" \
-H "Content-Type: application/json" \
-d '{
"limits": {
"max_sessions_per_user": 3,
"max_cost_per_session": 5.00,
"max_daily_spend_per_user": 25.00,
"max_monthly_spend_per_user": 250.00,
"enforcement": "hard",
"deployment": {
"mode": "role_based",
"roles": ["admin", "owner"],
"user_grants": []
}
}
}'
import requests
org_id = "org_abc123"
resp = requests.put(
f"https://app.runtm.com/api/cloud/organizations/{org_id}/limits",
headers={
"Authorization": "Bearer runtm_xxx",
"X-Organization-Id": org_id,
"Content-Type": "application/json",
},
json={
"limits": {
"max_sessions_per_user": 3,
"max_cost_per_session": 5.00,
"max_daily_spend_per_user": 25.00,
"max_monthly_spend_per_user": 250.00,
"enforcement": "hard",
"deployment": {
"mode": "role_based",
"roles": ["admin", "owner"],
"user_grants": [],
},
}
},
)
print(resp.json())
const orgId = "org_abc123";
const resp = await fetch(
`https://app.runtm.com/api/cloud/organizations/${orgId}/limits`,
{
method: "PUT",
headers: {
Authorization: "Bearer runtm_xxx",
"X-Organization-Id": orgId,
"Content-Type": "application/json",
},
body: JSON.stringify({
limits: {
max_sessions_per_user: 3,
max_cost_per_session: 5.0,
max_daily_spend_per_user: 25.0,
max_monthly_spend_per_user: 250.0,
enforcement: "hard",
deployment: {
mode: "role_based",
roles: ["admin", "owner"],
user_grants: [],
},
},
}),
}
);
const data = await resp.json();
{
"organization_id": "org_abc123",
"limits": {
"max_sessions_per_user": 3,
"max_cost_per_session": 5.00,
"max_daily_spend_per_user": 25.00,
"max_monthly_spend_per_user": 250.00,
"allowed_templates": null,
"enforcement": "hard",
"deployment": {
"mode": "role_based",
"roles": ["admin", "owner"],
"user_grants": []
}
},
"updated_at": "2026-05-09T18:00:00Z"
}
Guardrails
Set Org Limits
Set the usage limits and deployment policy for an organization.
PUT
/
api
/
organizations
/
{org_id}
/
limits
curl -X PUT "https://app.runtm.com/api/cloud/organizations/org_abc123/limits" \
-H "Authorization: Bearer runtm_xxx" \
-H "X-Organization-Id: org_abc123" \
-H "Content-Type: application/json" \
-d '{
"limits": {
"max_sessions_per_user": 3,
"max_cost_per_session": 5.00,
"max_daily_spend_per_user": 25.00,
"max_monthly_spend_per_user": 250.00,
"enforcement": "hard",
"deployment": {
"mode": "role_based",
"roles": ["admin", "owner"],
"user_grants": []
}
}
}'
import requests
org_id = "org_abc123"
resp = requests.put(
f"https://app.runtm.com/api/cloud/organizations/{org_id}/limits",
headers={
"Authorization": "Bearer runtm_xxx",
"X-Organization-Id": org_id,
"Content-Type": "application/json",
},
json={
"limits": {
"max_sessions_per_user": 3,
"max_cost_per_session": 5.00,
"max_daily_spend_per_user": 25.00,
"max_monthly_spend_per_user": 250.00,
"enforcement": "hard",
"deployment": {
"mode": "role_based",
"roles": ["admin", "owner"],
"user_grants": [],
},
}
},
)
print(resp.json())
const orgId = "org_abc123";
const resp = await fetch(
`https://app.runtm.com/api/cloud/organizations/${orgId}/limits`,
{
method: "PUT",
headers: {
Authorization: "Bearer runtm_xxx",
"X-Organization-Id": orgId,
"Content-Type": "application/json",
},
body: JSON.stringify({
limits: {
max_sessions_per_user: 3,
max_cost_per_session: 5.0,
max_daily_spend_per_user: 25.0,
max_monthly_spend_per_user: 250.0,
enforcement: "hard",
deployment: {
mode: "role_based",
roles: ["admin", "owner"],
user_grants: [],
},
},
}),
}
);
const data = await resp.json();
{
"organization_id": "org_abc123",
"limits": {
"max_sessions_per_user": 3,
"max_cost_per_session": 5.00,
"max_daily_spend_per_user": 25.00,
"max_monthly_spend_per_user": 250.00,
"allowed_templates": null,
"enforcement": "hard",
"deployment": {
"mode": "role_based",
"roles": ["admin", "owner"],
"user_grants": []
}
},
"updated_at": "2026-05-09T18:00:00Z"
}
Updates the organization’s usage limits. All fields in the
limits object are optional - omitted fields retain their current values.
Required scope: guardrails:write
string
required
The organization ID.
string
required
Bearer token.
Authorization: Bearer runtm_xxxstring
required
Must match the
org_id path parameter.object
required
The limits configuration object.
Show limits properties
Show limits properties
integer
Maximum concurrent sessions per user. Null for unlimited.
number
Maximum cost in USD per individual session. Null for unlimited.
number
Maximum daily spend in USD per user. Null for unlimited.
number
Maximum monthly spend in USD per user. Null for unlimited.
array
List of template IDs users are allowed to use. Null for all templates.
string
Enforcement mode:
soft (warn only) or hard (block).string
The organization ID.
object
The updated limits configuration. See Get Org Limits for the full shape.
string
ISO 8601 timestamp of the update.
curl -X PUT "https://app.runtm.com/api/cloud/organizations/org_abc123/limits" \
-H "Authorization: Bearer runtm_xxx" \
-H "X-Organization-Id: org_abc123" \
-H "Content-Type: application/json" \
-d '{
"limits": {
"max_sessions_per_user": 3,
"max_cost_per_session": 5.00,
"max_daily_spend_per_user": 25.00,
"max_monthly_spend_per_user": 250.00,
"enforcement": "hard",
"deployment": {
"mode": "role_based",
"roles": ["admin", "owner"],
"user_grants": []
}
}
}'
import requests
org_id = "org_abc123"
resp = requests.put(
f"https://app.runtm.com/api/cloud/organizations/{org_id}/limits",
headers={
"Authorization": "Bearer runtm_xxx",
"X-Organization-Id": org_id,
"Content-Type": "application/json",
},
json={
"limits": {
"max_sessions_per_user": 3,
"max_cost_per_session": 5.00,
"max_daily_spend_per_user": 25.00,
"max_monthly_spend_per_user": 250.00,
"enforcement": "hard",
"deployment": {
"mode": "role_based",
"roles": ["admin", "owner"],
"user_grants": [],
},
}
},
)
print(resp.json())
const orgId = "org_abc123";
const resp = await fetch(
`https://app.runtm.com/api/cloud/organizations/${orgId}/limits`,
{
method: "PUT",
headers: {
Authorization: "Bearer runtm_xxx",
"X-Organization-Id": orgId,
"Content-Type": "application/json",
},
body: JSON.stringify({
limits: {
max_sessions_per_user: 3,
max_cost_per_session: 5.0,
max_daily_spend_per_user: 25.0,
max_monthly_spend_per_user: 250.0,
enforcement: "hard",
deployment: {
mode: "role_based",
roles: ["admin", "owner"],
user_grants: [],
},
},
}),
}
);
const data = await resp.json();
{
"organization_id": "org_abc123",
"limits": {
"max_sessions_per_user": 3,
"max_cost_per_session": 5.00,
"max_daily_spend_per_user": 25.00,
"max_monthly_spend_per_user": 250.00,
"allowed_templates": null,
"enforcement": "hard",
"deployment": {
"mode": "role_based",
"roles": ["admin", "owner"],
"user_grants": []
}
},
"updated_at": "2026-05-09T18:00:00Z"
}