Documentation Index

Fetch the complete documentation index at: https://docs.xtremepush.com/llms.txt

Use this file to discover all available pages before exploring further.

Batch hit

Prev Next
Post
/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.

Body parameters
Batch hit events
{
  "apptoken": "YOUR_APPTOKEN",
  "events": [
    {
      "event": "purchase",
      "user_id": "USER_ID_1",
      "value": "100"
    },
    {
      "event": "sign_up",
      "user_id": "USER_ID_2"
    }
  ]
}
Expand All
object
apptoken
string Required

Your App token

events
Array of object Required

Array containing the event name (event) and the user ID (user_id). Other params such as value, user_attributes and timestamp can be included optionally. Review the Hit event endpoint for more details on each specific param.

object
event
string Required

Event name

user_id
string Required

Your external user ID. If a user with such user ID doesn't exist it will be automatically created.

value
string

Can be: string / number, eg. 100, or key-value object, eg. {"product": "Some Product"}

user_attributes
string (json)

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.

timestamp
string (date-time)

The timestamp of the event

Responses
200

200

Result
{
  "success": "True",
  "code": "200"
}
object
success
boolean
Defaulttrue
ExampleTrue
code
integer
Default0
Example200
400

400

Result
{
  "success": "False",
  "code": "400",
  "message": "General error information",
  "errors": [
    {
      "text": [
        "Detailed information about the specific error"
      ]
    }
  ]
}
Expand All
object
success
boolean
Defaulttrue
ExampleFalse
code
integer
Default0
Example400
message
string
ExampleGeneral error information
errors
Array of object
object
text
Array of string
string