Ga naar hoofdinhoud

Webhook

Hoe het werkt​

Wanneer een Incident-gebeurtenis wordt getriggerd, stuurt isthisthing.online een POST-verzoek met een JSON-body naar de URL die je configureert. Als je een signing secret opgeeft, bevat elk verzoek een HMAC-SHA256-handtekening-header zodat je de echtheid kunt controleren.

1. Bereid je endpoint voor​

Je server heeft een HTTP-endpoint nodig dat:

  • POST accepteert met Content-Type: application/json.
  • Binnen 10 seconden 2xx teruggeeft (anders wordt de levering opnieuw geprobeerd).

2. Voeg de integratie toe​

  1. Ga naar Integrations → New Integration.
  2. Selecteer Webhook.
  3. Vul de velden in:
FieldValue
NameBijv. Production Webhook
Webhook URLJe endpoint, bijv. https://api.example.com/hooks/incidents
Signing SecretOptioneel. Indien ingesteld, bevat elk verzoek X-isthisthing.online-Signature.
  1. Schakel triggergebeurtenissen in en klik op Save.

3. Controleer de handtekening (aanbevolen)​

Als je een signing secret hebt ingesteld, valideer dan elk binnenkomend verzoek:

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)
);
}

Payload-schema​

{
"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"
}

Herhaalbeleid​

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

Na 3 mislukte pogingen gaat de gebeurtenis naar dead letter en wordt niet opnieuw geprobeerd.

Beveiliging​

  • Controleer altijd de header X-isthisthing.online-Signature.
  • Gebruik alleen HTTPS-endpoints.
  • Roteer het signing secret als het is gecompromitteerd.