Track
curl --request POST \
--url https://api-events.zixflow.com/v1/track \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"userId": "<string>",
"anonymousId": "<string>",
"event": "<string>",
"properties": {},
"timestamp": "<string>",
"context": {}
}
'import requests
url = "https://api-events.zixflow.com/v1/track"
payload = {
"userId": "<string>",
"anonymousId": "<string>",
"event": "<string>",
"properties": {},
"timestamp": "<string>",
"context": {}
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "<content-type>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': '<content-type>'},
body: JSON.stringify({
userId: '<string>',
anonymousId: '<string>',
event: '<string>',
properties: {},
timestamp: '<string>',
context: {}
})
};
fetch('https://api-events.zixflow.com/v1/track', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-events.zixflow.com/v1/track",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'userId' => '<string>',
'anonymousId' => '<string>',
'event' => '<string>',
'properties' => [
],
'timestamp' => '<string>',
'context' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: <content-type>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-events.zixflow.com/v1/track"
payload := strings.NewReader("{\n \"userId\": \"<string>\",\n \"anonymousId\": \"<string>\",\n \"event\": \"<string>\",\n \"properties\": {},\n \"timestamp\": \"<string>\",\n \"context\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "<content-type>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-events.zixflow.com/v1/track")
.header("Authorization", "<authorization>")
.header("Content-Type", "<content-type>")
.body("{\n \"userId\": \"<string>\",\n \"anonymousId\": \"<string>\",\n \"event\": \"<string>\",\n \"properties\": {},\n \"timestamp\": \"<string>\",\n \"context\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-events.zixflow.com/v1/track")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = '<content-type>'
request.body = "{\n \"userId\": \"<string>\",\n \"anonymousId\": \"<string>\",\n \"event\": \"<string>\",\n \"properties\": {},\n \"timestamp\": \"<string>\",\n \"context\": {}\n}"
response = http.request(request)
puts response.read_body{}
{
"error": "VALIDATION_FAILED",
"details": [
{
"reason": "REQUIRED",
"field": "event",
"message": "event is required"
}
]
}
{
"error": "UNAUTHORIZED",
"details": []
}
Data Pipelines
Track
Record a user action or business event
POST
/
v1
/
track
Track
curl --request POST \
--url https://api-events.zixflow.com/v1/track \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"userId": "<string>",
"anonymousId": "<string>",
"event": "<string>",
"properties": {},
"timestamp": "<string>",
"context": {}
}
'import requests
url = "https://api-events.zixflow.com/v1/track"
payload = {
"userId": "<string>",
"anonymousId": "<string>",
"event": "<string>",
"properties": {},
"timestamp": "<string>",
"context": {}
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "<content-type>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': '<content-type>'},
body: JSON.stringify({
userId: '<string>',
anonymousId: '<string>',
event: '<string>',
properties: {},
timestamp: '<string>',
context: {}
})
};
fetch('https://api-events.zixflow.com/v1/track', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-events.zixflow.com/v1/track",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'userId' => '<string>',
'anonymousId' => '<string>',
'event' => '<string>',
'properties' => [
],
'timestamp' => '<string>',
'context' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: <content-type>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-events.zixflow.com/v1/track"
payload := strings.NewReader("{\n \"userId\": \"<string>\",\n \"anonymousId\": \"<string>\",\n \"event\": \"<string>\",\n \"properties\": {},\n \"timestamp\": \"<string>\",\n \"context\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "<content-type>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-events.zixflow.com/v1/track")
.header("Authorization", "<authorization>")
.header("Content-Type", "<content-type>")
.body("{\n \"userId\": \"<string>\",\n \"anonymousId\": \"<string>\",\n \"event\": \"<string>\",\n \"properties\": {},\n \"timestamp\": \"<string>\",\n \"context\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-events.zixflow.com/v1/track")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = '<content-type>'
request.body = "{\n \"userId\": \"<string>\",\n \"anonymousId\": \"<string>\",\n \"event\": \"<string>\",\n \"properties\": {},\n \"timestamp\": \"<string>\",\n \"context\": {}\n}"
response = http.request(request)
puts response.read_body{}
{
"error": "VALIDATION_FAILED",
"details": [
{
"reason": "REQUIRED",
"field": "event",
"message": "event is required"
}
]
}
{
"error": "UNAUTHORIZED",
"details": []
}
Description
Record a user action or business event. This is the most commonly used endpoint for custom event tracking. Short alias:POST /v1/t
When to use:
- Any user action: button tapped, purchase completed, feature used
- Business events from your server: subscription renewed, payment failed
- Device lifecycle events such as
Application InstalledorApplication Opened(SDKs send these automatically)
Headers
string
required
HTTP Basic Auth. See Events Authentication.
string
default:"application/json"
required
Must be
application/json.Body
string
Identified user ID. At least one of
userId or anonymousId is required.string
Anonymous user ID if the user is not identified. Required if
userId is not provided.string
required
Name of the event (for example
"Order Completed").object
Event-specific data (for example
order_id, revenue, currency).string
When the event occurred, as ISO 8601.
object
Optional environment metadata (device, OS, app, IP, locale, and more). SDKs populate this automatically. See Context Object.
Semantic events
Certain event names trigger special handling beyond the standard event pipeline:| Event name | Special behavior |
|---|---|
Device Created or Updated | Routes to device registration pipeline |
Device Deleted | Soft-deletes device record (active=false) |
Device Registered | Routes to device logs table |
Device Updated | Routes to device logs table |
User Deleted | Sets is_deleted=true on profile, deactivates all devices |
User Suppressed | Sets is_suppressed=true, blocks all channel delivery |
User Unsuppressed | Clears suppression flag |
Application Installed | Routes to device logs table |
Application Opened | Routes to device logs table |
Application Backgrounded | Routes to device logs table |
Application Foregrounded | Routes to device logs table |
Application Crashed | Routes to device logs table |
Response
Successful requests returnHTTP 200 with an empty JSON object.
{}
{
"error": "VALIDATION_FAILED",
"details": [
{
"reason": "REQUIRED",
"field": "event",
"message": "event is required"
}
]
}
{
"error": "UNAUTHORIZED",
"details": []
}
⌘I