Common envelope
All webhook events share a consistent envelope:- id: Unique identifier (UUIDv4) for the specific delivery event. Useful for idempotency.
- event: Event type.
- timestamp: ISO timestamp when the event occurred.
- data: Event-specific fields (documented per event below).
- message_id: The unique identifier for the message.
- subject: The email subject line.
- metadata: Custom metadata attached to the message (if any).
- tag: The tag assigned to categorize the message (e.g., “newsletter”, “order-confirmation”). Will be
nullif no tag was assigned.
Event payloads
message.created
Message accepted for processing. Example payload:message.sent
Message sent to recipient server.message.delivered
Message successfully delivered.message.hard_bounced
Permanent delivery failure (e.g., user does not exist).message.soft_bounced
Temporary delivery failure (e.g., mailbox full, transient error).message.spam_complaint
Recipient reported the message as spam.message.failed
Processing failure within Lettermint.message.suppressed
Message was suppressed due to previous bounce or complaint.message.policy_rejected
Message rejected by policy (spam or content filter). This occurs when a message’s spam score exceeds the configured threshold before delivery.reason: Human-readable rejection reason (e.g., “spam content”, “policy violation”)score: The spam score that triggered the rejectionspam_symbols: Array of spam rule matches with name, score, options, and description
message.unsubscribed
Recipient unsubscribed from the mailing list.message.inbound
Inbound email received on an inbound route. Only available for inbound route types. This event includes the complete parsed email with headers, body (text and HTML), attachments, and spam filtering results.This event is only available for webhooks attached to inbound routes. See the Inbound Mail guide for setup instructions.
route: Route identifier/slugmessage_id: Unique message IDenvelope: SMTP envelope data from the sending serverremote_ip: IP address of the sending mail serverremote_hostname: Reverse DNS (PTR) hostname of the sending serverhelo: HELO/EHLO domain the sender identified asmail_from: Envelope sender address (MAIL FROM command, may differ from the From header)
from: Sender information with optional subaddressto: Array of TO recipients with optional subaddressescc: Array of CC recipients with optional subaddressesrecipient: Primary envelope recipientsubaddress: Parsed subaddress from recipient (e.g., “tag” from “[email protected]”)reply_to: Reply-To address if specifiedsubject: Email subject linedate: Email received timestamp (ISO 8601)body.text: Plain text body contentbody.html: HTML body contenttag: Custom tag from X-LM-Tag or X-Tag headerheaders: All email headers excluding standard ones (From, To, Subject, etc.)attachments: File attachments (see attachment delivery modes below)is_spam: Whether message exceeded spam thresholdspam_score: Calculated spam score from Rspamdspam_symbols: Array of spam rule objects, each containingname,score,options, anddescriptionfields
Attachment delivery modes: By default, attachments include base64-encoded
content. You can configure your inbound route to use URL delivery mode instead, where attachments include a signed url for downloading. URLs are valid for 28 days. See the Inbound Mail guide for configuration.webhook.test
Special event that can be triggered from the Dashboard for connectivity testing.Next Steps
- Signed Webhooks: Verify the authenticity of webhook payloads.
- Quick introduction: Learn about all the events Lettermint sends.