Record an event
Record a customer action or update customer properties.
https://i.nuxie.ai/eventRecord a customer action, update customer properties, or send an event used by an Experience trigger. Use a stable UUID so retries do not record the action twice.
Request body
apiKeybodystringrequiredPublishable key for the app platform. A pk_test_ key selects test data; a pk_live_ key selects live data. Copy it from Connect your app.
eventbodystringrequiredNon-empty event name. Names starting with $ are system events, recorded by the SDK and platform.
distinct_idbodystringrequiredThe identified or anonymous customer ID your app supplies to the SDK, rather than Nuxie’s internal customer record ID. See Customer identifiers.
propertiesbodyobjectValues describing this event. Supports the customer-property directives below.
timestampbodystringISO 8601 timestamp for when the event happened.
uuidbodystringValid UUID for the event. Required unless you supply idempotency_key; reuse the same value for retries.
idempotency_keybodystringAlternative to uuid, also a valid UUID.
valuebodynumberNumeric value associated with the event.
entityIdbodystringEntity identifier for entity-scoped Feature activity.
$anon_distinct_idbodystringPrior anonymous identity during an identify merge.
Customer properties
An event’s properties describe that occurrence. These directives inside properties also update the customer profile:
| Directive | Value | Behavior |
|---|---|---|
$set |
Object | Set or replace customer properties |
$set_once |
Object | Set properties only when they don’t already exist |
$unset |
Array of property names | Remove customer properties |
$increment |
Object of numeric amounts | Add each amount to the current numeric value, starting from zero when absent |
For example:
{
"source": "settings",
"$set": { "plan": "pro" },
"$set_once": { "signup_source": "referral" },
"$unset": ["onboarding_step"],
"$increment": { "exports_created": 1 }
}
Use one directive per property in a request. See Customer properties for targeting with these values.
Response
statusstringrequiredok for an accepted ordinary app event.
eventIdstringrequiredEvent UUID.
customerIdHintstringrequiredNuxie customer record hint; keep using your own customer ID in requests.
acceptedintegerrequiredNumber of accepted events: 1.
queuedbooleanrequiredtrue confirms the event was accepted for processing.
payloadobjectrequiredSupported event fields after normalization.
Customer profiles, analytics, and server-side delivery update as the event is processed. The response confirms receipt, rather than completion of those updates.
Reuse the event UUID if a request times out. A new UUID records another occurrence. To change paid access or spend units, use the purchase and Feature usage endpoints; an analytics event alone does not authorize those changes.