Skip to main content
POST
/
tr
/
api
/
events
curl --request POST \
  --url https://api.upstackdata.com/tr/api/events \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --header 'x-pixel-id: <api-key>' \
  --data '
{
  "events": [
    {
      "name": "purchase",
      "user": {
        "emails": [
          "jane@example.com"
        ],
        "userIds": [
          "cust_889"
        ]
      },
      "ipAddress": "203.0.113.5",
      "page": {
        "url": "https://shop.com/checkout"
      },
      "click": {
        "fbc": "fb.1.abc",
        "gclid": "xyz"
      },
      "data": {
        "orderId": "10421",
        "value": 99.9,
        "currency": "USD",
        "items": [
          {
            "id": "SKU1",
            "name": "Tee",
            "price": 49.95,
            "quantity": 2
          }
        ]
      }
    }
  ]
}
'
{
  "success": true,
  "eventsIngested": 1
}

Authorizations

x-api-key
string
header
required

Your Upstack API key. Starts with upstack_.

x-pixel-id
string
header
required

The pixel id the request targets.

Body

application/json
events
object[]
required
Required array length: 1 - 100 elements

Response

Events accepted. success is false if any failed to queue.

success
boolean
required
eventsIngested
integer
required

Number of events queued.