Page
curl --request POST \
--url https://api-events.zixflow.com/v1/page \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"userId": "<string>",
"anonymousId": "<string>",
"name": "<string>",
"properties": {},
"timestamp": "<string>",
"context": {}
}
'import requests
url = "https://api-events.zixflow.com/v1/page"
payload = {
"userId": "<string>",
"anonymousId": "<string>",
"name": "<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>',
name: '<string>',
properties: {},
timestamp: '<string>',
context: {}
})
};
fetch('https://api-events.zixflow.com/v1/page', 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/page",
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>',
'name' => '<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/page"
payload := strings.NewReader("{\n \"userId\": \"<string>\",\n \"anonymousId\": \"<string>\",\n \"name\": \"<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/page")
.header("Authorization", "<authorization>")
.header("Content-Type", "<content-type>")
.body("{\n \"userId\": \"<string>\",\n \"anonymousId\": \"<string>\",\n \"name\": \"<string>\",\n \"properties\": {},\n \"timestamp\": \"<string>\",\n \"context\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-events.zixflow.com/v1/page")
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 \"name\": \"<string>\",\n \"properties\": {},\n \"timestamp\": \"<string>\",\n \"context\": {}\n}"
response = http.request(request)
puts response.read_body{}
{
"error": "VALIDATION_FAILED",
"details": [
{
"reason": "REQUIRED",
"field": "userId",
"message": "userId is required"
}
]
}
{
"error": "UNAUTHORIZED",
"details": []
}
Data Pipelines
Page
Record a web page view
POST
/
v1
/
page
Page
curl --request POST \
--url https://api-events.zixflow.com/v1/page \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"userId": "<string>",
"anonymousId": "<string>",
"name": "<string>",
"properties": {},
"timestamp": "<string>",
"context": {}
}
'import requests
url = "https://api-events.zixflow.com/v1/page"
payload = {
"userId": "<string>",
"anonymousId": "<string>",
"name": "<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>',
name: '<string>',
properties: {},
timestamp: '<string>',
context: {}
})
};
fetch('https://api-events.zixflow.com/v1/page', 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/page",
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>',
'name' => '<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/page"
payload := strings.NewReader("{\n \"userId\": \"<string>\",\n \"anonymousId\": \"<string>\",\n \"name\": \"<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/page")
.header("Authorization", "<authorization>")
.header("Content-Type", "<content-type>")
.body("{\n \"userId\": \"<string>\",\n \"anonymousId\": \"<string>\",\n \"name\": \"<string>\",\n \"properties\": {},\n \"timestamp\": \"<string>\",\n \"context\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-events.zixflow.com/v1/page")
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 \"name\": \"<string>\",\n \"properties\": {},\n \"timestamp\": \"<string>\",\n \"context\": {}\n}"
response = http.request(request)
puts response.read_body{}
{
"error": "VALIDATION_FAILED",
"details": [
{
"reason": "REQUIRED",
"field": "userId",
"message": "userId is required"
}
]
}
{
"error": "UNAUTHORIZED",
"details": []
}
Description
Record a web page view. Equivalent to Screen but for web apps. Short alias:POST /v1/p
When to use:
- Web apps and marketing sites
- Track specific page metadata (title, URL, referrer)
Headers
HTTP Basic Auth. See Events Authentication.
Must be
application/json.Body
Identified user ID. At least one of
userId or anonymousId is required.Anonymous user ID. Required if
userId is not provided.Page name.
Page metadata such as
path, url, referrer, and title.When the page view occurred, as ISO 8601.
Optional environment metadata (device, OS, app, IP, locale, campaign, and more). SDKs populate this automatically. See Context Object.
Response
Successful requests returnHTTP 200 with an empty JSON object.
{}
{
"error": "VALIDATION_FAILED",
"details": [
{
"reason": "REQUIRED",
"field": "userId",
"message": "userId is required"
}
]
}
{
"error": "UNAUTHORIZED",
"details": []
}
⌘I