Quickstart
This guide walks you through registering a webhook, pushing an event, and verifying delivery — all using curl.
-
Register an event type
Terminal window curl -X POST http://localhost:8080/webhook.EventService/RegisterEvent \-H "Content-Type: application/json" \-d '{"name": "order.created","description": "Fires when a new order is placed","active": true}' -
Register a webhook
Terminal window curl -X POST http://localhost:8080/webhook.WebhookService/RegisterWebhook \-H "Content-Type: application/json" \-d '{"namespace": "default","url": "https://testhooks.sarathsadasivan.com/hooks","events": ["order.created"],"active": true}'Save the
webhookIdfrom the response for later use. -
Push an event
Terminal window curl -X POST http://localhost:8080/webhook.EventService/PushEvent \-H "Content-Type: application/json" \-d '{"namespace": "default","event": "order.created","payload": {"order_id": "ord_123","customer": "alice@example.com","total": 49.99},"ttlSeconds": 3600}' -
Check delivery status
Terminal window curl -X POST http://localhost:8080/webhook.DeliveryService/ListDeliveries \-H "Content-Type: application/json" \-d '{"webhookId": "YOUR_WEBHOOK_ID","namespace": "default","limit": 10}'
What Just Happened?
Section titled “What Just Happened?”- Sparrow stored the event and enqueued it for async processing
- The event worker found the matching subscription (created automatically when you registered the webhook with
events) - A delivery job was created and the webhook worker sent an HTTP POST to your URL
- The delivery status, response code, and response body were recorded
Next Steps
Section titled “Next Steps”- Learn how events, webhooks, and deliveries fit together
- Configure webhook secrets for HMAC signature verification
- Add payload transforms using Go templates
- Use client libraries: Go, Python, or TypeScript