Set up a webhook endpoint
A webhook endpoint is just a URL on your server that accepts an HTTP POST. When something happens, InsurGrid sends the data there. This is the one prerequisite the webhook quickstarts need.
The rules
Your endpoint must:
Be reachable over HTTPS. Not plain HTTP. (In local development you'll get an HTTPS URL with a tunnel — see next page.)
Accept a
POSTwith a JSON body.Return a
2xxstatus quickly.
New term —
2xx: any HTTP status code from 200 to 299 (like200 OKor202 Accepted). To InsurGrid it means "I received it, thanks." Anything else (or a timeout) tells us delivery failed, and we'll retry.
Acknowledge first, work later
Return 2xx immediately, then do your real processing (saving to your database, calling other services) afterwards — in a background job, a queue, or after you've sent the response.
Why: we expect a fast acknowledgement. If your handler does slow work before replying, you may time out, we'll count it as failed, and we'll retry — so you'd process the same event several times.
Do this:
// server (Node/Express)
app.post("/hooks/insurgrid", (req, res) => {
res.sendStatus(200); // acknowledge first
queue.add("process-webhook", req.body); // then work, off the request
});Not this:
Register it
Add the endpoint's URL in the API section of your dashboard, under the topic you want (see Get access). Add a staging URL first.

You now have everything you need. Continue to the first quickstart — but if you're developing locally, read the next page first.
