Track Event

Record a new subscriber event in your Lumail account

MethodPOST
/api/v1/events

https://lumail.io/api/v1/events

Records a new event for a subscriber. Events appear in the subscriber timeline and can be used for segmentation and automation triggers.

Response

  • Success (200 OK) - Returns the created event object.
  • Error (400 Bad Request) - Returned if the subscriber is not found or the event data is invalid.
  • Error (500 Internal Server Error) - Returned if the event could not be created.

Response Fields

FieldTypeDescription
successbooleanIndicates if the operation was successful
eventobjectThe created event object
event.idstringUnique identifier for the event
event.eventTypestringType of the event
event.subscriberIdstringID of the subscriber associated with the event
event.organizationIdstringID of the organization
event.dataobjectAdditional data specific to the event type
event.createdAtstringISO timestamp when the event was created

Request Schema

{
  "eventType": "string", // Required: Type of event from predefined list
  "subscriber": "string", // Required: Email or ID of the subscriber
  "data": {
    // Required: Additional event data
    "property1": "value1",
    "property2": "value2"
  }
}

Supported event types:

  • SUBSCRIBED - Subscriber joined a list
  • UNSUBSCRIBED - Subscriber opted out
  • TAG_ADDED - Tag was applied to subscriber
  • TAG_REMOVED - Tag was removed from subscriber
  • EMAIL_OPENED - Subscriber opened an email
  • EMAIL_CLICKED - Subscriber clicked a link in an email
  • EMAIL_SENT - Email was sent to subscriber
  • EMAIL_RECEIVED - Email was successfully delivered
  • WORKFLOW_STARTED - Subscriber entered a workflow
  • WORKFLOW_COMPLETED - Subscriber completed a workflow
  • WORKFLOW_CANCELED - Subscriber was removed from a workflow
  • FIELD_UPDATED - Custom field was updated for subscriber
  • EMAIL_BOUNCED - Email to subscriber bounced
  • EMAIL_COMPLAINED - Subscriber marked email as spam
  • WEBHOOK_EXECUTED - Webhook was triggered for subscriber
  • SUBSCRIBER_PAYMENT - Subscriber made a payment
  • SUBSCRIBER_REFUND - Subscriber received a refund

Usage Example

Use this API endpoint to track important subscriber activities and interactions:

  • Record purchase events with amount and product data
  • Track website engagement like page visits or feature usage
  • Log subscriber lifecycle events (registration, upgrade, cancellation)
  • Store third-party system interactions
  • Trigger automation workflows based on specific events
  • Build a comprehensive timeline of subscriber activity