Passa al contenuto principale

Webhook

Come funziona​

Quando scatta un evento di Incident, isthisthing.online invia una richiesta POST con corpo JSON all’URL che configuri. Se fornisci un signing secret, ogni richiesta include un header di firma HMAC-SHA256 così puoi verificarne l’autenticità.

1. Prepara il tuo endpoint​

Il server deve esporre un endpoint HTTP che:

  • Accetti POST con Content-Type: application/json.
  • Risponda con 2xx entro 10 secondi (altrimenti la consegna viene ripetuta).

2. Aggiungi l’integrazione​

  1. Vai su Integrations → New Integration.
  2. Seleziona Webhook.
  3. Compila i campi:
FieldValue
NameAd es. Production Webhook
Webhook URLIl tuo endpoint, ad es. https://api.example.com/hooks/incidents
Signing SecretOpzionale. Se impostato, ogni richiesta include X-isthisthing.online-Signature.
  1. Abilita gli eventi di attivazione e fai clic su Save.

3. Verifica la firma (consigliato)​

Se hai impostato un signing secret, valida ogni richiesta in arrivo:

const crypto = require('crypto');

function verify(body, secret, headerValue) {
const expected = 'sha256=' +
crypto.createHmac('sha256', secret).update(body).digest('hex');
return crypto.timingSafeEqual(
Buffer.from(expected),
Buffer.from(headerValue)
);
}

Schema del payload​

{
"incidentId": "clx...",
"eventType": "incident.created",
"title": "API latency spike",
"description": "p99 latency above 2 s for 5 minutes",
"status": "OPEN",
"source": "MONITOR",
"monitorId": "clx...",
"monitorName": "Production API",
"monitorUrl": "https://api.example.com/health",
"startedAt": "2026-04-08T12:00:00.000Z",
"resolvedAt": null,
"emittedAt": "2026-04-08T12:00:01.234Z",
"workspaceId": "clx...",
"workspaceName": "Acme Corp",
"workspaceSlug": "acme",
"incidentUrl": "https://app.isthisthing.online/en/acme/incidents/clx...",
"workspaceUrl": "https://app.isthisthing.online/en/acme/dashboard"
}

Politica di retry​

AttemptDelay
1st retry30 seconds
2nd retry2 minutes
3rd retry10 minutes

Dopo 3 tentativi falliti l’evento passa in dead letter e non viene più ripetuto.

Sicurezza​

  • Verifica sempre l’header X-isthisthing.online-Signature.
  • Usa solo endpoint HTTPS.
  • Ruota il signing secret se è compromesso.