
Log Events
Events sent through this API are used for treatment targeting, eligibility evaluation, and personalization.
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
| Name | Type | Description |
|---|---|---|
| api-key | String | 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
| Name | Type | Description |
|---|---|---|
| x-api-key | String | 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-Type | String | application/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.
| Name | Data Type | Required? | Description |
|---|---|---|---|
| projectId | String | Required | Your Auxia project ID. For a given customer, this should always be the same. |
| userId | String | Required | Unique identifier for the user. This ID can be joined to events and attributes across Auxia. |
| events | Array of ExternalEvent | Required | One or more events for the user. See ExternalEvent below. |
ExternalEvent
| Name | Data Type | Required? | Description |
|---|---|---|---|
| eventName | String | Required | A name identifying the type of event (e.g., button_click, page_view, purchase). |
| clientEventTimestamp | String (ISO 8601) | Required | The timestamp when the event occurred on the client. Format: 2025-10-01T17:20:00Z |
| insertId | String | Optional | A unique identifier for this event. Auxia uses this to de-duplicate events for the same user. Recommended for ensuring exactly-once processing. |
| eventProperties | Map<String, PropertyValue> | Optional | Key-value pairs representing data associated with the event. See PropertyValue below for supported value types. |
| userProperties | Map<String, PropertyValue> | Optional | Key-value pairs representing data associated with the user. These update the user's profile attributes in Auxia. |
| serverReceivedTimestamp | String (ISO 8601) | Optional | The timestamp when the event was received by your server. Useful when events are forwarded from a backend. |
| preLoginTempUserId | String | Optional | Identifier for the user when they were signed out. Used to merge user activity across signed-out and signed-in sessions. |
| sessionId | String | Optional | Unique identifier for a single user session. |
| country | String | Optional | Country of the user (e.g., US, JP). |
| region | String | Optional | Region of the user (e.g., CA, NY). |
| city | String | Optional | City of the user (e.g., San Francisco). |
| ipAddress | String | Optional | IP address of the user. |
| deviceId | String | Optional | Unique identifier for the user's device. |
| appVersionId | String | Optional | Version of the app that generated the event (e.g., 1.2.3). |
PropertyValue
Each property value must contain exactly one of the following types:
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.
| Name | Data Type | Description |
|---|---|---|
| longValue | Int64 | Integer value. |
| doubleValue | Double | Floating-point value. |
| stringValue | String | String value. |
| booleanValue | Boolean | Boolean value (true or false). |
| timestampValue | String (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 Code | Description |
|---|---|
| 400 | Bad Request — Missing required fields or invalid data format. |
| 401 | Unauthorized — Invalid or missing API key. |
| 500 | Internal 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
insertIdto ensure idempotent event delivery when retrying failed requests. userPropertiessent with events will update the user's profile in Auxia, making them available for treatment targeting and personalization.