Endpoints
| Method | Endpoint | Description |
|---|---|---|
POST | /v1/events | Send single event |
POST | /v1/events/batch | Send multiple events |
Event types
Engagement events
| Event | Trigger | Required Fields |
|---|---|---|
impression | Content appears in viewport | contentId, position |
playStart | Playback begins | contentId, startupTime |
watchProgress | Periodic progress update | contentId, currentTime, duration |
completion | Video completes | contentId, watchTime, looped |
swipe | User swipes to next | fromContentId, toContentId, watchTime |
like | User likes content | contentId |
share | User shares content | contentId, platform |
save | User saves content | contentId |
Quality events
| Event | Trigger | Required Fields |
|---|---|---|
rebuffer | Playback stalls | contentId, duration, currentTime |
qualityChange | Rendition changes | contentId, fromQuality, toQuality |
error | Playback error | contentId, errorCode, errorMessage |
Send event
Send a single engagement event.Request body
Event type (e.g.,
impression, playStart).Content ID the event relates to.
Identified user ID (if available).
Device identifier.
Session identifier for grouping events.
Event timestamp (ISO 8601). Defaults to server time.
Event-specific data.
Example: Impression event
Example: Play start event
Example: Completion event
Example: Swipe event
Response
Batch events
Send multiple events in a single request for efficiency.Request body
Array of events (max 100 per request).
Example request
Response
Event data schemas
Impression data
| Field | Type | Description |
|---|---|---|
position | integer | Position in feed (0-indexed) |
entryPoint | string | Entry point: feed, search, direct, share |
feedId | string | Feed session ID |
PlayStart data
| Field | Type | Description |
|---|---|---|
startupTime | integer | Time to first frame (ms) |
rendition | string | Initial quality |
codec | string | Video codec used |
autoplay | boolean | Whether autoplay triggered |
WatchProgress data
| Field | Type | Description |
|---|---|---|
currentTime | number | Current playback position |
duration | number | Total duration |
percentComplete | number | Percentage watched |
rendition | string | Current quality |
Completion data
| Field | Type | Description |
|---|---|---|
watchTime | number | Total watch time |
looped | boolean | Whether video looped |
loopCount | integer | Number of loops |
Rebuffer data
| Field | Type | Description |
|---|---|---|
duration | integer | Rebuffer duration (ms) |
currentTime | number | Playback position when stall occurred |
rendition | string | Quality when stall occurred |
SDK integration
SDKs automatically send events. You can also send custom events:- iOS
- Android
- React Native
Event batching
The SDK batches events for efficiency:| Setting | Default | Description |
|---|---|---|
batchSize | 10 | Events before flush |
batchInterval | 5000ms | Max time before flush |
flushOnBackground | true | Flush when app backgrounds |
Validation
Events are validated server-side:| Validation | Behavior |
|---|---|
| Missing required fields | Event rejected |
| Invalid contentId | Event rejected |
| Future timestamp (>5 min) | Timestamp adjusted |
| Duplicate eventId | Event deduplicated |
Best practices
Use batch endpoint for high-volume apps
Use batch endpoint for high-volume apps
Reduce API calls by batching events. The SDK handles this automatically.
Include sessionId for accurate analytics
Include sessionId for accurate analytics
Session IDs group events from a single viewing session, enabling accurate session-level analytics.
Send events promptly
Send events promptly
Events older than 24 hours may not be processed. The SDK flushes on app background.
Handle offline gracefully
Handle offline gracefully
The SDK queues events when offline and retries when connectivity returns.
