DocumentacionWebhooks salientes

Webhooks salientes

Eventos, registro de endpoints y reintentos.

Los webhooks notifican a tu servidor cuando ocurren eventos en MailingCore (envio, apertura, rebote, baja, etc.).

Scope requerido en API key: webhooks:manage.

Registrar un endpoint

POST /webhooks/endpoints
Authorization: Bearer mc_live_xxxx
X-Tenant-Id: clxxxxxxxx
{
  "url": "https://tu-app.com/webhooks/mailingcore",
  "events": ["email.sent", "email.bounced", "contact.unsubscribed"],
  "secret": "whsec_opcional_o_generado"
}

La respuesta incluye el secret para verificar firmas HMAC.

Gestion

AccionEndpoint
ListarGET /webhooks/endpoints
Activar/desactivarPATCH /webhooks/endpoints/:id/toggle
Ver entregasGET /webhooks/endpoints/:id/deliveries
EliminarDELETE /webhooks/endpoints/:id

Eventos disponibles

  • email.sent, email.delivered, email.opened, email.clicked
  • email.bounced, email.complained, email.failed
  • contact.unsubscribed

Entrega

Los eventos se encolan en mc:webhook-delivery con reintentos. Cada peticion incluye el header de firma:

X-MailingCore-Signature: t=1719763200,v1=abc123...

Ver Verificar firma HMAC.