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.
Note: If your project does not have Consent Manager enabled, the consent_preferences object will be ignored.
{
"apptoken": "YOUR_APPTOKEN",
"user_id": "USER_ID",
"event": "purchase",
"value": {
"product": "Some Product"
},
"user_attributes": {
"email": "user@example.com",
"first_name": "Sam"
},
"consent_preferences": {
"email": {
"marketing": "1"
},
"sms": {
"marketing": "0"
}
}
}Your App token
Your external user ID. If a user with such user ID doesn't exist it will be automatically created.
Event name
Can be: string / number, eg. 100, or key-value object, eg. {"product": "Some Product"}
Key-value array of user attributes. These attributes will be updated before executing any event-triggered campaign. This is useful when the campaign depends on one of the user attributes, such as email address or first name.
The timestamp of the event. By default the timestamp will be read in UTC. If your project is in a different timezone, the timezone can be indicated in the timestamp: 2024-12-13 11:36:00 +01:00.
Optional map of consent preferences by channel. Each channel key must contain a map of preferences with binary values to show their status (1 for opt-in and 0 for opt-out). A metadata object can be included. To update consent preferences, ensure that Consent Manager is enabled for your project.
200
{
"success": "True",
"code": "200"
}400
{
"success": "False",
"code": "400",
"message": "General error information",
"errors": [
{
"text": [
"Detailed information about the specific error"
]
}
]
}