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": "YOUR_PIXEL_ID_10421",
"identityId": "01HXYZ_UPSTACK_ID",
"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",
"fbclid": "IwAR…"
},
"viewport": {
"viewportWidth": 1440,
"viewportHeight": 900,
"pageHeight": 3200,
"devicePixelRatio": 2
},
"eventProperties": {
"orderId": "10421",
"transactionId": "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": {
"code": "VALIDATION_ERROR",
"message": "<string>",
"details": [
{
"message": "<string>",
"index": 123,
"field": "<string>"
}
]
}
}{
"message": "<string>",
"errors": [
{
"message": "<string>",
"key": "<string>",
"path": [
"<string>"
]
}
]
}{
"requestId": "<string>",
"message": "<string>",
"error": {
"code": "VALIDATION_ERROR",
"message": "<string>",
"details": [
{
"message": "<string>",
"index": 123,
"field": "<string>"
}
]
}
}{
"requestId": "<string>",
"message": "<string>",
"error": {
"code": "VALIDATION_ERROR",
"message": "<string>",
"details": [
{
"message": "<string>",
"index": 123,
"field": "<string>"
}
]
}
}{
"requestId": "<string>",
"message": "<string>",
"error": {
"code": "VALIDATION_ERROR",
"message": "<string>",
"details": [
{
"message": "<string>",
"index": 123,
"field": "<string>"
}
]
}
}Send events via Upstack Conversion API
Send tracking events from your server. They join the same pipeline as browser pixel events: identity resolution, enrichment, analytics, and destination forwarding.
Always send an array of events, even for one. Each event needs a name;
everything else is optional. Extra keys are accepted and passed through.
Send ipAddress, userAgent and locale yourself. The API uses only what’s
in the body — it never fills these in from the request connection or headers — and
they drive match quality at your destinations.
eventId is your idempotency key. Optional, but strongly recommended: send the
same eventId again within 30 days and the duplicate is skipped, so retries and
webhook loops are safe. When the browser Pixel fires the same conversion, send the
same eventId (and identityId) from both so they count as one event rather than two.
For purchase, the Pixel’s event ID is your Pixel ID and order ID joined by an underscore.
Limits. 100 events per request, 128 KB per body, and 100 items per user data array. Individual string fields have no length cap — the body size is the limit.
Required scope: events:write.
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": "YOUR_PIXEL_ID_10421",
"identityId": "01HXYZ_UPSTACK_ID",
"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",
"fbclid": "IwAR…"
},
"viewport": {
"viewportWidth": 1440,
"viewportHeight": 900,
"pageHeight": 3200,
"devicePixelRatio": 2
},
"eventProperties": {
"orderId": "10421",
"transactionId": "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": {
"code": "VALIDATION_ERROR",
"message": "<string>",
"details": [
{
"message": "<string>",
"index": 123,
"field": "<string>"
}
]
}
}{
"message": "<string>",
"errors": [
{
"message": "<string>",
"key": "<string>",
"path": [
"<string>"
]
}
]
}{
"requestId": "<string>",
"message": "<string>",
"error": {
"code": "VALIDATION_ERROR",
"message": "<string>",
"details": [
{
"message": "<string>",
"index": 123,
"field": "<string>"
}
]
}
}{
"requestId": "<string>",
"message": "<string>",
"error": {
"code": "VALIDATION_ERROR",
"message": "<string>",
"details": [
{
"message": "<string>",
"index": 123,
"field": "<string>"
}
]
}
}{
"requestId": "<string>",
"message": "<string>",
"error": {
"code": "VALIDATION_ERROR",
"message": "<string>",
"details": [
{
"message": "<string>",
"index": 123,
"field": "<string>"
}
]
}
}Authorizations
Headers
The API version to use, named by the date it went live (YYYY-MM-DD). Omit it to get
the oldest version that still works. Every response returns the version it used in
the same header. See API versioning.
"2026-05-26"
Body
Was this page helpful?