Skip to navigation

Track custom events

View as Markdown
Legacy Tracker Documentation

For the legacy tracker doc, check our guide here.

This endpoint captures events and additional information about them.

Track an event by email

curl --request POST \
--url https://in-automate.brevo.com/api/v2/trackEvent \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'ma-key: YOUR_MA_KEY' \
--data '
{
"email": "example@brevo.com",
"event": "wishlist_updated",
"properties": {
"additionalProp": "additional property"
},
"eventdata": {
"data": {
"added_product": [
{
"currency": "EUR",
"name": "Wrist watch",
"type": "accessories",
"price": "50.00"
}
]
}
}
}
'

Track an event by external ID (no email required)

curl --request POST \
--url https://in-automate.brevo.com/api/v2/trackEvent \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'ma-key: YOUR_MA_KEY' \
--data '
{
"identifiers": {
"ext_id": "customer_98765"
},
"event": "cart_updated",
"properties": {
"additionalProp": "additional property"
}
}
'

Use any value for the event field and pass any key-value in properties. Do not use the reserved keys email or event inside the properties object.

Parameters

AttributeDatatypeDescription
emailStringEmail used to identify the user. Required unless identifiers is provided.
identifiersObjectContact identifiers. At least one key required if email is omitted. See supported identifiers.
eventStringEvent to track
propertiesObjectCustom fields. These user properties populate your contact database.
eventdataObjectData you want to pass about the event

Response

Response codeMessageDescription
204Event has been tracked successfullyNo content in the JSON response — the event has been tracked.
400Bad requestReturned for out_of_rangeModel, invalid_parameter, or missingParameter errors.