Parent-Sponsored Heartbeats
Allow a parent agent to pay heartbeat fees for its direct children. Phase 1 supports direct children only.
Auth: Authorization: Bearer pvn_... (parent agent)
Base URL: https://provenonce.io
POST /api/v1/agent/sponsor
Create or update a heartbeat sponsorship for a child agent.
curl -X POST https://provenonce.io/api/v1/agent/sponsor \
-H "Content-Type: application/json" \
-H "Authorization: Bearer pvn_PARENT_KEY..." \
-d '{
"child_hash": "0xabc123...",
"max_heartbeats_epoch": 500,
"expires_in_hours": 720
}'Request body
| Field | Type | Required | Description |
|---|---|---|---|
child_hash | string | Yes | Child agent hash (0x + 64 hex) |
max_heartbeats_epoch | number | No | Maximum heartbeats per epoch (1-10,000, default 100) |
expires_in_hours | number | No | Sponsorship TTL in hours (minimum 1) |
Response
{
"ok": true,
"sponsorship": {
"parent_hash": "0xfd752396...",
"child_hash": "0xabc123...",
"status": "active",
"max_heartbeats_epoch": 500,
"heartbeats_used_epoch": 0,
"expires_at": "2026-03-15T12:00:00.000Z"
}
}DELETE /api/v1/agent/sponsor
Revoke a sponsorship.
curl -X DELETE https://provenonce.io/api/v1/agent/sponsor \
-H "Content-Type: application/json" \
-H "Authorization: Bearer pvn_PARENT_KEY..." \
-d '{"child_hash": "0xabc123..."}'Response
{
"ok": true,
"revoked": true
}GET /api/v1/agent/sponsor
List all sponsorships for the authenticated parent.
curl https://provenonce.io/api/v1/agent/sponsor \
-H "Authorization: Bearer pvn_PARENT_KEY..."Response
{
"ok": true,
"sponsorships": [
{
"parent_hash": "0xfd752396...",
"child_hash": "0xabc123...",
"status": "active",
"max_heartbeats_epoch": 500,
"heartbeats_used_epoch": 42,
"expires_at": "2026-03-15T12:00:00.000Z",
"created_at": "2026-02-13T12:00:00.000Z"
}
]
}How it works
When a child agent sends a heartbeat, the payment sender is checked:
- If the sender matches the child’s own wallet, the heartbeat is accepted normally.
- If the sender does not match, the server checks for an active sponsorship where the parent’s wallet matches the sender.
- If a valid sponsorship exists and the epoch cap has not been reached, the heartbeat is accepted and charged to the parent.
Requirements
- Parent must have a linked Solana wallet (not api-sponsored)
- Parent must not be frozen
- Child must be a direct child of the parent (Phase 1 restriction)
- Cannot sponsor yourself
Auto-revocation
Sponsorships are automatically revoked when:
- Either party is frozen by the DMS
- The child’s API key is revoked
Error responses
| Status | Body | Cause |
|---|---|---|
| 400 | {"error": "...", "code": "SPONSOR_INVALID"} | Child is not a direct child |
| 400 | {"error": "...", "code": "VALIDATION"} | Invalid child_hash or params |
| 401 | {"error": "...", "code": "AUTH_MISSING"} | Missing or invalid API key |
| 403 | {"error": "...", "code": "WALLET_REQUIRED"} | Parent has no linked wallet |
| 403 | {"error": "...", "code": "SPONSOR_PARENT_FROZEN"} | Parent is frozen |
| 404 | {"error": "...", "code": "AGENT_NOT_FOUND"} | Parent or child not found |
| 404 | {"error": "...", "code": "SPONSOR_NOT_FOUND"} | No active sponsorship (DELETE) |
| 429 | {"error": "...", "code": "RATE_LIMITED"} | Rate limit exceeded |
Rate limits
| Method | Limit |
|---|---|
| POST | 10/hour per agent |
| DELETE | 60/min per agent |
| GET | 60/min per agent |