email.unsubscribed
The recipient opted out, by link, one-click header, or reply.
The recipient opted out.
Payload
email_idstring
The message they opted out from.
stringdomain_idstring | null
The domain that message was sent from; null when it went through a mailbox, or is gone.
string | nullmailbox_idstring | null
The mailbox that message was sent through; null when it went from a domain, or is gone.
string | nulladdressstring
Who opted out.
stringkeystring
The suppression list. `*` is the whole workspace's, or the whole space's when the send was from one.
stringscope"all" | "optional"
Whether they blocked everything or only optional mail.
"all" | "optional"source"link" | "one_click" | "reply"
How: the unsubscribe link, the mail client's one-click header, or a reply that read as an opt-out.
"link" | "one_click" | "reply"Handling it
if (event.type === "email.unsubscribed") {
await recordOptOut(event.data.address, event.data.key, event.data.scope)
}
Mirror this into your own preference UI so a customer who unsubscribed by email doesn’t see themselves still subscribed in your app.
scope: "optional" means they blocked marketing but still want the receipts and password resets — don’t collapse it to a single “unsubscribed” boolean.