Skip to main content
POST
/
v1
/
screen
Screen
curl --request POST \
  --url https://api-events.zixflow.com/v1/screen \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: <content-type>' \
  --data '
{
  "userId": "<string>",
  "anonymousId": "<string>",
  "name": "<string>",
  "category": "<string>",
  "properties": {},
  "timestamp": "<string>",
  "context": {}
}
'
import requests

url = "https://api-events.zixflow.com/v1/screen"

payload = {
"userId": "<string>",
"anonymousId": "<string>",
"name": "<string>",
"category": "<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>',
category: '<string>',
properties: {},
timestamp: '<string>',
context: {}
})
};

fetch('https://api-events.zixflow.com/v1/screen', 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/screen",
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>',
'category' => '<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/screen"

payload := strings.NewReader("{\n \"userId\": \"<string>\",\n \"anonymousId\": \"<string>\",\n \"name\": \"<string>\",\n \"category\": \"<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/screen")
.header("Authorization", "<authorization>")
.header("Content-Type", "<content-type>")
.body("{\n \"userId\": \"<string>\",\n \"anonymousId\": \"<string>\",\n \"name\": \"<string>\",\n \"category\": \"<string>\",\n \"properties\": {},\n \"timestamp\": \"<string>\",\n \"context\": {}\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api-events.zixflow.com/v1/screen")

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 \"category\": \"<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 mobile screen view. Used by mobile SDKs automatically when screen auto-tracking is enabled, or manually when you want to attach screen-specific properties. Short alias: POST /v1/s When to use:
  • Mobile apps to track navigation flow
  • Attribute screen-level data (product ID, category) to the view event

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. Required if userId is not provided.
name
string
Screen name (for example "Product Detail").
category
string
Screen category.
properties
object
Screen-specific properties (for example product_id, category, price).
timestamp
string
When the screen view occurred, as ISO 8601.
context
object
Optional environment metadata (device, OS, app, IP, locale, and more). SDKs populate this automatically. See Context Object.

Response

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