Validate (422 naming the key) and store the project's trust policy override (admin).
const url = 'https://example.com/api/projects/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/trust/policy';const options = { method: 'PUT', headers: { cookie: 'supacloud_session=<supacloud_session>', 'Content-Type': 'application/json' }, body: '{"trust_policy":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://example.com/api/projects/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/trust/policy \ --header 'Content-Type: application/json' \ --cookie supacloud_session=<supacloud_session> \ --data '{ "trust_policy": "example" }'Validate (422 naming the key) and store the project’s trust policy override (admin).
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Project id
Request Bodyrequired
Section titled “Request Bodyrequired”The PUT /trust/policy body. null (or {}) clears the project override, so the
workspace policy (or the built-ins) apply again.
object
Example generated
{ "trust_policy": "example"}Responses
Section titled “Responses”Policy saved; the ledger as it now reads
A project’s trust ledger as the browser and the agent surface read it.
object
The active clamp, or null when merges follow the autonomy ceiling.
object
Whether an owner acknowledged it; the next tick lifts an acknowledged clamp once the project has recovered.
The owner who acknowledged the clamp, once one has.
The snapshot whose figures engaged it.
The merge ceiling the clamp holds the project at (pr_only).
The measured signal that engaged it (regression_rate or first_pass_rate).
When it engaged (RFC 3339). One notification is sent per since.
Whether the clamp is enforced (trust_clamp switch). While it is off the ledger
is computed and shown, but merges are not held by it.
The policy in force.
object
Apply a routing proposal to a strictly stronger tier without an owner decision.
Lift a recovered clamp without an owner acknowledgement.
A regression rate above this engages the clamp.
A first-pass rate below this engages the clamp.
Below this many items no snapshot engages or lifts anything.
Consecutive clean items before a clamp may lift.
How many of the newest done/blocked backlog items one snapshot covers.
Where the policy came from: project, workspace or built_in.
One owner-gated trust proposal (autonomy_raise or routing_change). It applies
only through an owner’s approval.
object
The snapshot whose figures support it.
autonomy_raise | routing_change.
What the proposal would change, as the governor wrote it.
routing_change: the implement stage moves to a stronger model tier.
object
The tier the stage runs on now.
The routed stage (implement).
The stronger tier proposed.
autonomy_raise: the merge ceiling widens one step.
object
The merge ceiling now.
The wider merge ceiling proposed.
open | approved | rejected.
The newest snapshot per tier (the all-tier one has tier = null).
One trust snapshot: the measured quality of the project’s newest items, all tiers
(tier = null) or one model tier. A null rate means “not measured in this window”.
object
The model tier, or null for the all-tier snapshot.
Example generated
{ "clamp": { "acknowledged": true, "acknowledged_by": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "evidence_snapshot_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "merge_ceiling": "example", "reason": "example", "since": "example" }, "clamp_switch_enabled": true, "policy": { "auto_apply_routing": true, "auto_lift": true, "max_regression_rate": 1, "min_first_pass": 1, "min_items": 1, "recovery_items": 1, "window": 1 }, "policy_source": "example", "project_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "proposals": [ { "created_at": "2026-04-15T12:00:00Z", "decided_at": "2026-04-15T12:00:00Z", "decided_by": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "evidence_snapshot_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "kind": "example", "project_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "proposed": { "from_tier": "example", "stage": "example", "to_tier": "example" }, "rationale": "example", "status": "example" } ], "snapshots": [ { "blocked_rate": 1, "computed_at": "2026-04-15T12:00:00Z", "cost_per_merge_usd": 1, "first_pass_rate": 1, "human_reject_rate": 1, "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "regression_rate": 1, "rework_mean": 1, "tier": "example", "window_items": 1 } ]}Authentication required
The canonical JSON body of every error response. Every AppError serializes as
this exact shape; code is the generated stable machine-readable vocabulary.
object
Present only on an MCP budget refusal (429) — the refusing layer + retry hint.
object
The refusing layer.
The layer’s budget.
Seconds until a retry can pass, or null when it never will for this session.
Calls already counted in the layer.
Machine-readable, stable error code.
Present only on a quota-exceeded 403 — the inline upgrade-CTA payload.
object
The entitlement feature key that was hit, e.g. apps.max_count.
The plan’s limit for this key.
Where to send the user to upgrade.
Current usage (count or bytes, per the key).
Human-readable message (the server’s English text; the client may localize
by code).
Present on a launch refusal (400/403/409) — the structured facts only the refusing class can fill: occupancy, exhausted budget, or required labels.
object
Weighted workspace slots already held by starting/running agent runs.
The budget cap that refused.
Effective spend of the refusing budget scope (spend + in-flight reservations).
The workspace’s configured agent-concurrency cap.
The provider whose budget cap refused; absent for the workspace-wide cap.
Runner labels a fail-policy placement required and no runner offered.
Example
{ "code": "not_found"}Permission denied
The canonical JSON body of every error response. Every AppError serializes as
this exact shape; code is the generated stable machine-readable vocabulary.
object
Present only on an MCP budget refusal (429) — the refusing layer + retry hint.
object
The refusing layer.
The layer’s budget.
Seconds until a retry can pass, or null when it never will for this session.
Calls already counted in the layer.
Machine-readable, stable error code.
Present only on a quota-exceeded 403 — the inline upgrade-CTA payload.
object
The entitlement feature key that was hit, e.g. apps.max_count.
The plan’s limit for this key.
Where to send the user to upgrade.
Current usage (count or bytes, per the key).
Human-readable message (the server’s English text; the client may localize
by code).
Present on a launch refusal (400/403/409) — the structured facts only the refusing class can fill: occupancy, exhausted budget, or required labels.
object
Weighted workspace slots already held by starting/running agent runs.
The budget cap that refused.
Effective spend of the refusing budget scope (spend + in-flight reservations).
The workspace’s configured agent-concurrency cap.
The provider whose budget cap refused; absent for the workspace-wide cap.
Runner labels a fail-policy placement required and no runner offered.
Example
{ "code": "not_found"}Project not found
The canonical JSON body of every error response. Every AppError serializes as
this exact shape; code is the generated stable machine-readable vocabulary.
object
Present only on an MCP budget refusal (429) — the refusing layer + retry hint.
object
The refusing layer.
The layer’s budget.
Seconds until a retry can pass, or null when it never will for this session.
Calls already counted in the layer.
Machine-readable, stable error code.
Present only on a quota-exceeded 403 — the inline upgrade-CTA payload.
object
The entitlement feature key that was hit, e.g. apps.max_count.
The plan’s limit for this key.
Where to send the user to upgrade.
Current usage (count or bytes, per the key).
Human-readable message (the server’s English text; the client may localize
by code).
Present on a launch refusal (400/403/409) — the structured facts only the refusing class can fill: occupancy, exhausted budget, or required labels.
object
Weighted workspace slots already held by starting/running agent runs.
The budget cap that refused.
Effective spend of the refusing budget scope (spend + in-flight reservations).
The workspace’s configured agent-concurrency cap.
The provider whose budget cap refused; absent for the workspace-wide cap.
Runner labels a fail-policy placement required and no runner offered.
Example
{ "code": "not_found"}An unknown key or an out-of-range value, named in the message
The canonical JSON body of every error response. Every AppError serializes as
this exact shape; code is the generated stable machine-readable vocabulary.
object
Present only on an MCP budget refusal (429) — the refusing layer + retry hint.
object
The refusing layer.
The layer’s budget.
Seconds until a retry can pass, or null when it never will for this session.
Calls already counted in the layer.
Machine-readable, stable error code.
Present only on a quota-exceeded 403 — the inline upgrade-CTA payload.
object
The entitlement feature key that was hit, e.g. apps.max_count.
The plan’s limit for this key.
Where to send the user to upgrade.
Current usage (count or bytes, per the key).
Human-readable message (the server’s English text; the client may localize
by code).
Present on a launch refusal (400/403/409) — the structured facts only the refusing class can fill: occupancy, exhausted budget, or required labels.
object
Weighted workspace slots already held by starting/running agent runs.
The budget cap that refused.
Effective spend of the refusing budget scope (spend + in-flight reservations).
The workspace’s configured agent-concurrency cap.
The provider whose budget cap refused; absent for the workspace-wide cap.
Runner labels a fail-policy placement required and no runner offered.
Example
{ "code": "not_found"}Structured server error
The canonical JSON body of every error response. Every AppError serializes as
this exact shape; code is the generated stable machine-readable vocabulary.
object
Present only on an MCP budget refusal (429) — the refusing layer + retry hint.
object
The refusing layer.
The layer’s budget.
Seconds until a retry can pass, or null when it never will for this session.
Calls already counted in the layer.
Machine-readable, stable error code.
Present only on a quota-exceeded 403 — the inline upgrade-CTA payload.
object
The entitlement feature key that was hit, e.g. apps.max_count.
The plan’s limit for this key.
Where to send the user to upgrade.
Current usage (count or bytes, per the key).
Human-readable message (the server’s English text; the client may localize
by code).
Present on a launch refusal (400/403/409) — the structured facts only the refusing class can fill: occupancy, exhausted budget, or required labels.
object
Weighted workspace slots already held by starting/running agent runs.
The budget cap that refused.
Effective spend of the refusing budget scope (spend + in-flight reservations).
The workspace’s configured agent-concurrency cap.
The provider whose budget cap refused; absent for the workspace-wide cap.
Runner labels a fail-policy placement required and no runner offered.
Example
{ "code": "not_found"}