Skip to main content
POST

Description

Records user behavior that powers personalization, attribution, analytics, and model training. event_id must be the non-zero integer shown for an event in your dashboard. Event names such as "click" are display labels and are not accepted as identifiers.

Request

Camel-case aliases userId, itemId, eventId, contextId, sessionId, and requestId remain available, but all identifier aliases carry the same integer values. Event batches are capped at 200 events per request by default.

Response

The response also returns ingestion stats (inserted, processed, session) and an embedding_refresh block describing the async user-embedding refresh job that was enqueued for the affected users.

Errors

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Body

application/json

A user ID, a non-zero dashboard event_id, and a positive NSL-generated item_id are required. context_id is also a positive NSL-generated integer when supplied.

user_id
string

End-user identifier.

Example:

"user-abc123"

userId
string

CamelCase alias for user_id.

item_id
integer

Item ID returned by NSL ingestion.

Required range: x >= 1
Example:

3187

itemId
integer

CamelCase alias for item_id.

Required range: x >= 1
event_id
integer

Non-zero event ID shown in dashboard Event configuration.

eventId
integer

CamelCase alias for event_id.

session_id
string

Optional session identifier.

sessionId
string

CamelCase alias for session_id.

request_id
string<uuid>

Recommendation request ID to attribute this event to.

requestId
string<uuid>

CamelCase alias for request_id.

context_id
integer

Optional context ID created in the dashboard.

Required range: x >= 1
Example:

101

contextId
integer

CamelCase alias for context_id.

Required range: x >= 1
Example:

101

placement
string

Surface or placement where the event happened.

Example:

"home_feed"

metadata
object

Arbitrary JSON object used for filtering, ranking, and debugging.

Example:
occurred_at

Event occurrence timestamp. Numeric values below 1e12 are interpreted as Unix seconds.

Example:

1777478400

occurredAt

CamelCase alias for occurred_at.

timestamp

Legacy timestamp alias.

client_ts

Legacy client timestamp alias.

clientTs

CamelCase alias for client_ts.

Response

Inserted events

object
enum<string>
required
Available options:
list
data
object[]
required
has_more
boolean
required
url
string
required
inserted
integer
required
Required range: x >= 0
processed
integer
required
Required range: x >= 0
session
object
required
embedding_refresh
object
required
next_cursor
string | null