Ingest Event Batch
POST
/api/v1/ingest/batch
const url = 'https://example.com/api/v1/ingest/batch';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"events":[{"event_name":"page_view","platform":"web","user_id":"user_12345"}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/ingest/batch \ --header 'Content-Type: application/json' \ --data '{ "events": [ { "event_name": "page_view", "platform": "web", "user_id": "user_12345" } ] }'Ingest a batch of analytics events.
More efficient for SDK clients to send events in batches.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
EventBatch
Batch of analytics events.
Used for efficient bulk ingestion from SDKs.
object
batch_id
Batch Id
Batch identifier
string format: uuid
events
required
Events
Array<object>
AnalyticsEventCore analytics event model.
This represents a single trackable event from any platform.
object
event_id
Event Id
Unique event identifier
string format: uuid
event_name
required
Event Name
Event name
string
user_id
required
User Id
User identifier
string
timestamp
Timestamp
Event timestamp
string format: date-time
platform
required
Platform
Platform where event occurred
string
app_version
App Version
Application version
string
sdk_version
Sdk Version
SDK version
string
properties
Properties
Custom event properties
object
key
additional properties
any
Example
{ "event_name": "page_view", "platform": "web", "properties": { "page_url": "https://example.com/products", "page_title": "Products", "referrer": "https://google.com" }, "user_id": "user_12345"}sent_at
Sent At
Batch send timestamp
string format: date-time
Example
{ "events": [ { "event_name": "page_view", "platform": "web", "user_id": "user_12345" } ]}Responses
Section titled “Responses”Successful Response
Media typeapplication/json
IngestionResponse
Response model for event ingestion.
object
success
required
Success
boolean
events_received
required
Events Received
integer
events_published
Events Published
integer
message
required
Message
string
Example
{ "events_published": 0}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}