Saltar al contenido principal

Webhook

Cómo funciona​

Cuando se dispara un evento de Incident, isthisthing.online envía una petición POST con cuerpo JSON a la URL que configures. Si indicas un signing secret, cada petición incluye una cabecera de firma HMAC-SHA256 para que puedas comprobar la autenticidad.

1. Preparar tu endpoint​

Tu servidor necesita un endpoint HTTP que:

  • Acepte POST con Content-Type: application/json.
  • Responda 2xx en un máximo de 10 segundos (si no, el envío se reintenta).

2. Añadir la integración​

  1. Ve a Integrations → New Integration.
  2. Selecciona Webhook.
  3. Rellena los campos:
CampoValor
Namep. ej. Production Webhook
Webhook URLTu endpoint, p. ej. https://api.example.com/hooks/incidents
Signing SecretOpcional. Si lo defines, cada petición llevará X-isthisthing.online-Signature.
  1. Activa los eventos disparadores y haz clic en Save.

3. Verificar la firma (recomendado)​

Si definiste un signing secret, valida cada petición entrante:

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

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

Política de reintentos​

IntentoRetraso
1.er reintento30 segundos
2.º reintento2 minutos
3.er reintento10 minutos

Tras 3 intentos fallidos el evento pasa a dead letter y ya no se reintenta.

Seguridad​

  • Verifica siempre la cabecera X-isthisthing.online-Signature.
  • Usa solo endpoints HTTPS.
  • Rota el signing secret si se ve comprometido.