TrackedEmail interface represents a tracked email record with aggregated open count statistics. This is the primary model for email tracking data stored in the database.
Fields
Unique identifier for the tracked email. This is the primary key and matches the
email_id from the TrackingPayload.Unique identifier for the user or account that owns this tracked email. Used for data isolation and multi-tenant filtering.
Email address of the recipient who received this email.
Email address of the sender. This field may be
null if not provided when creating the tracking record.ISO 8601 timestamp indicating when the email was sent. Format:
YYYY-MM-DDTHH:mm:ss.sssZNumber of unique, counted opens for this email. This count excludes:
- Duplicate opens (detected by IP address, user agent, and timing)
- Sender-suppressed opens (opens prevented by
mark-suppress-next)
ISO 8601 timestamp indicating when this tracking record was created in the database. Automatically set to the current time when the record is inserted.
Returned by
GET /dashboard/api/emails- Returns an array ofTrackedEmailobjects with additional computed fields:unique_open_count- Same asopen_counttotal_open_events- Total counted opens (non-duplicate, non-suppressed)raw_open_events- Total raw opens including duplicates and suppressedlast_opened_at- Timestamp of the most recent counted openopened- Boolean indicating if the email has been opened
Database schema
Stored in thetracked_emails table with the following SQLite schema:
Example response
Related models
- TrackingPayload - Input data used to create tracked emails
- OpenEvent - Individual open events associated with tracked emails