Skip to main content
POST
/
api
/
v1
/
subscribers
/
events
{
  "success": true,
  "subscriber": {
    "id": "sub_abc123",
    "email": "[email protected]",
    "created": false
  },
  "event": {
    "id": "evt_xyz789",
    "name": "purchase_completed",
    "definitionCreated": false
  }
}
Trigger an event for a subscriber. Creates the subscriber and/or event definition if they don’t exist. Events can trigger automations and apply sync rules.

Request Body

email
string
required
Subscriber email address
event
string
required
Event name (e.g., purchase_completed, saas.purchase)
properties
object
Event properties/metadata. Can contain any key-value data.
customAttributes
object
Custom attributes to set on the subscriber (used when creating new subscriber)
curl -X POST "https://api.sequenzy.com/api/v1/subscribers/events" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "[email protected]",
    "event": "purchase_completed",
    "properties": {
      "orderId": "order_12345",
      "amount": 99.99,
      "product": "Pro Plan",
      "currency": "USD"
    }
  }'

Auto-Creation Behavior

This endpoint automatically creates resources if they don’t exist:
ResourceBehavior
SubscriberCreated with active status if email doesn’t exist
Event DefinitionCreated if event name is new

What Happens When an Event is Triggered

  1. Event Recorded - Stored in analytics for reporting
  2. Sync Rules Applied - Tags automatically added/removed based on rules
  3. Automations Triggered - Sequences with matching event triggers start

Built-in Events

These events have special behavior with default sync rules:
EventTags AddedTags Removed
saas.purchasecustomerlead, past-due, cancelled, churned
saas.churnchurnedcustomer, cancelled, past-due
saas.cancelledcancelledcustomer
saas.payment_failedpast-due
saas.trial_startedtriallead

Responses

{
  "success": true,
  "subscriber": {
    "id": "sub_abc123",
    "email": "[email protected]",
    "created": false
  },
  "event": {
    "id": "evt_xyz789",
    "name": "purchase_completed",
    "definitionCreated": false
  }
}

Response Fields

FieldDescription
subscriber.createdtrue if subscriber was created by this request
event.definitionCreatedtrue if this event type was newly defined

Use Cases

E-commerce Purchase

curl -X POST "https://api.sequenzy.com/api/v1/subscribers/events" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "[email protected]",
    "event": "saas.purchase",
    "properties": {
      "orderId": "ord_abc123",
      "amount": 149.99,
      "plan": "pro-annual",
      "currency": "USD"
    },
    "customAttributes": {
      "lastPurchaseDate": "2024-01-15"
    }
  }'

Feature Activation

curl -X POST "https://api.sequenzy.com/api/v1/subscribers/events" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "[email protected]",
    "event": "feature_activated",
    "properties": {
      "feature": "ai-assistant",
      "firstTime": true
    }
  }'

Subscription Lifecycle

# Trial started
curl -X POST "https://api.sequenzy.com/api/v1/subscribers/events" \
  -d '{ "email": "[email protected]", "event": "saas.trial_started" }'

# Payment failed
curl -X POST "https://api.sequenzy.com/api/v1/subscribers/events" \
  -d '{
    "email": "[email protected]",
    "event": "saas.payment_failed",
    "properties": { "attemptCount": 2 }
  }'

# Customer churned
curl -X POST "https://api.sequenzy.com/api/v1/subscribers/events" \
  -d '{ "email": "[email protected]", "event": "saas.churn" }'
Events can trigger automation sequences. If you have a sequence set to start when this event is received, it will begin automatically for the subscriber.