Skip to main content
POST
/
api
/
v1
/
budget
/
sync
Sync budget accumulators
curl --request POST \
  --url https://api.agentmeter.com/api/v1/budget/sync \
  --header 'X-AgentMeter-Key: <api-key>'
The SDK uses this endpoint to reconcile local budget accumulators with backend totals. Most teams should not call it directly.

Request

{
  "entries": [
    {
      "rule_id": "00000000-0000-0000-0000-000000000000",
      "scope": "per_customer",
      "customer_id": "cust_abc123",
      "accumulated_cost_usd": 42.5,
      "period_start": "2026-06-01T00:00:00.000Z",
      "event_count": 18
    }
  ]
}

Response

{
  "entries": [
    {
      "rule_id": "00000000-0000-0000-0000-000000000000",
      "customer_id": "cust_abc123",
      "authoritative_cost_usd": 43.1,
      "period_start": "2026-06-01T00:00:00.000Z"
    }
  ]
}

Notes

  • Backend totals are authoritative.
  • The SDK overwrites local accumulators from the response.
  • This endpoint is part of budget hard-stop safety across multiple SDK replicas.