Webhooks

Register a webhook URL to receive real-time notifications instead of polling. Subscribe to specific event types for granular control.

Event types

Event Type Trigger
research.completedResearch job finished successfully
research.failedResearch job failed
bulk.completedBulk job finished
bulk.failedBulk job failed
list.analyzedList analysis finished
list.failedList analysis failed
watchlist.change_detectedSignificant score change on watched company

Event envelope

Every webhook delivery uses a structured event envelope:

{
  "id": "evt_a1b2c3d4e5f6",
  "type": "research.completed",
  "created_at": "2026-02-16T12:00:00Z",
  "data": {
    "job_id": 123,
    "document_id": 456,
    "company_url": "https://example.com"
  }
}
POST /v1/webhooks/register

Register or update your webhook URL. Optionally subscribe to specific event types (null = all events). Returns a secret for HMAC signature verification.

Request body

{
  "url": "https://yourserver.com/webhook",
  "event_types": ["research.completed", "bulk.completed"]
}
wh = client.register_webhook(
    url="https://yourserver.com/webhook",
    event_types=["research.completed", "bulk.completed"]
)
print(wh["secret"])  # Store this securely!

Response

{
  "object": "webhook",
  "url": "https://yourserver.com/webhook",
  "secret": "a1b2c3...hex...",
  "active": true,
  "event_types": ["research.completed", "bulk.completed"]
}
GET /v1/webhooks

Get your current webhook configuration.

Response

{
  "object": "webhook",
  "url": "https://yourserver.com/webhook",
  "active": true,
  "event_types": ["research.completed", "bulk.completed"]
}
DELETE /v1/webhooks

Remove your webhook. Returns 204 on success.

Verifying signatures

Each webhook delivery includes an X-Auggie-Signature header. Verify it using the secret from registration:

from auggie import Webhook, WebhookSignatureError

try:
    event = Webhook.construct_event(
        payload=request.body,
        signature_header=request.headers["X-Auggie-Signature"],
        secret="your_webhook_secret"
    )
    print(f"Event {event['type']}: {event['data']}")
except WebhookSignatureError:
    return Response(status_code=400)