End-to-End Webhook Guide
1. Register your endpoint
curl -X POST https://api.notifo.cloud/v1/webhooks \
-H "Authorization: Bearer YOUR_JWT" \
-H "Content-Type: application/json" \
-d '{
"url": "https://yourapp.com/hooks/notifo",
"events": ["message.delivered", "message.failed"]
}'
Save the secret from the response.
2. Set up your endpoint
Your server must:
- Accept
POSTrequests - Read the raw body bytes (do not parse JSON first)
- Verify the
X-Notifo-Signatureheader - Return
2xxwithin 10 seconds
See Signature Verification → for language examples.
3. Test locally with a tunnel
Use ngrok or cloudflared to expose your local server:
ngrok http 3000
# Forwarding: https://abc123.ngrok.io -> localhost:3000
Register https://abc123.ngrok.io/hooks/notifo as your webhook URL.
4. Trigger a test
Send a message via the API and watch your endpoint receive the message.queued → message.delivered sequence.
5. Handle the payload
const event = JSON.parse(rawBody);
switch (event.event) {
case 'message.delivered':
await markDelivered(event.messageId);
break;
case 'message.failed':
await alertTeam(event.messageId, event.error);
break;
}