Create a policy with caps and limits
POST
/v1/admin/policies
Defines caps (soft-landing constraints) and rate limits for scopes. Policies are evaluated during reservation requests.
AUTHORIZATION: - Tenant can create policies for their own scopes only
SCOPE PATTERNS: - "tenant:acme-corp" (exact match) - "tenant:acme-corp/" (all descendants) - "agent:" (all agents system-wide) - "*/agent:summarizer" (agent across all tenants)
PRIORITY: - Higher priority policies override lower priority - If multiple policies match, highest priority wins
EFFECTIVE DATES: - Optional time-bounded policies - Useful for temporary restrictions or trials
Authorizations
ApiKeyAuth
Tenant-scoped API key for runtime operations (consistent with Cycles Protocol)
Type
API Key (header: X-Cycles-API-Key)
Request Body
application/json
JSON "name": "string", "description": "string", "scope_pattern": "string", "priority": 0, "caps": { "max_tokens": 0, "max_steps_remaining": 0, "tool_allowlist": [ "string" ], "tool_denylist": [ "string" ], "cooldown_ms": 0 }, "commit_overage_policy": "string", "reservation_ttl_override": { "default_ttl_ms": 0, "max_ttl_ms": 0, "max_extensions": 0 }, "rate_limits": { }, "effective_from": "string", "effective_until": "string"
{
}
Responses
Policy created
application/json
JSON "policy_id": "string", "name": "string", "description": "string", "scope_pattern": "string", "priority": 0, "caps": { "max_tokens": 0, "max_steps_remaining": 0, "tool_allowlist": [ "string" ], "tool_denylist": [ "string" ], "cooldown_ms": 0 }, "commit_overage_policy": "string", "reservation_ttl_override": { "default_ttl_ms": 0, "max_ttl_ms": 0, "max_extensions": 0 }, "rate_limits": { "max_reservations_per_minute": 0, "max_commits_per_minute": 0 }, "status": "string", "effective_from": "string", "effective_until": "string", "created_at": "string", "updated_at": "string"
{
}
