Overview
A webhook is a server-to-server notification.
When something happens in PulseGrid, PulseGrid sends an HTTP POST request containing JSON to a URL owned by the receiving application. The receiving application can then perform work such as creating an order, updating a CRM, sending an email, opening a support ticket, or recording an audit entry.
A WebSocket and a webhook solve different problems:
- WebSocket: keeps a live two-way connection open between an application and PulseGrid.
- Webhook: PulseGrid makes one HTTP request to a backend after an event happens.
Example flow:
Website visitor -> WebSocket -> PulseGrid channel -> Webhook -> business backend
The webhook continues server-side. A customer does not need to keep the PulseGrid dashboard open.
Setup
1. Create or choose a PulseGrid project.
2. Create at least one channel in that project.
3. Prepare a receiving URL in your backend, or use Webhook.site temporarily while testing.
4. Open PulseGrid -> Webhooks and select the same project.
5. Click Add endpoint.
6. Enter a descriptive name, receiver URL, and event filters.
7. Create the endpoint and store its signing secret securely.
8. Click Send test.
9. Confirm that the receiver returned HTTP 2xx.
10. Publish a real event in a channel belonging to the same project.
Code example
Event happens in project Alpha
|
v
PulseGrid finds active Alpha webhook endpoints
|
v
PulseGrid signs the JSON request
|
v
POST https://api.example.com/webhooks/pulsegrid/
|
v
Receiver verifies signature, handles event, returns HTTP 200
Notes
Webhooks are project-scoped. An endpoint created under Alpha receives matching Alpha events only. It will not receive events from another project such as Yinhla101.
This isolation prevents one application or customer from receiving another project's events.