Event
Unique event identifier.
Every event type the platform emits. email.* events carry an email_id, except email.received, which fires for inbound mail and carries an inbound_id. email.return_path_reply fires when a person replies to the bounce (Return-Path) address of an email rather than to its From or Reply-To address; it carries the email_id of the email being answered and is never also delivered as email.received. domain.* and tracking_domain.* events carry a domain_id. domain.verified and domain.verification_failed fire only when a domain's status changes; domain.records_drifted fires once when a required record of a verified domain stops resolving, while the domain is still sending. campaign.* events carry a campaign_id, contact.* events a contact_id, and suppression.* events the suppressed address; these three families are workspace-wide and carry neither an email_id nor a domain_id. webhook.test is delivered by the test-endpoint operation and cannot be subscribed to. Treat this enum as open: clients must tolerate a value added by a later release rather than failing to decode the surrounding object.
Possible values: [email.sent, email.delivered, email.bounced, email.opened, email.clicked, email.complained, email.failed, email.delayed, email.cancelled, email.received, email.return_path_reply, domain.verified, domain.verification_failed, domain.records_drifted, tracking_domain.verified, tracking_domain.verification_failed, campaign.started, campaign.paused, campaign.resumed, campaign.completed, campaign.cancelled, campaign.auto_paused, contact.status_changed, contact.import_completed, suppression.created, suppression.removed, webhook.test]
ID of the email this event belongs to. Present for every email.* event and absent for email.received and webhook.test.
ID of the inbound message. Present only on email.received.
When the event occurred.
data objectrequired
Event-specific data. Every email event carries to, from and subject. The rest varies by event type:
- sent: nothing more
- delivered: attempt, mx_hostname, smtp_response
- bounced: fault, reason, permanent, source, provider, smtp_code, enhanced_status_code, response. fault is recipient, sender or unknown (see BounceFault), reason is one of BounceReason, source is smtp, ndr or suppression_list (see BounceSource), provider is one of MailboxProvider. provider, smtp_code, enhanced_status_code and response are present when known. Failures on the Epostix side never produce a bounced event.
- failed/delayed: reason (a readable description), attempt, mx_hostname, next_attempt_at (delayed only), and bounce, an object with the bounced fields above, present only when the receiving system gave a verdict
- failed also carries failure, an object with reason (see EmailFailureReason) and fault (see EmailFailureFault). It is absent on emails that failed before failures were recorded.
- opened: ip_address, user_agent, open_source, device_type, os, os_version, client, client_version, is_bot, is_machine_open
- clicked: url, ip_address, user_agent, the opened fields and is_machine_click
- complained: feedback_type, provider (see MailboxProvider), reported_at
Test mode events also carry simulated and outcome.
email.bounced and email.failed can arrive after email.delivered: a receiving server may accept a message and report later that it could not be delivered.
Event-specific data. Every email event carries to, from and subject. The rest varies by event type:
- sent: nothing more
- delivered: attempt, mx_hostname, smtp_response
- bounced: fault, reason, permanent, source, provider, smtp_code, enhanced_status_code, response. fault is recipient, sender or unknown (see BounceFault), reason is one of BounceReason, source is smtp, ndr or suppression_list (see BounceSource), provider is one of MailboxProvider. provider, smtp_code, enhanced_status_code and response are present when known. Failures on the Epostix side never produce a bounced event.
- failed/delayed: reason (a readable description), attempt, mx_hostname, next_attempt_at (delayed only), and bounce, an object with the bounced fields above, present only when the receiving system gave a verdict
- failed also carries failure, an object with reason (see EmailFailureReason) and fault (see EmailFailureFault). It is absent on emails that failed before failures were recorded.
- opened: ip_address, user_agent, open_source, device_type, os, os_version, client, client_version, is_bot, is_machine_open
- clicked: url, ip_address, user_agent, the opened fields and is_machine_click
- complained: feedback_type, provider (see MailboxProvider), reported_at
Test mode events also carry simulated and outcome.
email.bounced and email.failed can arrive after email.delivered: a receiving server may accept a message and report later that it could not be delivered.
{
"id": "string",
"type": "email.sent",
"email_id": "string",
"inbound_id": "string",
"created_at": "2024-07-29T15:51:28.071Z",
"data": {}
}