Track visitor events
curl --request POST \
--url https://api.orbit.devotel.io/sdk/track \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '
{
"anonymous_id": "anon_5f3c2b1a",
"identity": {
"email": "ada@example.com"
},
"events": [
{
"name": "page_viewed",
"properties": {
"url": "https://example.com/pricing",
"path": "/pricing"
},
"timestamp": "2026-08-09T12:00:00.000Z"
},
{
"name": "cta_clicked",
"properties": {
"cta": "start_trial"
}
}
]
}
'import requests
url = "https://api.orbit.devotel.io/sdk/track"
payload = {
"anonymous_id": "anon_5f3c2b1a",
"identity": { "email": "ada@example.com" },
"events": [
{
"name": "page_viewed",
"properties": {
"url": "https://example.com/pricing",
"path": "/pricing"
},
"timestamp": "2026-08-09T12:00:00.000Z"
},
{
"name": "cta_clicked",
"properties": { "cta": "start_trial" }
}
]
}
headers = {
"x-api-key": "<x-api-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-api-key': '<x-api-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
anonymous_id: 'anon_5f3c2b1a',
identity: {email: 'ada@example.com'},
events: [
{
name: 'page_viewed',
properties: {url: 'https://example.com/pricing', path: '/pricing'},
timestamp: '2026-08-09T12:00:00.000Z'
},
{name: 'cta_clicked', properties: {cta: 'start_trial'}}
]
})
};
fetch('https://api.orbit.devotel.io/sdk/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.orbit.devotel.io/sdk/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([
'anonymous_id' => 'anon_5f3c2b1a',
'identity' => [
'email' => 'ada@example.com'
],
'events' => [
[
'name' => 'page_viewed',
'properties' => [
'url' => 'https://example.com/pricing',
'path' => '/pricing'
],
'timestamp' => '2026-08-09T12:00:00.000Z'
],
[
'name' => 'cta_clicked',
'properties' => [
'cta' => 'start_trial'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-api-key: <x-api-key>"
],
]);
$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.orbit.devotel.io/sdk/track"
payload := strings.NewReader("{\n \"anonymous_id\": \"anon_5f3c2b1a\",\n \"identity\": {\n \"email\": \"ada@example.com\"\n },\n \"events\": [\n {\n \"name\": \"page_viewed\",\n \"properties\": {\n \"url\": \"https://example.com/pricing\",\n \"path\": \"/pricing\"\n },\n \"timestamp\": \"2026-08-09T12:00:00.000Z\"\n },\n {\n \"name\": \"cta_clicked\",\n \"properties\": {\n \"cta\": \"start_trial\"\n }\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<x-api-key>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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.orbit.devotel.io/sdk/track")
.header("x-api-key", "<x-api-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"anonymous_id\": \"anon_5f3c2b1a\",\n \"identity\": {\n \"email\": \"ada@example.com\"\n },\n \"events\": [\n {\n \"name\": \"page_viewed\",\n \"properties\": {\n \"url\": \"https://example.com/pricing\",\n \"path\": \"/pricing\"\n },\n \"timestamp\": \"2026-08-09T12:00:00.000Z\"\n },\n {\n \"name\": \"cta_clicked\",\n \"properties\": {\n \"cta\": \"start_trial\"\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.orbit.devotel.io/sdk/track")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<x-api-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"anonymous_id\": \"anon_5f3c2b1a\",\n \"identity\": {\n \"email\": \"ada@example.com\"\n },\n \"events\": [\n {\n \"name\": \"page_viewed\",\n \"properties\": {\n \"url\": \"https://example.com/pricing\",\n \"path\": \"/pricing\"\n },\n \"timestamp\": \"2026-08-09T12:00:00.000Z\"\n },\n {\n \"name\": \"cta_clicked\",\n \"properties\": {\n \"cta\": \"start_trial\"\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"accepted": 2
},
"meta": {
"request_id": "req_1a2b3c4d",
"timestamp": "2026-08-09T12:00:00.000Z"
}
}API Reference
Track visitor events
Records a batch of behavioural events (page views, clicks, custom actions) for a website visitor. Called from the Orbit Web SDK with the tenant’s PUBLIC API key; the SDK auto-batches up to 50 events per call. Events attach to a contact when an identity is supplied, otherwise they key on anonymous_id until a later /sdk/identify backfills them. Each event’s properties object is capped at 8 KiB.
POST
/
sdk
/
track
Track visitor events
curl --request POST \
--url https://api.orbit.devotel.io/sdk/track \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '
{
"anonymous_id": "anon_5f3c2b1a",
"identity": {
"email": "ada@example.com"
},
"events": [
{
"name": "page_viewed",
"properties": {
"url": "https://example.com/pricing",
"path": "/pricing"
},
"timestamp": "2026-08-09T12:00:00.000Z"
},
{
"name": "cta_clicked",
"properties": {
"cta": "start_trial"
}
}
]
}
'import requests
url = "https://api.orbit.devotel.io/sdk/track"
payload = {
"anonymous_id": "anon_5f3c2b1a",
"identity": { "email": "ada@example.com" },
"events": [
{
"name": "page_viewed",
"properties": {
"url": "https://example.com/pricing",
"path": "/pricing"
},
"timestamp": "2026-08-09T12:00:00.000Z"
},
{
"name": "cta_clicked",
"properties": { "cta": "start_trial" }
}
]
}
headers = {
"x-api-key": "<x-api-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-api-key': '<x-api-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
anonymous_id: 'anon_5f3c2b1a',
identity: {email: 'ada@example.com'},
events: [
{
name: 'page_viewed',
properties: {url: 'https://example.com/pricing', path: '/pricing'},
timestamp: '2026-08-09T12:00:00.000Z'
},
{name: 'cta_clicked', properties: {cta: 'start_trial'}}
]
})
};
fetch('https://api.orbit.devotel.io/sdk/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.orbit.devotel.io/sdk/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([
'anonymous_id' => 'anon_5f3c2b1a',
'identity' => [
'email' => 'ada@example.com'
],
'events' => [
[
'name' => 'page_viewed',
'properties' => [
'url' => 'https://example.com/pricing',
'path' => '/pricing'
],
'timestamp' => '2026-08-09T12:00:00.000Z'
],
[
'name' => 'cta_clicked',
'properties' => [
'cta' => 'start_trial'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-api-key: <x-api-key>"
],
]);
$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.orbit.devotel.io/sdk/track"
payload := strings.NewReader("{\n \"anonymous_id\": \"anon_5f3c2b1a\",\n \"identity\": {\n \"email\": \"ada@example.com\"\n },\n \"events\": [\n {\n \"name\": \"page_viewed\",\n \"properties\": {\n \"url\": \"https://example.com/pricing\",\n \"path\": \"/pricing\"\n },\n \"timestamp\": \"2026-08-09T12:00:00.000Z\"\n },\n {\n \"name\": \"cta_clicked\",\n \"properties\": {\n \"cta\": \"start_trial\"\n }\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<x-api-key>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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.orbit.devotel.io/sdk/track")
.header("x-api-key", "<x-api-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"anonymous_id\": \"anon_5f3c2b1a\",\n \"identity\": {\n \"email\": \"ada@example.com\"\n },\n \"events\": [\n {\n \"name\": \"page_viewed\",\n \"properties\": {\n \"url\": \"https://example.com/pricing\",\n \"path\": \"/pricing\"\n },\n \"timestamp\": \"2026-08-09T12:00:00.000Z\"\n },\n {\n \"name\": \"cta_clicked\",\n \"properties\": {\n \"cta\": \"start_trial\"\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.orbit.devotel.io/sdk/track")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<x-api-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"anonymous_id\": \"anon_5f3c2b1a\",\n \"identity\": {\n \"email\": \"ada@example.com\"\n },\n \"events\": [\n {\n \"name\": \"page_viewed\",\n \"properties\": {\n \"url\": \"https://example.com/pricing\",\n \"path\": \"/pricing\"\n },\n \"timestamp\": \"2026-08-09T12:00:00.000Z\"\n },\n {\n \"name\": \"cta_clicked\",\n \"properties\": {\n \"cta\": \"start_trial\"\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"accepted": 2
},
"meta": {
"request_id": "req_1a2b3c4d",
"timestamp": "2026-08-09T12:00:00.000Z"
}
}Authorizations
BearerApiKey
Dashboard JWT token from Clerk
Headers
The tenant public API key with the pk_ prefix.
Body
application/json
⌘I