Overview
A webhook is a server-to-server HTTP notification.
When a matching PulseGrid event happens, PulseGrid sends a signed JSON POST request to an endpoint owned by the receiving application. The receiver can update a CRM, create an order, start a workflow, send an email, record an audit entry or perform other backend work.
WebSocket and webhook are different:
- WebSocket: a live two-way connection between a client/service and a PulseGrid channel.
- Webhook: one signed HTTP request from PulseGrid to another backend after an event happens.
Webhooks continue server-side even when nobody has the PulseGrid dashboard open.
Setup
1. Choose a PulseGrid project.
2. Prepare an HTTPS POST route in the receiving backend, or use Webhook.site for temporary testing.
3. Open PulseGrid -> Webhooks and select the same project.
4. Add an endpoint with a name, URL and event filters.
5. Save the signing secret securely when it is shown.
6. Send the built-in test event.
7. Confirm HTTP 2xx in Recent activity.
8. Publish a real event from a channel in the same project.
9. Verify the signature in production receivers.
10. Add duplicate protection using delivery_id.
Code example
Application event
|
v
PulseGrid project/channel
|
+--> realtime subscribers
|
+--> matching webhook endpoint
|
v
POST https://api.example.com/webhooks/pulsegrid
|
v
verify signature -> deduplicate -> process -> HTTP 2xx
Notes
Webhook endpoints are project-scoped. An endpoint under Project Alpha does not receive events from Project Beta.
Use Events=* while learning or when the receiver intentionally handles all project events. In production, narrower event filters can reduce unnecessary traffic.