Skip to main content
The 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

string
required
Unique identifier for the tracked email. This is the primary key and matches the email_id from the TrackingPayload.
string
required
Unique identifier for the user or account that owns this tracked email. Used for data isolation and multi-tenant filtering.
string
required
Email address of the recipient who received this email.
string | null
Email address of the sender. This field may be null if not provided when creating the tracking record.
string
required
ISO 8601 timestamp indicating when the email was sent. Format: YYYY-MM-DDTHH:mm:ss.sssZ
number
required
Number 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)
This is the primary metric for tracking genuine recipient engagement.
string
required
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 of TrackedEmail objects with additional computed fields:
    • unique_open_count - Same as open_count
    • total_open_events - Total counted opens (non-duplicate, non-suppressed)
    • raw_open_events - Total raw opens including duplicates and suppressed
    • last_opened_at - Timestamp of the most recent counted open
    • opened - Boolean indicating if the email has been opened

Database schema

Stored in the tracked_emails table with the following SQLite schema:

Example response

  • TrackingPayload - Input data used to create tracked emails
  • OpenEvent - Individual open events associated with tracked emails