Novo guia: como aquecer um IP dedicado sem prejudicar sua reputação. Ler agora →
MigoSMTP
Webhooks e eventos

Saiba no instante em que algo acontece

Receba eventos assinados para cada entrega, rejeição, abertura, clique e reclamação, e reenvie o que você perdeu.

A IA resume os fluxos de eventos e sinaliza padrões incomuns de rejeição assim que aparecem.

Adicionar endpoint
URL
https://example.com/hook
Segredo
••••••••••
Salvar
Endpoint adicionado
Somente HTTPS
Verificado
Adicione um endpoint HTTPSInforme uma URL que receba requisições POST. Confirmamos que ela responde antes de enviar qualquer evento real.
Eventos assinados
deliveredMensagem aceita
bouncedDefinitivas e temporárias
complainedDenúncias de spam
clickedAtividade de links
Por evento
Por fluxo
Escolha os eventos que você querAssine apenas o que gera ação: delivered, bounced, complained, opened ou clicked.
Eventos de entrega
Eventos assinados
/hooks/mail
200 OK
Análises
200 OK
Sincronização com CRM
200 OK
Tempo real
Vários endpoints
Os eventos são distribuídos em tempo realCada evento é enviado a todos os endpoints inscritos, para que análises, CRM e alertas fiquem sempre sincronizados.
Payload
{ "event": "delivered" }
Cabeçalho de assinatura
sha256=9f2c41…
Segredo compartilhado
Com carimbo de data e hora
Comparação em tempo constante
Rejeite tudo que falhar na verificação
HMAC-SHA256
À prova de replay
Verifique cada requisiçãoCada requisição traz uma assinatura HMAC criada com o seu segredo, para que você possa provar que ela veio de nós.
Saúde do endpoint · /hooks/mail
IA
há 1h
Agora
Erros em altaA maioria das falhas é 502 após o seu último deploy.
Sugestão: enfileirar os eventos e reenviar quando /hooks/mail se recuperar
Agrupa as falhas
Pausar ou reenviar
A IA detecta cedo um endpoint com falhasEm vez de esperar as novas tentativas se esgotarem, a IA percebe a taxa de erros do seu endpoint subindo e agrupa as falhas por causa. Ela propõe uma correção e pode pausar o evento que gera ruído.
Handler de webhook
Node
Python
PHP
Go
PHP
app.post("/hook", (req, res) => {
verify(req, SECRET)
res.sendStatus(200)
})
200 OK
Confirme rápido
Idempotente
Um handler em poucas linhasVerifique a assinatura, confirme o recebimento rápido e processe depois. É tudo o que um consumidor confiável precisa.
Endpoint
Eventos
Distribuição
Assinatura
Triagem por IA
Handler
Relay SMTPAPI RESTWebhooksIPs dedicadosAssinatura DKIMInbound parseTemplatesAnálisesListas de supressãoMonitoramento de reputaçãoValidação de e-mailFunções de equipe e log de auditoriaRelay SMTPAPI RESTWebhooksIPs dedicadosAssinatura DKIMInbound parseTemplatesAnálisesListas de supressãoMonitoramento de reputaçãoValidação de e-mailFunções de equipe e log de auditoria
Recursos

Entrega de eventos confiável

Todos os resultados

Entregue, adiado, rejeitado, aberto, clicado, reclamado e cancelado.

Receive an event for every outcome: delivered, deferred, bounced, opened, clicked, complained and unsubscribed. Your systems can update records, notify teams or trigger workflows the moment something happens.

  • Full set of delivery outcomes
  • Sent as events happen
  • JSON payloads

Payloads assinados

Verifique se cada requisição veio da MigoSMTP.

Every request is signed so your endpoint can verify it came from MigoSMTP. Reject anything unsigned and you are protected against forged events.

  • Signature on every request
  • Simple verification
  • Reject unsigned requests

Novas tentativas com backoff

As entregas que falham são repetidas automaticamente.

If your endpoint is down or slow, failed deliveries are retried with backoff rather than dropped. Brief outages do not mean lost events.

  • Automatic retries
  • Backoff between attempts
  • Visible failure history

Replay

Reenvie eventos do log após uma indisponibilidade.

After a longer outage, replay events from the log so your systems catch up. You do not lose the history and you do not need to write a recovery script.

  • Re-send from the log
  • Catch up after downtime
  • Rebuild state safely

Filtros de eventos

Assine apenas os eventos de que precisa.

Subscribe only to the events you need so your endpoint is not flooded with noise. Filters keep processing cheap and handlers simple.

  • Seleção de eventos por endpoint
  • Fewer requests to handle
  • Change filters any time

Logs de entrega

Veja requisição, resposta e status de cada tentativa.

See the request, response and status of every delivery attempt. When something breaks you can tell whether the problem is on our side or yours without guessing.

  • Request and response recorded
  • Status per attempt
  • Faster debugging

Como funciona

O evento ocorreUma mensagem é entregue, adiada, rejeitada, aberta, clicada ou denunciada como spam.
A MigoSMTP assina e enviaO evento é empacotado em um payload JSON assinado e enviado ao seu endpoint HTTPS.
Seu endpoint verificaSeu handler confere a assinatura e confirma com uma resposta 2xx.
Nova tentativa e replayAs entregas que falham são repetidas, e você pode reenviar eventos do log após uma indisponibilidade.
ETAPA 1

Adicione um endpoint

Informe sua URL HTTPS e escolha os eventos.

ETAPA 2

Verifique a assinatura

Confira o cabeçalho de assinatura em cada requisição.

ETAPA 3

Processe e confirme

Retorne uma resposta 2xx para confirmar o recebimento.

Veja em ação

Webhooks in action

Each stage plays automatically. Select one to pause on it. Illustrative interface: all figures and addresses shown are sample data.

app.migosmtp.com/webhooksDados de exemplo
URL
Somente HTTPS
Segredo
Set
Status
Verificado
Sample activityEndpoint
addendpoint saved
testping sent
response200 received
verifyconfirmed
Eventos
6 of 8
Filtros
On
Fluxos
Todos
Sample activityAssinar
eventdelivered
eventbounced
eventcomplained
filteropens excluded
Assinado
Sim
Novas tentativas
Backoff
Logged
Every attempt
Sample activityEntregar
postevent sent
signatureverified
fail503 from endpoint
retryscheduled
Log
Pesquisável
Replay
Available
Gap
Encerrado
Sample activityReplay
outageendpoint down
selectevents from log
replayre-sent
statecaught up
Operations

Keep your systems in step with your email

Update your database, trigger workflows and alert your team without polling.

  • Per-endpoint event selection
  • Automatic retries and manual replay
  • Full request and response logs
  • Secrets you can rotate
At a glance01 / 04
TransportHTTPS POST
FormatJSON
SecuritySignature header
RetriesAutomatic, with backoff
Overview

What is webhooks and events?

Email webhooks are HTTP callbacks that notify your application when something happens to a message you sent. MigoSMTP posts a signed JSON payload to your HTTPS endpoint for events such as delivered, deferred, bounced, opened, clicked, complained and unsubscribed. Your system reacts immediately instead of repeatedly asking the API for status. Payloads carry the message ID, recipient, event type, timestamp and, for failures, the reason returned by the receiving server. These fields let you match events to your own records without extra lookups or guesswork.

You register an endpoint, choose which events it should receive, and verify the signature header on each request. Return a 2xx response to confirm receipt. If your endpoint fails, deliveries are retried with backoff, and you can replay events from the log after an outage. Request and response details for every attempt are kept so you can debug quickly. Secrets can be rotated, and event filters keep each endpoint focused. Failed attempts show the request, the response and the time, which makes debugging a handler quick and evidence based.

Event data is how a sending system learns. Updating suppression, pausing a campaign on a complaint spike or alerting support to a bounced receipt all depend on timely events. Our AI layer can summarise high-volume streams and flag unusual patterns, so your team notices a problem in minutes rather than after a customer complains. Replay and logs mean a gap in your own systems does not become a gap in your data.

Use cases

Common webhooks and events use cases

Keeping your database in sync

Mark orders as notified when delivered and flag contacts when a hard bounce arrives. Webhooks remove the need for polling jobs and keep application state accurate.

Automatic suppression handling

On bounce or complaint events, add the address to your own do-not-mail table straight away, so other systems that email the same person stop as well.

Alerting support teams

Send a Slack or ticket alert when a password reset bounces. Support can then contact the customer by another channel before they give up. It saves hours of manual work.

Recovering after downtime

If your endpoint was offline during a deployment, replay the missed events from the log and bring your records back to the correct state. Nothing is lost in the meantime.

Update order and ticket status

Mark an order notified or a support ticket answered as soon as the delivery event arrives.

Feed your data warehouse

Stream events into your own analytics so email results sit next to product and revenue data.

Choosing a method

Webhooks or polling the API?

Both give you event data. They suit different situations.

WebhooksPolling the API
How it worksWe push events to your endpointYour code asks on a schedule
SpeedNear real timeDepends on your polling interval
LoadOnly when something happensConstant requests, mostly empty
ReliabilityRetries and replay cover outagesYou must track what you have read
Best forLive status and automationBack-fill and scheduled reports

Many teams use webhooks for live updates and the API to back-fill anything they missed.

AI features

AI-assisted webhooks and events

Copilot

Event stream summaries

A copilot condenses thousands of events into a short digest, such as which provider is deferring and which campaign drives complaints, linking to the messages behind each point.

Predictive

Anomaly detection on events

Models learn normal bounce, complaint and deferral rates and alert you when a stream departs from them. You set who is notified and whether any automation runs.

Assist

Payload debugging assistant

Paste a failed delivery log and the assistant explains the likely cause, such as a signature mismatch or timeout, and suggests a fix to test. You make the change.

Agent-ready

Agent-ready event access

Through an MCP server, AI agents can read event history and delivery logs with read-only scopes. Write actions need explicit scopes and, if you wish, human approval.

AI features are assistive: they summarise and alert, and any automated action is something your team configures and approves.

Best practices

Best practices for webhooks and events

Verify the signature every time

Reject requests whose signature header does not match. Rotate the secret periodically and straight away if it may have been exposed.

Respond quickly, work asynchronously

Acknowledge with a 2xx as soon as the payload is safely stored, then process it from a queue. Slow handlers cause timeouts and duplicate retries.

Design for duplicates and disorder

Deliveries can repeat and arrive out of order. Use the message ID and timestamp to deduplicate and to ignore stale state changes.

Subscribe only to what you use

Filter events per endpoint. Fewer irrelevant requests means less load on your servers and simpler monitoring. Keep integrations lean and quick to debug.

Monitor your own endpoint

Alert on repeated failures in the delivery log. A silent outage means silent data drift until someone replays the gap.

Acknowledge fast, process later

Return a 2xx response quickly and move heavy work to a queue, so slow handlers do not trigger retries.

FAQs

Webhooks and events: frequently asked questions

Need help wiring up an endpoint? Our team can review it with you before launch.

What is an email webhook?

An email webhook is an HTTP request your email provider sends to your server when an event occurs, such as a message being delivered or bouncing. It lets your application react in real time without checking the API repeatedly. This replaces polling jobs and keeps your records current.

How do I verify a webhook signature?

Each request includes a signature header generated with your endpoint's secret. Recompute the signature from the raw request body on your side and compare. Reject the request if they differ. The documentation has code samples.

What events can I receive?

Delivered, deferred, bounced, opened, clicked, complained and unsubscribed. You can subscribe each endpoint to a subset, so one service gets bounces and another gets engagement events. Pick only those your systems act on, such as bounces for suppression and clicks for analytics, to keep traffic to your endpoint small and relevant.

What happens if my endpoint is down?

Failed deliveries are retried with backoff, and you can replay events from the log once you recover. Each attempt, with request and response, is recorded so you can see what failed. Check that your handler returns quickly and logs failures.

Are webhook events delivered in order?

Do not rely on strict ordering. Build handlers that tolerate duplicates and out-of-order events by using the message ID and timestamp. Event ordering can differ across providers and retries, and a single message may generate several events.

What are bot opens?

Some mail systems fetch images automatically, which registers as an open even if no person read the message. We separate those from human opens where we can, but open tracking remains an estimate. Treat opens as a rough indicator. Count clicks and replies as stronger signals of engagement.

How do I test a webhook endpoint?

Send a sample event from the dashboard to your URL and check that your handler verifies the signature and returns a 2xx. Review the delivery log to see the request and your response. Use a staging endpoint with a test secret before production. Run it before pointing production at the endpoint.

How does AI work with webhooks and events?

AI can summarise event streams, flag unusual bounce or complaint patterns and help debug failed deliveries. It recommends actions but does not change your configuration unless you set up a rule. Review recent logs before connecting new endpoints.

How do I test an endpoint?

Send a sample event from the dashboard.

Is ordering guaranteed?

Build handlers that tolerate duplicates and out-of-order events, using the message ID and timestamp to deduplicate.

From the blog

Latest analysis, trends and market data

Comece a enviar em minutos.

Crie uma conta, adicione seu domínio e envie seu primeiro e-mail.

Começar grátis Falar com vendas