# afriref Webhook Alert Subscription

> afriref Webhook Alert Subscription is a paid API for AI agents from afriref.dev, paid per call via x402, $0.1/call, status unknown (last checked 2026-09-13).

Registers a webhook endpoint to receive real-time notifications when Pan-African government reference data series (policy rates, VAT, wages, holidays) change

## Facts

- Endpoint: POST https://afriref.dev/alerts
- Price: $0.1/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/afriref-webhook-alert-subscription-f698c0b8
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_L6ee8t9-OrH3inrcoGIzp

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability afriref-webhook-alert-subscription-f698c0b8 -d '<json body>'
```

Example prompt: Set up a webhook to my endpoint at https://example.com/webhook so I get notified whenever Nigeria's policy rate or Ghana's VAT rate changes — I need the HMAC secret to verify the payloads.

## When to prefer this

Choose this endpoint when you need real-time push notifications of African government reference data changes rather than polling. Ideal for compliance dashboards, fintech applications pricing Africa-specific products, or regulatory monitoring systems that need to react immediately when central bank rates, VAT, wages, or holidays are updated. Prefer this over periodic GET polling when low latency on data changes matters or when you want to avoid unnecessary API call costs.

## Known failure modes

- Invalid webhook URL format returns a 400 validation error
- Unreachable webhook URL may cause silent failures on event delivery
- Invalid series pattern syntax returns an error
- Payment failure via x402 prevents subscription creation
- Duplicate subscriptions for the same URL and series may be created if not deduplicated client-side

## How this service works

Authoritative Pan-African government reference values as clean JSON: central-bank policy rates, VAT rates, national minimum wages and public holidays for Côte d'Ivoire (ci), Egypt (eg), Ethiopia (et), Ghana (gh), Kenya (ke), Morocco (ma), Nigeria (ng), Rwanda (rw), Senegal (sn), Tanzania (tz), Uganda (ug). Every value carries a citation to its official primary source (government gazette or central-bank statement), an effective date, a last-confirmed date and a staleness flag.

## Output

Returns a subscription object containing a unique subscription ID (UUID), the registered webhook URL, an active boolean flag, a hex-encoded HMAC secret for payload verification, the list of subscribed series patterns, and the creation timestamp. The HMAC secret is used to authenticate incoming webhook POST payloads from afriref when series data changes.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "url": {
   "type": "string",
   "format": "uri",
   "description": "Webhook endpoint for series.changed events"
  },
  "series": {
   "type": "array",
   "items": {
    "type": "string"
   },
   "description": "Patterns like \"ao/policy-rate\", \"bf/*\", or \"*\""
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "id": "3f6a1c2e-0000-4000-8000-000000000000",
  "url": "https://example.com/webhook",
  "active": true,
  "secret": "hex-encoded-hmac-secret",
  "series": [
   "ci/policy-rate"
  ],
  "created": "2026-07-15T12:00:00.000Z"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/afriref-webhook-alert-subscription-f698c0b8/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from afriref.dev](https://www.zero.xyz/host/afriref.dev/llms.txt)
