Webhooks

Real-time event notifications with HMAC-SHA256 signature verification.

POST /webhooks

Create a new webhook endpoint.

Request

{
  "url": "https://your-app.com/athena-webhook",
  "events": ["trust.miscalibrated", "bias.detected"],
  "description": "Production webhook"
}
Field
Type
Required
Description

url

string

HTTPS endpoint URL

events

array

Events to subscribe to

description

string

Webhook description

Response

{
  "webhook_id": "wh_abc123",
  "url": "https://your-app.com/athena-webhook",
  "secret": "whsec_xyz789",
  "events": ["trust.miscalibrated", "bias.detected"],
  "created_at": "2025-12-25T10:00:00Z"
}

Example


GET /webhooks

List all webhooks.

Response


PATCH /webhooks/:id

Update a webhook.

Request


DELETE /webhooks/:id

Delete a webhook.

Response


POST /webhooks/:id/test

Send a test webhook event.

Response


POST /webhooks/:id/rotate-secret

Rotate webhook secret.

Response

The old secret remains valid for 24 hours (grace period).


POST /webhooks/:id/enable

Re-enable a disabled webhook.

Response


GET /webhooks/:id/deliveries

Get webhook delivery history.

Request

Response


Available Events

Event
Description
Regulation

trust.miscalibrated

User shows automation bias or algorithm aversion

EU Art 14(4)(b)

bias.detected

Bias detected across demographics

EU Art 10, FDA IV.B

risk_user.identified

User flagged as high-risk

All

threshold.breached

Custom threshold exceeded

All

audit.required

Regulatory audit triggered

Texas TRAIGA

compliance.report_ready

Export completed

All


Webhook Payload

All webhooks follow this format:


Signature Verification

All webhooks are signed using HMAC-SHA256.

Verify Signature

Signature Header Format


Retry Policy

Attempt
Delay

1

Immediate

2

1 minute

3

5 minutes

4

30 minutes

5

2 hours

After 5 failed attempts, the webhook is disabled automatically.


Next: System Monitoring API

Last updated