Skip to main content

POST /api/v1/webhooks

Requires Bearer token.
Register a webhook to receive real-time notifications when scores change, new permits are filed, or monitored locations trigger alerts. Request body
{
  "url": "https://your-app.com/hooks/axiom",
  "events": ["score.changed", "permit.filed", "alert.triggered"],
  "secret": "whsec_your_signing_secret"
}
FieldTypeRequiredDefaultDescription
urlstringHTTPS endpoint to receive webhook POST requests.
eventsarrayEvents to subscribe to: score.changed, permit.filed, alert.triggered, monitor.report.
secretstringSigning secret for HMAC-SHA256 payload verification.
Example
curl -X POST "https://axiomlocus.io/api/v1/webhooks" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer al_your_key_here" \
  -d '{"url":"https://your-app.com/hooks/axiom","events":["score.changed","permit.filed"]}'
Response
{
  "webhook": {
    "id": "wh_abc123def456",
    "url": "https://your-app.com/hooks/axiom",
    "events": ["score.changed", "permit.filed"],
    "active": true,
    "created_at": "2026-03-31T12:00:00Z"
  }
}
FieldTypeDescription
webhook.idstringUnique webhook identifier (prefixed wh_).
webhook.eventsarraySubscribed event types.
webhook.activebooleanWhether the webhook is currently active.

GET /api/v1/webhooks

Requires Bearer token.
List all registered webhooks for your account. Example
curl "https://axiomlocus.io/api/v1/webhooks" \
  -H "Authorization: Bearer al_your_key_here"
Response
{
  "webhooks": [
    {
      "id": "wh_abc123def456",
      "url": "https://your-app.com/hooks/axiom",
      "events": ["score.changed", "permit.filed"],
      "active": true,
      "created_at": "2026-03-31T12:00:00Z",
      "last_delivery": "2026-03-31T14:22:00Z",
      "delivery_success_rate": 0.98
    }
  ]
}
FieldTypeDescription
webhooksarrayAll registered webhook objects.
webhooks[].delivery_success_ratefloatSuccess rate of recent deliveries (0-1).
webhooks[].last_deliverystringTimestamp of last delivery attempt.

DELETE /api/v1/webhooks

Requires Bearer token.
Delete a webhook registration. Query parameters
NameTypeRequiredDefaultDescription
idstringWebhook ID (prefixed wh_).
Example
curl -X DELETE "https://axiomlocus.io/api/v1/webhooks?id=wh_abc123def456" \
  -H "Authorization: Bearer al_your_key_here"
Response
{ "success": true }
FieldTypeDescription
successbooleanWhether the webhook was successfully deleted.