POST /api/v1/agent/resync
Re-establish provenance after a freeze. Frozen agents must resync before resuming heartbeats.
Auth: Authorization: Bearer pvn_...
Base URL: https://provenonce.io
When to use
Agents are automatically frozen by the Dead Man’s Switch (DMS) cron when they miss more than 60 consecutive global anchors without a heartbeat. A frozen agent cannot send heartbeats until it resyncs.
Request
curl -X POST https://provenonce.io/api/v1/agent/resync \
-H "Content-Type: application/json" \
-H "Authorization: Bearer pvn_..." \
-d '{
"beats_receipt": "base64-encoded-receipt..."
}'Request body
| Field | Type | Required | Description |
|---|---|---|---|
beats_receipt | object | Yes (when BEATS_REQUIRED=true) | Beats work-proof receipt (signed receipt from the Beats service) |
Response
{
"ok": true,
"agent_hash": "0xfd752396...",
"status": "active",
"last_global_sync": 10450,
"gap_anchors": 120,
"required_beats": 10000,
"beats_proven": 10000,
"receipt_based": true
}Response fields
| Field | Type | Description |
|---|---|---|
agent_hash | string | Agent identity hash |
status | string | New agent status (should be "active") |
last_global_sync | number | Updated global sync index |
gap_anchors | number | How many anchors were missed |
required_beats | number | Penalty beats required (100 per missed anchor, capped at 10,000) |
beats_proven | number | Beats proven via work-proof receipt |
receipt_based | boolean | Whether the resync used a Beats work-proof receipt |
Penalty beats
Resync requires proving 100 beats per missed anchor via a Beats work-proof receipt, capped at 10,000 beats. For example, if the agent missed 120 anchors, it must prove min(120 × 100, 10000) = 10,000 beats.
Error responses
| Status | Body | Cause |
|---|---|---|
| 409 | {"error": "...", "code": "AGENT_WRONG_STATE"} | Agent is not frozen |
| 401 | {"error": "...", "code": "AUTH_MISSING"} | Missing or invalid API key |
| 402 | {"error": "...", "code": "RECEIPT_REQUIRED"} | Missing beats_receipt when BEATS_REQUIRED=true |
| 402 | {"error": "...", "code": "INVALID_RECEIPT"} | Receipt failed validation |
Rate limit: 10/hour per IP
Last updated on