API example
Use your API key to send a notification through NotifyHub from any language.
cURL
curl -X POST https://your-domain.com/api/v1/notify \
-H "Authorization: Bearer sk_live_xxxxx" \
-H "Content-Type: application/json" \
-d '{
"channel": "whatsapp",
"to": "+15551234567",
"title": "Order #1024",
"message": "Your order has shipped"
}'Node.js
await fetch('https://your-domain.com/api/v1/notify', {
method: 'POST',
headers: {
Authorization: 'Bearer sk_live_xxxxx',
'Content-Type': 'application/json',
},
body: JSON.stringify({
channel: 'telegram',
to: '123456789',
title: 'Order #1024',
message: 'Your order has shipped',
}),
});