Démarrage
Envoyez votre première alerte en moins de 5 minutes. Créez un canal, copiez l'URL du webhook et envoyez du JSON en POST.
1. Créez un canal
Dans votre tableau de bord, cliquez sur + Nouveau canal.
Donnez-lui un nom comme production-errors et
choisissez un emoji. Chaque canal possède sa propre URL de webhook.
2. Copiez l'URL du webhook
Ouvrez les paramètres de votre canal pour trouver l'URL du webhook :
https://zenhook.dev/api/webhook/your-unique-token
3. Envoyez une alerte de test
Essayez depuis votre terminal :
bash
curl -X POST https://zenhook.dev/api/webhook/YOUR_TOKEN \
-H "Content-Type: application/json" \
-d '{
"title": "Zenhook is working!",
"level": "success",
"emoji": "🚀",
"message": "First alert sent from terminal."
}' 4. Ajoutez-le à votre code
Un simple appel fetch suffit. Aucun SDK requis.
typescript
await fetch("https://zenhook.dev/api/webhook/YOUR_TOKEN", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
title: "New signup!",
level: "success",
emoji: "🎉",
fields: [
{ label: "Email", value: "[email protected]" },
{ label: "Plan", value: "Pro" }
]
})
});