curl --request POST \
--url https://api.inflection.io/v2/product-events/batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"events": [
{
"eventId": "event-123",
"userId": "user-42",
"eventName": "Viewed Page",
"timestamp": "2026-10-21T12:00:00Z",
"properties": {
"page": "/pricing"
}
},
{
"eventId": "event-124",
"userId": "user-42",
"eventName": "Started Trial",
"timestamp": 1792584060000
}
]
}
'import requests
url = "https://api.inflection.io/v2/product-events/batch"
payload = { "events": [
{
"eventId": "event-123",
"userId": "user-42",
"eventName": "Viewed Page",
"timestamp": "2026-10-21T12:00:00Z",
"properties": { "page": "/pricing" }
},
{
"eventId": "event-124",
"userId": "user-42",
"eventName": "Started Trial",
"timestamp": 1792584060000
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
events: [
{
eventId: 'event-123',
userId: 'user-42',
eventName: 'Viewed Page',
timestamp: '2026-10-21T12:00:00Z',
properties: {page: '/pricing'}
},
{
eventId: 'event-124',
userId: 'user-42',
eventName: 'Started Trial',
timestamp: 1792584060000
}
]
})
};
fetch('https://api.inflection.io/v2/product-events/batch', 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.inflection.io/v2/product-events/batch",
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' => [
[
'eventId' => 'event-123',
'userId' => 'user-42',
'eventName' => 'Viewed Page',
'timestamp' => '2026-10-21T12:00:00Z',
'properties' => [
'page' => '/pricing'
]
],
[
'eventId' => 'event-124',
'userId' => 'user-42',
'eventName' => 'Started Trial',
'timestamp' => 1792584060000
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.inflection.io/v2/product-events/batch"
payload := strings.NewReader("{\n \"events\": [\n {\n \"eventId\": \"event-123\",\n \"userId\": \"user-42\",\n \"eventName\": \"Viewed Page\",\n \"timestamp\": \"2026-10-21T12:00:00Z\",\n \"properties\": {\n \"page\": \"/pricing\"\n }\n },\n {\n \"eventId\": \"event-124\",\n \"userId\": \"user-42\",\n \"eventName\": \"Started Trial\",\n \"timestamp\": 1792584060000\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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.inflection.io/v2/product-events/batch")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"events\": [\n {\n \"eventId\": \"event-123\",\n \"userId\": \"user-42\",\n \"eventName\": \"Viewed Page\",\n \"timestamp\": \"2026-10-21T12:00:00Z\",\n \"properties\": {\n \"page\": \"/pricing\"\n }\n },\n {\n \"eventId\": \"event-124\",\n \"userId\": \"user-42\",\n \"eventName\": \"Started Trial\",\n \"timestamp\": 1792584060000\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.inflection.io/v2/product-events/batch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"events\": [\n {\n \"eventId\": \"event-123\",\n \"userId\": \"user-42\",\n \"eventName\": \"Viewed Page\",\n \"timestamp\": \"2026-10-21T12:00:00Z\",\n \"properties\": {\n \"page\": \"/pricing\"\n }\n },\n {\n \"eventId\": \"event-124\",\n \"userId\": \"user-42\",\n \"eventName\": \"Started Trial\",\n \"timestamp\": 1792584060000\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"meta": {
"status": "SUCCESS",
"timestamp": "2026-10-21T12:00:00.000Z",
"correlationId": "4d36e05b-21ab-4633-b811-cf4f1ad8f72c"
}
}Submit a batch of product events
Validates up to 5,000 events independently and preserves their original
indexes in error paths. Requires WRITE access for Personal Access Tokens
and write-capable OAuth users. The body is limited to 20 MiB
and each event to 256 KiB of UTF-8 JSON. A 202 response can be SUCCESS
or PARTIAL_SUCCESS; rejected events are listed in errors while accepted
events are durably queued. This request consumes 2,000
Product Activity rate-limit units.
curl --request POST \
--url https://api.inflection.io/v2/product-events/batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"events": [
{
"eventId": "event-123",
"userId": "user-42",
"eventName": "Viewed Page",
"timestamp": "2026-10-21T12:00:00Z",
"properties": {
"page": "/pricing"
}
},
{
"eventId": "event-124",
"userId": "user-42",
"eventName": "Started Trial",
"timestamp": 1792584060000
}
]
}
'import requests
url = "https://api.inflection.io/v2/product-events/batch"
payload = { "events": [
{
"eventId": "event-123",
"userId": "user-42",
"eventName": "Viewed Page",
"timestamp": "2026-10-21T12:00:00Z",
"properties": { "page": "/pricing" }
},
{
"eventId": "event-124",
"userId": "user-42",
"eventName": "Started Trial",
"timestamp": 1792584060000
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
events: [
{
eventId: 'event-123',
userId: 'user-42',
eventName: 'Viewed Page',
timestamp: '2026-10-21T12:00:00Z',
properties: {page: '/pricing'}
},
{
eventId: 'event-124',
userId: 'user-42',
eventName: 'Started Trial',
timestamp: 1792584060000
}
]
})
};
fetch('https://api.inflection.io/v2/product-events/batch', 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.inflection.io/v2/product-events/batch",
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' => [
[
'eventId' => 'event-123',
'userId' => 'user-42',
'eventName' => 'Viewed Page',
'timestamp' => '2026-10-21T12:00:00Z',
'properties' => [
'page' => '/pricing'
]
],
[
'eventId' => 'event-124',
'userId' => 'user-42',
'eventName' => 'Started Trial',
'timestamp' => 1792584060000
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.inflection.io/v2/product-events/batch"
payload := strings.NewReader("{\n \"events\": [\n {\n \"eventId\": \"event-123\",\n \"userId\": \"user-42\",\n \"eventName\": \"Viewed Page\",\n \"timestamp\": \"2026-10-21T12:00:00Z\",\n \"properties\": {\n \"page\": \"/pricing\"\n }\n },\n {\n \"eventId\": \"event-124\",\n \"userId\": \"user-42\",\n \"eventName\": \"Started Trial\",\n \"timestamp\": 1792584060000\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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.inflection.io/v2/product-events/batch")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"events\": [\n {\n \"eventId\": \"event-123\",\n \"userId\": \"user-42\",\n \"eventName\": \"Viewed Page\",\n \"timestamp\": \"2026-10-21T12:00:00Z\",\n \"properties\": {\n \"page\": \"/pricing\"\n }\n },\n {\n \"eventId\": \"event-124\",\n \"userId\": \"user-42\",\n \"eventName\": \"Started Trial\",\n \"timestamp\": 1792584060000\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.inflection.io/v2/product-events/batch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"events\": [\n {\n \"eventId\": \"event-123\",\n \"userId\": \"user-42\",\n \"eventName\": \"Viewed Page\",\n \"timestamp\": \"2026-10-21T12:00:00Z\",\n \"properties\": {\n \"page\": \"/pricing\"\n }\n },\n {\n \"eventId\": \"event-124\",\n \"userId\": \"user-42\",\n \"eventName\": \"Started Trial\",\n \"timestamp\": 1792584060000\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"meta": {
"status": "SUCCESS",
"timestamp": "2026-10-21T12:00:00.000Z",
"correlationId": "4d36e05b-21ab-4633-b811-cf4f1ad8f72c"
}
}Authorizations
Body
Response
SUCCESS: every event was accepted. PARTIAL_SUCCESS (batch only): at least
one event was accepted and the rejected ones are listed in errors.
Contains only errors and metadata; accepted events are not listed individually.
Missing required fields are grouped into one INVALID_SCHEMA error; a null
value counts as missing for required fields. Optional properties must be an
object when present. If no required fields are missing, unknown fields are
grouped the same way. Otherwise only the first validation failure is returned.
Each failed event produces at most one public error.
Was this page helpful?