post https://api.eu.xtremepush.com/api/external/hit/event
Used to send a realtime event to Xtremepush when an event occurs on a backend system "sign_up", "purchase" etc, similar to the eventHit methods found in the web and mobile SDKs. This allows users to trigger campaigns/workflows based on events that happen outside of sites or Apps.
The endpoint allows requests to update specific user attributes (both system and custom attributes such as email, first name, mobile number, etc.) before the event is hit. This ensures your event-triggered campaigns are sent to an up-to-date profile.
Example
curl --request POST \
--url https://api.eu.xtremepush.com/api/external/hit/event \
--header 'content-type: application/json' \
--data '{
"apptoken": "YOUR_APPTOKEN",
"user_id": 12345,
"user_attributes": {
"email": "[email protected]",
"first_name": "John"
},
"consent_preferences": {
"email": {
"Group Marketing": 1
},
"metadata": {
"location": "Dublin",
"department": "Marketing"
}
},
"event": "purchase",
"value": {
"purchase_id": "12345",
"product_name": "Some Product",
"price": 100
},
"timestamp": "2024-12-13 11:36:00 +01:00"
}'
Consent Manager requiredIf your project does not have Consent Manager enabled, the
consent_preferencesobject will be ignored. For more information, see Consent Management.