Webhooks require an API key with the
starter tier or above. Sandbox webhooks fire with simulated payloads and do not count against your quota.How It Works
Every time an event occurs in the LimitGuard platform, we send an HTTPPOST request to each registered endpoint with a JSON payload describing what happened. Your server responds with HTTP 200 to acknowledge receipt. If delivery fails, we retry with exponential backoff.
Each request includes an X-LimitGuard-Signature header containing an HMAC-SHA256 signature computed from the raw request body using the webhook secret returned at registration. Always verify this signature before processing the payload.
Setup
1
Register your endpoint
Send a
POST /v1/webhooks request with your HTTPS URL and the event types you want to receive.Response (201 Created)
2
Verify the signature
Before processing any webhook payload, verify that it genuinely came from LimitGuard by computing the expected HMAC-SHA256 signature and comparing it to the value in the
X-LimitGuard-Signature header.3
Handle the event
Each webhook payload follows a consistent envelope structure. Dispatch on
event.type:Payload Envelope
Event Types
Subscribe to All Events
Pass"events": ["*"] to receive every event type, including future additions.
New event types may be added as LimitGuard adds data sources. Subscribing to
["*"] is the easiest way to stay current, but ensure your handler ignores unknown types gracefully.Signature Verification
Every webhook request includes two headers:Computing the Signature
X-LimitGuard-Signature header value is formatted as sha256=<hex_digest>.
Replay Attack Prevention
Compare theX-LimitGuard-Timestamp header against your server’s current time. Reject deliveries older than 5 minutes to prevent replay attacks:
Python
Retry Logic
If your endpoint returns anything other than a2xx status code, or if the connection times out, LimitGuard retries delivery with exponential backoff:
After 4 failed attempts, the event is marked as undelivered and no further retries occur. You can replay undelivered events from the dashboard or by sending a test event.
Timeout: LimitGuard waits up to 10 seconds for your server to respond. Respond with
200 immediately and process the payload asynchronously.
Managing Webhooks
List Active Webhooks
Remove a Webhook
curl
204 No Content on success. The endpoint immediately stops receiving deliveries.
Testing
Use the test endpoint to fire a simulated event to your webhook without triggering a real check:Response
Acme Corp BV sandbox entity. The signature is computed using your real webhook secret, so your full verification stack is exercised.
Best Practices
Respond Immediately, Process Asynchronously
Acknowledge the delivery within 10 seconds by returning200 OK before doing any meaningful work. Offload processing to a background queue (Celery, BullMQ, SQS, etc.):
Python
Implement Idempotency
LimitGuard may deliver the same event more than once on retry. Use theid field as an idempotency key:
Python
Forward-Compatible Event Handling
New event types will be introduced as LimitGuard adds capabilities. Always handle unknown types gracefully rather than raising an exception:Python
Validate Event Data
Even after signature verification, validate required fields before using them:Python
Use HTTPS with a Valid Certificate
LimitGuard only delivers tohttps:// endpoints with a valid TLS certificate. Self-signed certificates and http:// URLs are rejected at registration time.
Error (400 Bad Request)
Webhook Payload Reference
All event payloads share the same outer envelope:Next Steps
API Reference: Webhooks
Interactive playground for all four webhook endpoints
Rate Limits
Understand quota limits and how they apply to webhook-triggering calls
Error Handling
Complete error catalog — including webhook delivery failures
Sandbox
Test your webhook handler with deterministic sandbox payloads