Skip to content

Events Endpoint

Submits a batch of analytics events for processing. SDKs should buffer events locally and flush them periodically rather than sending one event per request.

POST /events
{
"events": [
{
"type": "Evaluation",
"flagKey": "dark-mode",
"userId": "user-123",
"variation": "on",
"timestamp": "2026-02-16T15:30:00Z",
"metadata": {}
}
]
}
FieldTypeRequiredDescription
eventsSdkEventDto[]YesArray of events to record
FieldTypeRequiredDescription
typestringYesEvent type (see below)
flagKeystringYesAssociated flag key
userIdstringNoUser identifier
variationstringNoVariation key involved
timestampstringYesISO 8601 timestamp (UTC)
metadataobjectNoArbitrary key-value pairs
TypeDescription
EvaluationA flag was evaluated
ImpressionA flag value was exposed to a user
IdentifyA user was identified
CustomA custom tracking event

Returns 202 Accepted with an empty body. Events are queued for asynchronous processing.

  • 401 Unauthorized — Invalid or missing SDK key.
  • Buffer events in memory and flush them on a timer (e.g., every 30 seconds) and when the buffer reaches a size threshold (e.g., 100 events).
  • Flush remaining events when the client is closed.
  • If a flush fails, retain the events and retry on the next interval.