Email events and suppressions
What each email webhook event carries, how to match it to your send, and which addresses stop getting mail.
The payload
Every delivery is one JSON event, signed as Verify webhook signatures describes:
{
"id": "event_…",
"type": "email.bounced",
"createdAt": "2026-12-05T09:14:03.123+00:00",
"workspaceId": "ws_…",
"region": "us-east-2",
"data": {
"emailId": "email_…",
"providerId": "0100019…",
"simulated": false,
"bounceType": "Permanent",
"bounceSubType": "General",
"diagnosticCode": "smtp; 550 5.1.1 <address>: user unknown"
}
}data.emailIdis theidthat sendEmail or sendEmailBatch returned. Match events to your sends with it.idis the event’s own ID, not the email’s.- No event carries a recipient address. Read the email with getEmail (
to,cc,bcc) to see who it went to. On an email with several recipients, an event doesn’t say which of them it is about, so send one recipient per email when you need to know. data.providerIdis Amazon SES’s message ID, there once SES accepted the email.data.simulatedis true only on an installation that simulates SES instead of sending; mail to Amazon SES’s mailbox simulator (@simulator.amazonses.com) goes through SES for real and has it false.data.senderIdis there too when the workspace sends through child senders.
Fields by event
Besides emailId, simulated and providerId, data has:
email.sent(SES accepted the email): nothing else.email.delivered(the receiving server accepted it): nothing else.email.bounced:bounceType:Permanent(a hard bounce),Transient(a soft bounce),UndeterminedorUnknown.bounceSubType, such asGeneral,NoEmail,Suppressed,MailboxFullorEmailValidationSuppressed.diagnosticCode: the receiving server’s reply, when it gave one.suppressionReason:email_validationwhen SES’s address validation dropped the recipient before sending.email.complained:complaintFeedbackType(such asabuse), when the mailbox provider gave one. A report markednot-spamsends no event.email.delivery_delayed:delayType(such asMailboxFullorTransientCommunicationFailure),expirationTime(when SES stops retrying) anddiagnosticCode.email.rejected:codewhen the send failed before SES accepted it (then withoutproviderId).statustoo when Nightmail stopped the email itself (rejected, such as a content-screen refusal or a scheduled send that couldn’t be released;suppressed, withsuppressionReason; orcanceled), or when the SES call’s outcome was lost (acceptance_unknown: don’t resend, SES may have accepted it). A rejection SES reports after accepting the email carriesproviderIdand neithercodenorstatus.email.opened,email.clicked:isBotEvent, andlinkfor a click. Only with tracking on.
diagnosticCode is written by the receiving server: read it as untrusted text. In a webhook it is cut at 160 characters, with the addresses and IP addresses in it replaced by <address> and <ip>; listEmailEvents has it as SES reported it, up to 500 characters. A bounce SES made itself (its suppression list, its address validation) has none.
New webhooks get email.sent, email.delivered, email.bounced, email.complained, email.rejected, email.rendering_failed and email.delivery_delayed. Choose others, such as email.opened, email.clicked and contact.subscription_changed, when you create the webhook with createWebhook or in Settings → Webhooks.
Suppressions
Nightmail stops sending to an address for the whole workspace after:
- a hard bounce (
bounceTypePermanent): reasonhard_bounce; - a complaint, unless it was marked
not-spam: reasoncomplaint; - SES’s address validation dropping it: reason
email_validation.
Soft bounces and delays don’t suppress.
A suppression applies to every email, transactional ones too (password resets, sign-in codes), and to marketing, campaigns and SMTP. There is no field that sends to a suppressed address anyway. A send that names one is refused with 422 RECIPIENT_INELIGIBLE, and nothing in it is sent: error.details lists each address with its reason. An address suppressed after its email was queued gets that email’s email.rejected event with status suppressed. The one exception is a transactional reply to someone who wrote to you in that conversation, when their address was suppressed only by address validation and they haven’t unsubscribed.
A suppressed address is a contact with suppressed true and its suppressionReason: list them with listContacts and suppressed=true. There is no API to lift a suppression. Hosted: once the person’s mailbox works again, email support@nightmail.dev to lift a hard-bounce or validation suppression. A complaint suppression is never lifted.