Skip to main content
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 Installed or Application Opened (SDKs send these automatically)

Headers

Authorization
string
required
HTTP Basic Auth. See Events Authentication.
Content-Type
string
default:"application/json"
required
Must be application/json.

Body

userId
string
Identified user ID. At least one of userId or anonymousId is required.
anonymousId
string
Anonymous user ID if the user is not identified. Required if userId is not provided.
event
string
required
Name of the event (for example "Order Completed").
properties
object
Event-specific data (for example order_id, revenue, currency).
timestamp
string
When the event occurred, as ISO 8601.
context
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 nameSpecial behavior
Device Created or UpdatedRoutes to device registration pipeline
Device DeletedSoft-deletes device record (active=false)
Device RegisteredRoutes to device logs table
Device UpdatedRoutes to device logs table
User DeletedSets is_deleted=true on profile, deactivates all devices
User SuppressedSets is_suppressed=true, blocks all channel delivery
User UnsuppressedClears suppression flag
Application InstalledRoutes to device logs table
Application OpenedRoutes to device logs table
Application BackgroundedRoutes to device logs table
Application ForegroundedRoutes to device logs table
Application CrashedRoutes to device logs table

Response

Successful requests return HTTP 200 with an empty JSON object.
{}
{
  "error": "VALIDATION_FAILED",
  "details": [
    {
      "reason": "REQUIRED",
      "field": "event",
      "message": "event is required"
    }
  ]
}
{
  "error": "UNAUTHORIZED",
  "details": []
}