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.

Note: If your project does not have consent preferences enabled for the Hit Event API, the consent_preferences object will be ignored.

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"
    },
    "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 required

If your project does not have Consent Manager enabled, the consent_preferences object will be ignored. For more information, see Consent Management.

Language
Click Try It! to start a request and see the response here!