Track Event
Record a new subscriber event in your Lumail account
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
| Field | Type | Description |
|---|---|---|
success | boolean | Indicates if the operation was successful |
event | object | The created event object |
event.id | string | Unique identifier for the event |
event.eventType | string | Type of the event |
event.subscriberId | string | ID of the subscriber associated with the event |
event.organizationId | string | ID of the organization |
event.data | object | Additional data specific to the event type |
event.createdAt | string | ISO 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 listUNSUBSCRIBED- Subscriber opted outTAG_ADDED- Tag was applied to subscriberTAG_REMOVED- Tag was removed from subscriberEMAIL_OPENED- Subscriber opened an emailEMAIL_CLICKED- Subscriber clicked a link in an emailEMAIL_SENT- Email was sent to subscriberEMAIL_RECEIVED- Email was successfully deliveredWORKFLOW_STARTED- Subscriber entered a workflowWORKFLOW_COMPLETED- Subscriber completed a workflowWORKFLOW_CANCELED- Subscriber was removed from a workflowFIELD_UPDATED- Custom field was updated for subscriberEMAIL_BOUNCED- Email to subscriber bouncedEMAIL_COMPLAINED- Subscriber marked email as spamWEBHOOK_EXECUTED- Webhook was triggered for subscriberSUBSCRIBER_PAYMENT- Subscriber made a paymentSUBSCRIBER_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
Related Documentation
- Subscriber Events Reference - Complete guide to all event types and their data fields
- Get Subscriber Events API - Retrieve event history for a subscriber