Skip to content

Record analytics events

POST
/api/v1/analytics/events
curl --request POST \
--url https://api.ultimateteam.ai/api/v1/analytics/events \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <X-API-Key>' \
--data '{ "events": [ { "event_type": "example", "feature": "example", "metadata": {}, "session_id": "example", "timestamp": 1 } ] }'

Accept a batch of analytics events (1-50). Authenticated.

Media typeapplication/json
BatchEventsRequest

Request body for batch event recording.

Attributes: events: List of analytics events (1-50).

object
events
required
Events

Batch of events (1-50)

Array<object>
>= 1 items <= 50 items
AnalyticsEvent

A single analytics event in a batch.

Attributes: event_type: Type of event (page_view, feature_use, session_start, session_end). feature: Feature name (required for feature_use events). timestamp: Unix epoch timestamp of the event. metadata: Optional extra metadata. session_id: Session identifier (required for session_start/session_end).

object
event_type
required
Event Type

Event type

string
>= 1 characters
feature
Any of:
string
metadata
Any of:
object
key
additional properties
any
session_id
Any of:
string
timestamp
required
Timestamp

Unix epoch timestamp

integer
Examplegenerated
{
"events": [
{
"event_type": "example",
"feature": "example",
"metadata": {},
"session_id": "example",
"timestamp": 1
}
]
}

Successful Response

Media typeapplication/json
Response Record Events Api V1 Analytics Events Post
object
key
additional properties
integer
Examplegenerated
{
"additionalProperty": 1
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{
"detail": [
{
"ctx": {},
"input": "example",
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}