Integrate
Webhooks
Status: Coming soon
Webhooks notify your systems about account events so you can automate operations.
| Event | When |
|---|---|
key.created, key.revoked, key.leaked |
Key lifecycle changes |
usage.threshold_reached |
50%, 80% or 100% of the monthly allowance or spend cap |
quota.exceeded |
Production calls are being blocked |
invoice.created, invoice.paid, payment.failed |
Billing events |
subscription.updated |
Plan change, cancellation, renewal |
model.deprecation_notice |
A model version you use is scheduled for retirement |
Setting up
Graphite → Project → Webhooks → Add endpoint: enter an HTTPS URL and choose events. Use Send test event to check delivery.
Payload
JSON
{
"id": "evt_3a1…",
"type": "usage.threshold_reached",
"created": 1762600000,
"data": {"org_id": "…", "threshold_pct": 80, "units": 400000, "allowance": 500000}
}Verifying signatures
Each delivery has an Augsidius-Signature header: t=<timestamp>,v1=<hex>. Compute HMAC-SHA256(secret, "<timestamp>.<raw body>") with your endpoint secret and compare in constant time. Reject deliveries older than 5 minutes.
Python
import hmac, hashlib, time
def verify(secret: str, header: str, body: bytes) -> bool:
parts = dict(p.split("=", 1) for p in header.split(","))
if abs(time.time() - int(parts["t"])) > 300:
return False
mac = hmac.new(secret.encode(), f"{parts['t']}.".encode() + body, hashlib.sha256).hexdigest()
return hmac.compare_digest(mac, parts["v1"])Failed deliveries are retried with exponential backoff for 24 hours. Respond with any 2xx within 10 seconds.
