Listar endpoints de webhook
GET/v1/webhooks
Scope necesario: read o full. Una clave full incluye send y read.
secretMasked).
Vemudo-Signature: t=<unix s>,v1=<hex>. Durante las 24 h siguientes a rotar el secreto lleva dos v1= (el nuevo primero). La firma es HMAC-SHA256(secret, t + "." + rawBody) en hex sobre el cuerpo crudo. Rechaza las peticiones con t de hace más de 5 min y deduplica por Vemudo-Event-Id: una entrega puede repetirse (al menos una vez) y no hay garantía de orden entre eventos. Cabeceras: Content-Type, User-Agent: Vemudo-Webhooks/1.0, Vemudo-Event-Id, Vemudo-Delivery-Attempt y Vemudo-Signature. Responde 2xx en menos de 10 s; no se siguen redirecciones; si falla se reintenta durante 72 h (1 min, 5 min, 30 min, 2 h, 5 h, 10 h, 12 h...).
const crypto = require('node:crypto');
function verify(rawBody, header, secret) {
const parts = header.split(',');
const t = Number(parts.find((p) => p.startsWith('t=')).slice(2));
if (Math.abs(Date.now() / 1000 - t) > 300) return false;
const expected = crypto.createHmac('sha256', secret).update(`${t}.${rawBody}`).digest('hex');
return parts
.filter((p) => p.startsWith('v1='))
.some((p) => {
const got = p.slice(3);
return (
got.length === expected.length &&
crypto.timingSafeEqual(Buffer.from(got), Buffer.from(expected))
);
});
}Respuestas
200{ data: [WebhookEndpoint] }.Campo Descripción data[]object[] · obligatoriodata[].idstring · obligatoriodata[].urlstring · obligatoriodata[].descriptionstring | null · obligatoriodata[].environmentstring · obligatoriovalores: test | live data[].eventTypesstring[] · obligatoriovalores: email.sent | email.delivered | email.deferred | email.bounced | email.complained | email.suppressed | email.rejected | email.failed | email.cancelled data[].statusstring · obligatoriovalores: active | disabled data[].disabledReasonstring | null · obligatoriodata[].disabledAtstring | null · obligatoriodata[].failingSincestring | null · obligatoriodata[].failureCountnumber · obligatoriodata[].lastSuccessAtstring | null · obligatoriodata[].lastFailureAtstring | null · obligatoriodata[].lastStatusCodenumber | null · obligatoriodata[].secretMaskedstring | null · obligatorionull para el rol viewer. ej.: whsec_••••hJ0fdata[].secretPreviousExpiresAtstring | null · obligatoriodata[].createdAtstring · obligatorio
Ejemplo
curl https://api.vemudo.com/v1/webhooks \
-H "Authorization: Bearer $VEMUDO_API_KEY"