post https://external-api.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.
Events hit through the external API cannot be used to trigger on-site or in-app campaigns.
Example
curl --request POST \
--url https://external-api.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"
},
"event": "purchase",
"value": {
"purchase_id": "12345",
"product_name": "Some Product",
"price": 100
},
"timestamp": "2023-01-01 12:00:00"
}'