Ingest customer activity events
curl --request POST \
--url https://app.outlit.ai/api/i/v1/{publicKey}/events \
--header 'Content-Type: application/json' \
--data '
{
"events": [
{
"type": "<string>",
"timestamp": 123,
"url": "<string>",
"path": "<string>",
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"referrer": "<string>",
"utm": {
"source": "<string>",
"medium": "<string>",
"campaign": "<string>",
"term": "<string>",
"content": "<string>",
"ref": "<string>"
},
"customerId": "<string>",
"customerTraits": {},
"title": "<string>"
}
],
"visitorId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fingerprint": "<string>",
"source": "client",
"sessionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"userIdentity": {
"email": "jsmith@example.com",
"userId": "<string>",
"fingerprint": "<string>",
"traits": {}
},
"customerIdentity": {
"customerId": "<string>",
"customerTraits": {}
}
}
'import requests
url = "https://app.outlit.ai/api/i/v1/{publicKey}/events"
payload = {
"events": [
{
"type": "<string>",
"timestamp": 123,
"url": "<string>",
"path": "<string>",
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"referrer": "<string>",
"utm": {
"source": "<string>",
"medium": "<string>",
"campaign": "<string>",
"term": "<string>",
"content": "<string>",
"ref": "<string>"
},
"customerId": "<string>",
"customerTraits": {},
"title": "<string>"
}
],
"visitorId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fingerprint": "<string>",
"source": "client",
"sessionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"userIdentity": {
"email": "jsmith@example.com",
"userId": "<string>",
"fingerprint": "<string>",
"traits": {}
},
"customerIdentity": {
"customerId": "<string>",
"customerTraits": {}
}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
events: [
{
type: '<string>',
timestamp: 123,
url: '<string>',
path: '<string>',
uuid: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
referrer: '<string>',
utm: {
source: '<string>',
medium: '<string>',
campaign: '<string>',
term: '<string>',
content: '<string>',
ref: '<string>'
},
customerId: '<string>',
customerTraits: {},
title: '<string>'
}
],
visitorId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
fingerprint: '<string>',
source: 'client',
sessionId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
userIdentity: {
email: 'jsmith@example.com',
userId: '<string>',
fingerprint: '<string>',
traits: {}
},
customerIdentity: {customerId: '<string>', customerTraits: {}}
})
};
fetch('https://app.outlit.ai/api/i/v1/{publicKey}/events', 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://app.outlit.ai/api/i/v1/{publicKey}/events",
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([
'events' => [
[
'type' => '<string>',
'timestamp' => 123,
'url' => '<string>',
'path' => '<string>',
'uuid' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'referrer' => '<string>',
'utm' => [
'source' => '<string>',
'medium' => '<string>',
'campaign' => '<string>',
'term' => '<string>',
'content' => '<string>',
'ref' => '<string>'
],
'customerId' => '<string>',
'customerTraits' => [
],
'title' => '<string>'
]
],
'visitorId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'fingerprint' => '<string>',
'source' => 'client',
'sessionId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'userIdentity' => [
'email' => 'jsmith@example.com',
'userId' => '<string>',
'fingerprint' => '<string>',
'traits' => [
]
],
'customerIdentity' => [
'customerId' => '<string>',
'customerTraits' => [
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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://app.outlit.ai/api/i/v1/{publicKey}/events"
payload := strings.NewReader("{\n \"events\": [\n {\n \"type\": \"<string>\",\n \"timestamp\": 123,\n \"url\": \"<string>\",\n \"path\": \"<string>\",\n \"uuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"referrer\": \"<string>\",\n \"utm\": {\n \"source\": \"<string>\",\n \"medium\": \"<string>\",\n \"campaign\": \"<string>\",\n \"term\": \"<string>\",\n \"content\": \"<string>\",\n \"ref\": \"<string>\"\n },\n \"customerId\": \"<string>\",\n \"customerTraits\": {},\n \"title\": \"<string>\"\n }\n ],\n \"visitorId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"fingerprint\": \"<string>\",\n \"source\": \"client\",\n \"sessionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"userIdentity\": {\n \"email\": \"jsmith@example.com\",\n \"userId\": \"<string>\",\n \"fingerprint\": \"<string>\",\n \"traits\": {}\n },\n \"customerIdentity\": {\n \"customerId\": \"<string>\",\n \"customerTraits\": {}\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
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://app.outlit.ai/api/i/v1/{publicKey}/events")
.header("Content-Type", "application/json")
.body("{\n \"events\": [\n {\n \"type\": \"<string>\",\n \"timestamp\": 123,\n \"url\": \"<string>\",\n \"path\": \"<string>\",\n \"uuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"referrer\": \"<string>\",\n \"utm\": {\n \"source\": \"<string>\",\n \"medium\": \"<string>\",\n \"campaign\": \"<string>\",\n \"term\": \"<string>\",\n \"content\": \"<string>\",\n \"ref\": \"<string>\"\n },\n \"customerId\": \"<string>\",\n \"customerTraits\": {},\n \"title\": \"<string>\"\n }\n ],\n \"visitorId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"fingerprint\": \"<string>\",\n \"source\": \"client\",\n \"sessionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"userIdentity\": {\n \"email\": \"jsmith@example.com\",\n \"userId\": \"<string>\",\n \"fingerprint\": \"<string>\",\n \"traits\": {}\n },\n \"customerIdentity\": {\n \"customerId\": \"<string>\",\n \"customerTraits\": {}\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.outlit.ai/api/i/v1/{publicKey}/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"events\": [\n {\n \"type\": \"<string>\",\n \"timestamp\": 123,\n \"url\": \"<string>\",\n \"path\": \"<string>\",\n \"uuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"referrer\": \"<string>\",\n \"utm\": {\n \"source\": \"<string>\",\n \"medium\": \"<string>\",\n \"campaign\": \"<string>\",\n \"term\": \"<string>\",\n \"content\": \"<string>\",\n \"ref\": \"<string>\"\n },\n \"customerId\": \"<string>\",\n \"customerTraits\": {},\n \"title\": \"<string>\"\n }\n ],\n \"visitorId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"fingerprint\": \"<string>\",\n \"source\": \"client\",\n \"sessionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"userIdentity\": {\n \"email\": \"jsmith@example.com\",\n \"userId\": \"<string>\",\n \"fingerprint\": \"<string>\",\n \"traits\": {}\n },\n \"customerIdentity\": {\n \"customerId\": \"<string>\",\n \"customerTraits\": {}\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"processed": 4503599627370495,
"errors": [
{
"index": 0,
"message": "<string>"
}
]
}{
"success": true,
"processed": 4503599627370495,
"errors": [
{
"index": 0,
"message": "<string>"
}
]
}{
"success": true,
"processed": 4503599627370495,
"errors": [
{
"index": 0,
"message": "<string>"
}
]
}{
"success": true,
"processed": 4503599627370495,
"errors": [
{
"index": 0,
"message": "<string>"
}
]
}API Reference
Ingest customer activity events
POST
/
api
/
i
/
v1
/
{publicKey}
/
events
Ingest customer activity events
curl --request POST \
--url https://app.outlit.ai/api/i/v1/{publicKey}/events \
--header 'Content-Type: application/json' \
--data '
{
"events": [
{
"type": "<string>",
"timestamp": 123,
"url": "<string>",
"path": "<string>",
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"referrer": "<string>",
"utm": {
"source": "<string>",
"medium": "<string>",
"campaign": "<string>",
"term": "<string>",
"content": "<string>",
"ref": "<string>"
},
"customerId": "<string>",
"customerTraits": {},
"title": "<string>"
}
],
"visitorId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fingerprint": "<string>",
"source": "client",
"sessionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"userIdentity": {
"email": "jsmith@example.com",
"userId": "<string>",
"fingerprint": "<string>",
"traits": {}
},
"customerIdentity": {
"customerId": "<string>",
"customerTraits": {}
}
}
'import requests
url = "https://app.outlit.ai/api/i/v1/{publicKey}/events"
payload = {
"events": [
{
"type": "<string>",
"timestamp": 123,
"url": "<string>",
"path": "<string>",
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"referrer": "<string>",
"utm": {
"source": "<string>",
"medium": "<string>",
"campaign": "<string>",
"term": "<string>",
"content": "<string>",
"ref": "<string>"
},
"customerId": "<string>",
"customerTraits": {},
"title": "<string>"
}
],
"visitorId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fingerprint": "<string>",
"source": "client",
"sessionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"userIdentity": {
"email": "jsmith@example.com",
"userId": "<string>",
"fingerprint": "<string>",
"traits": {}
},
"customerIdentity": {
"customerId": "<string>",
"customerTraits": {}
}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
events: [
{
type: '<string>',
timestamp: 123,
url: '<string>',
path: '<string>',
uuid: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
referrer: '<string>',
utm: {
source: '<string>',
medium: '<string>',
campaign: '<string>',
term: '<string>',
content: '<string>',
ref: '<string>'
},
customerId: '<string>',
customerTraits: {},
title: '<string>'
}
],
visitorId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
fingerprint: '<string>',
source: 'client',
sessionId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
userIdentity: {
email: 'jsmith@example.com',
userId: '<string>',
fingerprint: '<string>',
traits: {}
},
customerIdentity: {customerId: '<string>', customerTraits: {}}
})
};
fetch('https://app.outlit.ai/api/i/v1/{publicKey}/events', 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://app.outlit.ai/api/i/v1/{publicKey}/events",
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([
'events' => [
[
'type' => '<string>',
'timestamp' => 123,
'url' => '<string>',
'path' => '<string>',
'uuid' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'referrer' => '<string>',
'utm' => [
'source' => '<string>',
'medium' => '<string>',
'campaign' => '<string>',
'term' => '<string>',
'content' => '<string>',
'ref' => '<string>'
],
'customerId' => '<string>',
'customerTraits' => [
],
'title' => '<string>'
]
],
'visitorId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'fingerprint' => '<string>',
'source' => 'client',
'sessionId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'userIdentity' => [
'email' => 'jsmith@example.com',
'userId' => '<string>',
'fingerprint' => '<string>',
'traits' => [
]
],
'customerIdentity' => [
'customerId' => '<string>',
'customerTraits' => [
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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://app.outlit.ai/api/i/v1/{publicKey}/events"
payload := strings.NewReader("{\n \"events\": [\n {\n \"type\": \"<string>\",\n \"timestamp\": 123,\n \"url\": \"<string>\",\n \"path\": \"<string>\",\n \"uuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"referrer\": \"<string>\",\n \"utm\": {\n \"source\": \"<string>\",\n \"medium\": \"<string>\",\n \"campaign\": \"<string>\",\n \"term\": \"<string>\",\n \"content\": \"<string>\",\n \"ref\": \"<string>\"\n },\n \"customerId\": \"<string>\",\n \"customerTraits\": {},\n \"title\": \"<string>\"\n }\n ],\n \"visitorId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"fingerprint\": \"<string>\",\n \"source\": \"client\",\n \"sessionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"userIdentity\": {\n \"email\": \"jsmith@example.com\",\n \"userId\": \"<string>\",\n \"fingerprint\": \"<string>\",\n \"traits\": {}\n },\n \"customerIdentity\": {\n \"customerId\": \"<string>\",\n \"customerTraits\": {}\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
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://app.outlit.ai/api/i/v1/{publicKey}/events")
.header("Content-Type", "application/json")
.body("{\n \"events\": [\n {\n \"type\": \"<string>\",\n \"timestamp\": 123,\n \"url\": \"<string>\",\n \"path\": \"<string>\",\n \"uuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"referrer\": \"<string>\",\n \"utm\": {\n \"source\": \"<string>\",\n \"medium\": \"<string>\",\n \"campaign\": \"<string>\",\n \"term\": \"<string>\",\n \"content\": \"<string>\",\n \"ref\": \"<string>\"\n },\n \"customerId\": \"<string>\",\n \"customerTraits\": {},\n \"title\": \"<string>\"\n }\n ],\n \"visitorId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"fingerprint\": \"<string>\",\n \"source\": \"client\",\n \"sessionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"userIdentity\": {\n \"email\": \"jsmith@example.com\",\n \"userId\": \"<string>\",\n \"fingerprint\": \"<string>\",\n \"traits\": {}\n },\n \"customerIdentity\": {\n \"customerId\": \"<string>\",\n \"customerTraits\": {}\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.outlit.ai/api/i/v1/{publicKey}/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"events\": [\n {\n \"type\": \"<string>\",\n \"timestamp\": 123,\n \"url\": \"<string>\",\n \"path\": \"<string>\",\n \"uuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"referrer\": \"<string>\",\n \"utm\": {\n \"source\": \"<string>\",\n \"medium\": \"<string>\",\n \"campaign\": \"<string>\",\n \"term\": \"<string>\",\n \"content\": \"<string>\",\n \"ref\": \"<string>\"\n },\n \"customerId\": \"<string>\",\n \"customerTraits\": {},\n \"title\": \"<string>\"\n }\n ],\n \"visitorId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"fingerprint\": \"<string>\",\n \"source\": \"client\",\n \"sessionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"userIdentity\": {\n \"email\": \"jsmith@example.com\",\n \"userId\": \"<string>\",\n \"fingerprint\": \"<string>\",\n \"traits\": {}\n },\n \"customerIdentity\": {\n \"customerId\": \"<string>\",\n \"customerTraits\": {}\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"processed": 4503599627370495,
"errors": [
{
"index": 0,
"message": "<string>"
}
]
}{
"success": true,
"processed": 4503599627370495,
"errors": [
{
"index": 0,
"message": "<string>"
}
]
}{
"success": true,
"processed": 4503599627370495,
"errors": [
{
"index": 0,
"message": "<string>"
}
]
}{
"success": true,
"processed": 4503599627370495,
"errors": [
{
"index": 0,
"message": "<string>"
}
]
}Path Parameters
Minimum string length:
1Body
application/json
Required array length:
1 - 100 elements- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
Show child attributes
Show child attributes
Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Minimum string length:
1Available options:
client, server, integration Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?
⌘I