Skip to main content

POST /api/events

Receives batched events from the Solute SDK. This is the primary endpoint for event ingestion.

Request

Headers

string
required
application/json
string
required
Your API key

Body

Array<Event>
required
Array of events to process. Each event has the following structure:
string
required
ISO 8601 timestamp when the batch was sent

Event Object

'track' | 'identify' | 'page' | 'group' | 'alias'
required
Event type
string
required
ISO 8601 timestamp
string
User ID (if user is identified)
string
Anonymous ID
string
required
UUID for deduplication
object
required
Event context including page info, user agent, screen, locale, library, and session ID
string
Event name (for ‘track’ events)
object
Event properties (for ‘track’ events)
object
User traits (for ‘identify’ events)
string
Page name (for ‘page’ events)
string
Page category (for ‘page’ events)
string
Group ID (for ‘group’ events)
string
Previous user ID (for ‘alias’ events)

Example Request

Response

Success Response

boolean
required
true if the request was successful
number
required
Number of events successfully processed
number
Number of events that failed to process
Array<{ index: number; error: string }>
Array of errors for failed events

Example Response

Best Practices

Use the messageId field to deduplicate events. Store processed message IDs and reject duplicates.
Accept batches of up to 100 events. Process them asynchronously and return 200 immediately.
Validate event schemas before processing. Return validation errors for invalid events.
Process events asynchronously. Don’t block the response waiting for event processing to complete.

Feature Flags Endpoint

Identify Endpoint