Lumail.ioLumail.io
DocsBlogChangelog

Getting Started

  • Introduction
  • Tutorials
  • API Reference
  • Integrations
  • Features
  • Workflows

Tutorials

  • Create an API Token
  • Build a V0 Capture Page
  • Dynamic Promo Codes with Webhooks

API Reference

  • API Tokens
  • Rate Limits
  • POSTSend Transactional Email
  • POSTEmail Verification API
  • POSTCreate Subscriber
  • GETGet Subscriber
  • PATCHUpdate Subscriber
  • DELETEDelete Subscriber
  • POSTAdd Tags to Subscriber
  • DELETERemove Tags from Subscriber
  • POSTTrack Event
  • GETGet Subscriber Events
  • GETGet All Tags
  • POSTCreate a Tag
  • Send Email in HTML
  • Send Email in Markdown
  • Send Email in Tiptap

Integrations

  • ClickFunnels Integration
  • SystemIO Integration

Features

  • Variables
  • Subscriber Events
  • Revenue Tracking
  • Email Deliverability Score
  • Email Engagement Score
  • Content Deliverability Checker

Workflows

  • Wait Step
  • Email Step
  • Action Step
  • Webhook Step

domains

  • Email Domains
  • Web Domains

Get Subscriber Events

Retrieve the event history for a specific subscriber

https://lumail.io/api/v1/subscribers/{subscriber}/events

Retrieves the event history for a specific subscriber. This endpoint supports cursor-based pagination, filtering by event type, and date range filtering.

Query Parameters

ParameterTypeDefaultDescription
cursorstring-Base64-encoded cursor for pagination
takenumber20Number of events to return (1-100)
eventTypesstring-JSON array of event types to filter (e.g. ["EMAIL_OPENED"])
orderstring"desc"Sort order by createdAt ("asc" or "desc")
startDatestring-ISO 8601 datetime to filter events after this date
endDatestring-ISO 8601 datetime to filter events before this date
searchstring-Search query to filter events by data content or subscriber

Response

  • Success (200 OK) - Returns the events array with pagination cursor.
  • Error (404 Not Found) - Returned if the subscriber does not exist.

Response Fields

FieldTypeDescription
eventsarrayArray of event objects
events[].idstringUnique identifier for the event
events[].eventTypestringType of the event (see supported types below)
events[].dataobjectEvent-specific data payload
events[].subscriberIdstringID of the subscriber
events[].createdAtstringISO timestamp when the event occurred
events[].subscriberobjectSubscriber details
events[].subscriber.idstringSubscriber ID
events[].subscriber.emailstringSubscriber email
events[].subscriber.namestring/nullSubscriber name
nextCursorstring/nullCursor for the next page (null if no more pages)

Supported Event Types

Email Engagement Events

Event TypeDescriptionData Fields
EMAIL_SENTEmail was sent to subscriberemailId, campaignId, subject, workflow?
EMAIL_RECEIVEDEmail was successfully deliveredemailId, campaignId, subject, receivedAt?
EMAIL_OPENEDSubscriber opened an emailemailId, campaignId?, subject
EMAIL_CLICKEDSubscriber clicked a link in an emailemailId, campaignId?, subject, targetUrl, linkId?
EMAIL_BOUNCEDEmail could not be deliveredemailId, campaignId?, subject, reason, bounceType
EMAIL_COMPLAINEDSubscriber marked email as spamemailId, campaignId?, subject
EMAIL_DELIVERY_DELAYEDEmail delivery was temporarily delayedemailId, campaignId?, subject, workflow?

Subscription Events

Event TypeDescriptionData Fields
SUBSCRIBEDSubscriber joined your listtags? (array of tag objects)
UNSUBSCRIBEDSubscriber opted outreason?, campaignId?, campaignName?, status?

Tag Events

Event TypeDescriptionData Fields
TAG_ADDEDTag was applied to subscribertagId, tagName, reason?
TAG_REMOVEDTag was removed from subscribertagId, tagName, reason?

Workflow Events

Event TypeDescriptionData Fields
WORKFLOW_STARTEDSubscriber entered an automationworkflowId, workflowName
WORKFLOW_COMPLETEDSubscriber completed all workflow stepsworkflowId, workflowName
WORKFLOW_CANCELEDSubscriber was removed from workflowworkflowId, workflowName, reason?
WEBHOOK_EXECUTEDWebhook step was triggeredworkflowId, workflowName, stepId, webhookUrl, status, success, errorMessage?

Revenue Events

Event TypeDescriptionData Fields
SUBSCRIBER_PAYMENTSubscriber made a paymentamount, product
SUBSCRIBER_REFUNDSubscriber received refundamount, product

Other Events

Event TypeDescriptionData Fields
FIELD_UPDATEDCustom field value was updatedfieldId, fieldName, oldValue?, newValue

Usage Examples

Get recent activity

Retrieve the 20 most recent events for a subscriber:

curl "https://lumail.io/api/v1/subscribers/sub_123/events" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Filter by email engagement

Get only email open and click events:

curl 'https://lumail.io/api/v1/subscribers/sub_123/events?eventTypes=["EMAIL_OPENED","EMAIL_CLICKED"]' \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Date range filtering

Get events from the last 7 days:

curl "https://lumail.io/api/v1/subscribers/sub_123/events?startDate=2025-01-01T00:00:00Z&endDate=2025-01-07T23:59:59Z" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Search events

Search for events containing specific text:

curl "https://lumail.io/api/v1/subscribers/sub_123/events?search=newsletter" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Pagination

Fetch all events using cursor pagination:

async function getAllEvents(subscriberId) {
  const events = [];
  let cursor = null;

  do {
    const params = new URLSearchParams({ take: "100" });
    if (cursor) params.set("cursor", cursor);

    const response = await fetch(
      `https://lumail.io/api/v1/subscribers/${subscriberId}/events?${params}`,
      { headers: { Authorization: "Bearer YOUR_API_TOKEN" } },
    );
    const data = await response.json();

    events.push(...data.events);
    cursor = data.nextCursor;
  } while (cursor);

  return events;
}

Related Documentation

  • Track Events API - Record new events for subscribers
  • Subscriber Events Reference - Complete guide to all event types and their data fields
  • Revenue Tracking - Analyze payment and refund events
  • Workflows - View workflow execution history in events
Track EventGet All Tags

Method

GET

Endpoint

/api/v1/subscribers/{subscriber}/events

Request Examples

curl -X GET "https://lumail.io/api/v1/subscribers/sub_TTYPR5tWDh/events?take=20&order=desc" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

# With event type filters (JSON array)
curl -X GET 'https://lumail.io/api/v1/subscribers/subscriber@example.com/events?eventTypes=["EMAIL_OPENED","EMAIL_CLICKED"]&startDate=2025-01-01T00:00:00Z' \
  -H "Authorization: Bearer YOUR_API_TOKEN"

# Pagination with cursor
curl -X GET "https://lumail.io/api/v1/subscribers/sub_TTYPR5tWDh/events?cursor=eyJjcmVhdGVkQXQiOiIyMDI1LTAxLTA3VDEyOjAwOjAwLjAwMFoiLCJpZCI6ImV2dF8xMjM0NSJ9" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Response Examples

{
  "events": [
    {
      "id": "evt_6fGhIjKl78",
      "eventType": "EMAIL_OPENED",
      "data": {
        "emailId": "eml_abc123",
        "campaignId": "cmp_xyz789",
        "subject": "Welcome to our newsletter!"
      },
      "subscriberId": "sub_TTYPR5tWDh",
      "createdAt": "2025-01-07T14:30:00.000Z",
      "subscriber": {
        "id": "sub_TTYPR5tWDh",
        "email": "subscriber@example.com",
        "name": "John Doe"
      }
    },
    {
      "id": "evt_9aBcDeFg12",
      "eventType": "EMAIL_SENT",
      "data": {
        "emailId": "eml_abc123",
        "campaignId": "cmp_xyz789",
        "subject": "Welcome to our newsletter!"
      },
      "subscriberId": "sub_TTYPR5tWDh",
      "createdAt": "2025-01-07T14:00:00.000Z",
      "subscriber": {
        "id": "sub_TTYPR5tWDh",
        "email": "subscriber@example.com",
        "name": "John Doe"
      }
    }
  ],
  "nextCursor": "eyJjcmVhdGVkQXQiOiIyMDI1LTAxLTA3VDEzOjQ1OjAwLjAwMFoiLCJpZCI6ImV2dF8zSGlKa0xtTjQ1In0="
}

On This Page

Query ParametersResponseResponse FieldsSupported Event TypesEmail Engagement EventsSubscription EventsTag EventsWorkflow EventsRevenue EventsOther EventsUsage ExamplesGet recent activityFilter by email engagementDate range filteringSearch eventsPaginationRelated Documentation

Lumail.io

Create and send e-mail without paying thousands of dollars

Product

BlogDocumentationChangelogDashboard

Company

AboutAccount

Legal

TermsPrivacy

8 The Green STE B, Dover Delaware 19901, United States

© 2025 Codelynx, LLC. All rights reserved.

Sign in