Receive webhooks locally
Tunnel your local server and test Blooio webhook deliveries
Overview
Run a local server, expose it with a tunnel (e.g., ngrok), and point Blooio to the public URL.
Start a local server
const app = express();
app.use(express.json());
app.post("/webhooks/blooio", (req, res) => {
console.log("[Blooio]", req.headers["x-blooio-event"], req.body);
res.sendStatus(200);
});
app.listen(3001, () => console.log("Listening on http://localhost:3001"));Expose the server
ngrok http http://localhost:3001Copy the HTTPS URL from ngrok, e.g., https://abcd1234.ngrok.io.
Configure your webhook URL
Create a new webhook using the API:
curl -X POST 'https://api.blooio.com/v2/api/webhooks' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"webhook_url": "https://abcd1234.ngrok.io/webhooks/blooio",
"webhook_type": "message"
}'Try itNote
You can have up to 64 webhooks per organization. Set
webhook_typeto"message"for message events only, or"all"for all events.
Verify deliveries
You should see incoming events in your terminal. See event schemas in Webhook events.
Managing webhooks
List all webhooks
curl -X GET 'https://api.blooio.com/v2/api/webhooks' \
-H 'Authorization: Bearer YOUR_API_KEY'Try itUpdate a webhook
curl -X PATCH 'https://api.blooio.com/v2/api/webhooks/{webhookId}' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"webhook_type": "all"
}'Try itDelete a webhook
curl -X DELETE 'https://api.blooio.com/v2/api/webhooks/{webhookId}' \
-H 'Authorization: Bearer YOUR_API_KEY'Try itRotate webhook secret
If you need a new signing secret:
curl -X POST 'https://api.blooio.com/v2/api/webhooks/{webhookId}/secret/rotate' \
-H 'Authorization: Bearer YOUR_API_KEY'Try it