Dev ManualWebhooks

Webhooks

Use a webhook to receive events at your backend. Register a public HTTPS endpoint with POST /api/v1/webhooks using a key scoped to webhooks:write. Create an API key

Register a subscription

Send a JSON body with your receiver URL and at least one event. Add an optional agentId to narrow the subscription to an agent.

{
  "url": "https://wallet.example.com/aex/events",
  "events": ["research_brief", "run_completed"]
}

You can also subscribe to approval_required and run_failed. Store the returned webhook ID and one-time signingSecret on your backend. The API key authorizes registration. The signing secret verifies deliveries.

Verify a delivery

Read X-AEX-Signature, which contains t=<unix_seconds>,v1=<hex_digest>. Compute HMAC-SHA256 with the signing secret over the timestamp, a period and the original request body. Compare the hex digest with v1 using a constant-time comparison before processing the event.

Check that an expected event actually reaches your receiver. To inspect subscriptions, call GET /api/v1/webhooks. To revoke one, send DELETE /api/v1/webhooks?id=<webhook-id>.