Events sent via Backend API typically involve sensitive data or require server-side validation and processing. Let's see the SubscriptionStarted
event as an example:
{
"eventTypeKey": "SubscriptionStarted",
"params": [
{
"name": "externalCustomerId",
"value": "a7c9f9b8-d3a2-401c-8b93-7f3d4f91bfa2"
},
{
"name": "subscriptionPlan",
"value": "Premium"
},
{
"name": "startDate",
"value": "2024-01-01T12:00:00Z"
},
{
"name": "price",
"value": 49.99
},
{
"name": "currency",
"value": "USD"
},
{
"name": "billingCycle",
"value": "Monthly"
}
]
}
Explanation of Fields
eventTypeKey
:"SubscriptionStarted"
- Indicates the type of event being generated.
params
: An array of objects withname
andvalue
pairs.externalCustomerId
: Unique customer identifier.subscriptionPlan
: The plan the customer has subscribed to (e.g., Basic, Premium).startDate
: ISO 8601 date-time format specifying when the subscription began.price
: Cost of the subscription plan.currency
: Currency of the subscription cost.billingCycle
: Frequency of billing (e.g., Monthly, Yearly).
This request can be sent via the Generate Event API to track user subscription activities, trigger workflows, and personalize messages based on event data.