Skip to main content
POST
/
api
/
v1
/
subscribers
/
events
Trigger Event
curl --request POST \
  --url https://api.sequenzy.com/api/v1/subscribers/events \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "email": "<string>",
  "externalId": "<string>",
  "event": "<string>",
  "properties": {},
  "customAttributes": {}
}
'
{
  "success": true,
  "subscriber": {
    "id": "sub_abc123",
    "email": "user@example.com",
    "externalId": "user_123",
    "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
Subscriber delivery email address. Required when creating a new subscriber.
externalId
string
Your app/customer/user ID for this subscriber. You can trigger events with only externalId when the subscriber already exists.
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.
curl -X POST "https://api.sequenzy.com/api/v1/subscribers/events" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "user@example.com",
    "externalId": "user_123",
    "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 if email doesn’t exist - active status, or pending confirmation when double opt-in is enabled
Event DefinitionCreated if event name is new
New subscribers created by this endpoint follow your workspace default lists setting.

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

Using properties in Sequence Emails

If this event starts a sequence with trigger: "event_received", Sequenzy stores the properties object on that sequence run and makes it available in later emails through event. merge tags. Examples:
  • {{event.amount}}
  • {{event.product}}
  • {{event.order.id}}
  • {{event.city|your area}}
That means the second or third email in the same sequence can still use the original event payload without copying those values onto the subscriber profile.

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

Double Opt-In

When the workspace has double opt-in enabled and the event creates a brand-new subscriber, the subscriber is stored pending confirmation, the confirmation email is queued, and sequences triggered by the event wait at their trigger step until the subscriber confirms. The response then includes an optIn object.

Responses

{
  "success": true,
  "subscriber": {
    "id": "sub_abc123",
    "email": "user@example.com",
    "externalId": "user_123",
    "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": "customer@example.com",
    "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": "user@example.com",
    "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": "user@example.com", "event": "saas.trial_started" }'

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

# Customer churned
curl -X POST "https://api.sequenzy.com/api/v1/subscribers/events" \
  -d '{ "email": "user@example.com", "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.