API ReferenceEvents
Ingest event batch
Receives a batch of analytics events from the server SDK or widget SDK. Events are validated, PII-stripped, and written to ClickHouse.
AuthorizationBearer <token>
Project API key with yav_ prefix. Obtained from the Yavio dashboard.
Used by the server SDK for event ingestion and widget token minting.
In: header
Request Body
application/json
events*array<>
Items
1 <= items <= 1000Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://ingest.yavio.ai/v1/events" \ -H "Content-Type: application/json" \ -d '{ "events": [ { "event_type": "tool_call", "timestamp": "2019-08-24T14:15:22Z", "trace_id": "string", "session_id": "string", "source": "server" } ] }'{
"accepted": 0,
"rejected": 0,
"requestId": "string",
"warnings": [
"string"
]
}{
"accepted": 0,
"rejected": 0,
"errors": [
{
"index": 0,
"issues": [
"string"
]
}
],
"requestId": "string",
"warnings": [
"string"
]
}{
"error": {
"code": "string",
"message": "string",
"status": 0,
"requestId": "string",
"metadata": {}
}
}{
"error": {
"code": "string",
"message": "string",
"status": 0,
"requestId": "string",
"metadata": {}
}
}{
"error": {
"code": "string",
"message": "string",
"status": 0,
"requestId": "string",
"metadata": {}
}
}{
"error": {
"code": "string",
"message": "string",
"status": 0,
"requestId": "string",
"metadata": {}
}
}{
"error": {
"code": "string",
"message": "string",
"status": 0,
"requestId": "string",
"metadata": {}
}
}