post https://external-api.xtremepush.com/api/external/hit/events
Used to send realtime events to Xtremepush in batch when events occurs on a backend system, such as "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.
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": "APPTOKEN",
"events": [{
"event": "deposit",
"user_id": "1234",
"user_attributes": {
"first_name": "Alexia",
"email": "[email protected]"
},
"value": {
"amount": 100.0
},
"timestamp": "2023-01-01 12:00:00"
},
{
"event": "added_to_cart",
"user_id": "5678",
"user_attributes": {
"first_name": "Lauren",
"email": "[email protected]"
},
"value": {
"amount": 345.88
},
"timestamp": "2023-04-01 22:13:00"
}
]
}
Maximum batch size
To optimise performance and manage load effectively, we recommend limiting the batch size to a maximum of 1000 objects per request.