Skip to content

GET /api/govern/probe/policy-sync

Endpoint

GET https://api.govern.archetypal.ai/api/govern/probe/policy-sync

The Probe polls this endpoint to pick up policy changes (threshold updates, mode changes, new scoring rules) without a container restart. Policy sync happens:

  1. When policy_updated: true is returned in a heartbeat response
  2. Every 10 minutes as a background poll (even without heartbeat trigger)

Authentication

Authorization: Bearer gvn_live_xxxxxxxxxxxx
X-Govern-Org-Id: org_xxxxxxxxxxxx
X-Govern-Probe-Id: probe-production-1
X-Govern-Policy-Version: v3

The X-Govern-Policy-Version header tells the platform the version the Probe currently has. The platform returns 304 Not Modified if the policy hasn’t changed.

Response

Updated policy (200 OK):

{
"policy_version": "v4",
"effective_at": "2026-04-12T14:00:00.000Z",
"scoring": {
"mode": "block",
"security": {
"enabled": true,
"threshold": 0.65,
"check_pii": true,
"check_injection": true,
"check_credentials": true
},
"bias": {
"enabled": true,
"threshold": 0.55
},
"accuracy": {
"enabled": true,
"threshold": 0.70
},
"drift": {
"enabled": true,
"threshold": 0.20,
"baseline_window_hours": 168
},
"cost": {
"enabled": true,
"budget_tokens_per_hour": 500000,
"alert_at_percent": 0.80
}
},
"pricing": {
"anthropic": {
"claude-sonnet-4-20250514": {
"input_per_million": 3.00,
"output_per_million": 15.00
},
"claude-haiku-4-5-20251001": {
"input_per_million": 0.80,
"output_per_million": 4.00
}
},
"openai": {
"gpt-4o": {
"input_per_million": 2.50,
"output_per_million": 10.00
}
}
}
}

No change (304 Not Modified):

HTTP/1.1 304 Not Modified

The Probe retains its current policy when it receives 304.

Policy application

When the Probe receives a new policy version:

  1. Validates the schema
  2. Applies atomically (no partial updates)
  3. Logs the policy version change: {"level":"info","msg":"policy updated","old_version":"v3","new_version":"v4"}
  4. Emits a policy.updated event in the next telemetry batch

Policy updates take effect immediately for the next inference. Inferences in progress when the update arrives use the old policy.

Manual policy push

You can trigger an immediate policy push from the GOVERN dashboard:

Settings → Probes → [probe name] → Push Policy Now

The next heartbeat response will include "policy_updated": true, triggering a sync within 60 seconds.

Offline behavior

If the Probe cannot reach the policy sync endpoint, it continues operating with its current (cached) policy. The govern_telemetry_connected Prometheus metric drops to 0, and a policy.sync_failed event is emitted when connectivity is restored.