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", "eventId": "01ARZ3NDEKTSV4RRFFQ69G5FAV", "userProperties": { "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" }, "eventProperties": { "orderId": "10421", "value": 99.9, "currency": "USD", "items": [ { "id": "SKU1", "name": "Tee", "price": 49.95, "quantity": 2 } ] } } ] } '
{
  "requestId": "18d90656-34fd-4b87-b1e2-9607943d97a9",
  "eventsIngested": 3
}
{
  "requestId": "<string>",
  "message": "<string>",
  "error": {
    "message": "<string>",
    "details": [
      {
        "message": "<string>",
        "index": 123,
        "field": "<string>"
      }
    ]
  }
}
{
  "message": "<string>",
  "errors": [
    {
      "message": "<string>",
      "key": "<string>",
      "path": [
        "<string>"
      ]
    }
  ]
}
{
  "requestId": "<string>",
  "message": "<string>",
  "error": {
    "message": "<string>",
    "details": [
      {
        "message": "<string>",
        "index": 123,
        "field": "<string>"
      }
    ]
  }
}
{
  "requestId": "<string>",
  "message": "<string>",
  "error": {
    "message": "<string>",
    "details": [
      {
        "message": "<string>",
        "index": 123,
        "field": "<string>"
      }
    ]
  }
}
{
  "requestId": "<string>",
  "message": "<string>",
  "error": {
    "message": "<string>",
    "details": [
      {
        "message": "<string>",
        "index": 123,
        "field": "<string>"
      }
    ]
  }
}

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

The events to ingest. At least 1, at most 100 per request.

Required array length: 1 - 100 elements

Response

Events accepted for processing. eventsIngested is the number queued.

requestId
string
required

Unique id for this request (also the x-request-id header).

eventsIngested
integer
required

Number of events accepted and queued for processing.