Email Message Event
An Email Message Event tracks delivery status changes for an email message, providing visibility into the email lifecycle.
Schema
interface EmailMessageEvent {
id: string; // "eme_..." - Unique identifier
account_id: string; // Owning account
email_message_id: string; // Associated message
event_type: string; // Event type
meta: Record<string, any> | null; // Additional data
occurred_at: string; // ISO 8601 timestamp
}
Properties
| Property | Type | Description |
|---|---|---|
id | string | KSUID with eme_ prefix |
account_id | string | Account context |
email_message_id | string | Message this event relates to |
event_type | string | Type of event |
meta | object? | Event-specific metadata |
occurred_at | string | When event occurred |
Event Types
Event types are provider-specific. Common values include:
| Type | Description |
|---|---|
queued | Message accepted for delivery |
sent | Handed off to receiving MTA |
delivered | Confirmed delivery to inbox |
bounced | Delivery permanently failed |
soft_bounced | Temporary delivery failure |
complained | Recipient marked as spam |
opened | Recipient opened email |
clicked | Recipient clicked link |
Event Flow
Example
{
"id": "eme_2kHfPZcN9xW4mE8RtY7vB",
"account_id": "acc_1jGePYbM8wV3lD7QsX6uA",
"email_message_id": "eml_3lIfQZdO0yX5nF9SuY8wC",
"event_type": "delivered",
"meta": {
"recipient": "user@example.com",
"smtp_response": "250 OK"
},
"occurred_at": "2025-01-15T10:30:45Z"
}
Related
- Email Message - Message records
- Email - Email infrastructure