Skip to main content

Log Events

The Log Events API allows you to send user events and properties to Auxia for real-time processing.

Events sent through this API are used for treatment targeting, eligibility evaluation, and personalization.

info

The API key for Log Events is separate from other Auxia APIs. Please contact Auxia to obtain your Log Events API key.

API Definition

POST https://apis.auxia.io/v1/LogEvents

Path Parameters

NameTypeDescription
api-keyString

A string API key that is issued to each project or company that uses Auxia. This key should have permission to call this API. This can be either set in the request parameters or in the header.

Headers

NameTypeDescription
x-api-keyString

A string API key that is issued to each project or company that uses Auxia. This API key should have permission to call this API. This can be either set in the request parameters or the header.

Content-TypeStringapplication/json

Raw request body

{
"projectId": "1250",
"userId": "user_12345",
"events": [
{
"eventName": "button_click",
"insertId": "evt_67890",
"eventProperties": {
"button_name": {
"stringValue": "submit_button"
},
"clicks_count": {
"longValue": "1"
}
},
"userProperties": {
"subscription_tier": {
"stringValue": "premium"
},
"is_active": {
"booleanValue": true
}
},
"clientEventTimestamp": "2025-10-01T17:20:00Z",
"sessionId": "session_abc123",
"country": "US",
"region": "CA",
"city": "San Francisco",
"deviceId": "device_xyz789",
"appVersionId": "1.2.3"
}
]
}

Example Curl

curl --location --request POST 'https://apis.auxia.io/v1/LogEvents' \
--header 'Content-Type: application/json' \
--header 'x-api-key: *********************' \
--data-raw '{
"projectId": "1250",
"userId": "user_12345",
"events": [
{
"eventName": "button_click",
"insertId": "evt_67890",
"eventProperties": {
"button_name": {
"stringValue": "submit_button"
}
},
"clientEventTimestamp": "2025-10-01T17:20:00Z"
}
]
}'

Response

{ }

Schema reference

Request

Each request should contain events for a single user.

NameData TypeRequired?Description
projectIdStringRequiredYour Auxia project ID. For a given customer, this should always be the same.
userIdStringRequiredUnique identifier for the user. This ID can be joined to events and attributes across Auxia.
eventsArray of ExternalEventRequiredOne or more events for the user. See ExternalEvent below.

ExternalEvent

NameData TypeRequired?Description
eventNameStringRequiredA name identifying the type of event (e.g., button_click, page_view, purchase).
clientEventTimestampString (ISO 8601)RequiredThe timestamp when the event occurred on the client. Format: 2025-10-01T17:20:00Z
insertIdStringOptionalA unique identifier for this event. Auxia uses this to de-duplicate events for the same user. Recommended for ensuring exactly-once processing.
eventPropertiesMap<String, PropertyValue>OptionalKey-value pairs representing data associated with the event. See PropertyValue below for supported value types.
userPropertiesMap<String, PropertyValue>OptionalKey-value pairs representing data associated with the user. These update the user's profile attributes in Auxia.
serverReceivedTimestampString (ISO 8601)OptionalThe timestamp when the event was received by your server. Useful when events are forwarded from a backend.
preLoginTempUserIdStringOptionalIdentifier for the user when they were signed out. Used to merge user activity across signed-out and signed-in sessions.
sessionIdStringOptionalUnique identifier for a single user session.
countryStringOptionalCountry of the user (e.g., US, JP).
regionStringOptionalRegion of the user (e.g., CA, NY).
cityStringOptionalCity of the user (e.g., San Francisco).
ipAddressStringOptionalIP address of the user.
deviceIdStringOptionalUnique identifier for the user's device.
appVersionIdStringOptionalVersion of the app that generated the event (e.g., 1.2.3).

PropertyValue

Each property value must contain exactly one of the following types:

note

longValue is serialized as a string in JSON to preserve precision (e.g., "1" not 1). This is standard protobuf JSON serialization behavior for 64-bit integers.

NameData TypeDescription
longValueInt64Integer value.
doubleValueDoubleFloating-point value.
stringValueStringString value.
booleanValueBooleanBoolean value (true or false).
timestampValueString (ISO 8601)Timestamp value.

Response

An empty response ({ }) indicates that the request completed successfully.

On failure, standard HTTP status codes are returned with a description of the error.

Status CodeDescription
400Bad Request — Missing required fields or invalid data format.
401Unauthorized — Invalid or missing API key.
500Internal Server Error — An unexpected error occurred. Retry the request.

Usage notes

  • This API is designed for real-time, per-user event ingestion. Each request should contain events for a single user.
  • For best results, send events as close to real-time as possible.
  • Use insertId to ensure idempotent event delivery when retrying failed requests.
  • userProperties sent with events will update the user's profile in Auxia, making them available for treatment targeting and personalization.