TopluDocs

Sending your first event

One request carries everything a destination needs to attribute a conversion.

event_type and timestamp say what happened and when. value and currency_code say what it was worth. source says where it happened, on your website, in your app, over the phone, in a physical store.

user_data says who it was, but never as raw personal data: email addresses, phone numbers, and your own customer IDs are all hashed before they reach Toplu (lowercase, trim whitespace, then SHA-256), so the value on the wire is never reversible back to the original.

destinations says where to send it, a plain list of the ones you've connected. That list is the one thing here that isn't part of the underlying ECAPI standard itself, it's what lets a single event fan out to several destinations instead of the one-sender-one-receiver shape ECAPI defines on its own.

cURL
curl https://api.toplu.app/v1/events \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"id": "evt_1a2b3c",
"timestamp": 1785594720,
"event_type": "purchase",
"value": 129.00,
"currency_code": "USD",
"source": "website",
"destinations": ["google", "meta"],
"user_data": { "email_address": ["5d41402abc4b2a76..."] }
}'

Toplu validates the payload, looks up which of your connected destinations you named, and forwards it on, in ECAPI's own format for anything that speaks it directly, through a maintained connector otherwise. The response tells you the outcome for each destination separately:

JSON
{
"id": "evt_1a2b3c",
"status": "delivered",
"destinations": {
"google": { "status": "delivered", "code": 200 },
"meta": { "status": "failed", "code": 400, "error": "invalid_user_data" }
}
}

Full field-by-field reference in the API reference.

Need a hand?

Coding is hard sometimes, and that's okay. Visit our help center or reach out directly, we're here to help.

Help centerContact us