curl --request POST \
--url https://api.neuronsearchlab.com/v1/events \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"user_id": "user-abc123",
"item_id": 3187,
"context_id": 101,
"event_id": 42,
"request_id": "c7f0d2bb-56b1-4ca7-8f09-84d8e4ed02b4",
"occurred_at": 1777478400,
"metadata": {
"surface": "home_feed",
"amount": 4999,
"currency": "usd"
}
}
'{
"object": "list",
"data": [
{
"id": 12345,
"object": "event",
"user_id": "user-abc123",
"item_id": 3187,
"event_id": 42,
"session_id": null,
"request_id": null,
"context_id": 101,
"placement": null,
"metadata": {
"surface": "home_feed",
"context_id": 101,
"purchase": {
"amount": 4999,
"currency": "usd"
}
},
"occurred_at": 1777478400,
"created": 1777478405
}
],
"has_more": false,
"url": "/v1/events",
"inserted": 1,
"processed": 1,
"session": {
"with_session_id": 0,
"with_request_id": 0
},
"embedding_refresh": {
"users_in_batch": 1,
"enqueued": true,
"mode": "async",
"min_seconds": 30
}
}Submit events
Submit user interaction events.
curl --request POST \
--url https://api.neuronsearchlab.com/v1/events \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"user_id": "user-abc123",
"item_id": 3187,
"context_id": 101,
"event_id": 42,
"request_id": "c7f0d2bb-56b1-4ca7-8f09-84d8e4ed02b4",
"occurred_at": 1777478400,
"metadata": {
"surface": "home_feed",
"amount": 4999,
"currency": "usd"
}
}
'{
"object": "list",
"data": [
{
"id": 12345,
"object": "event",
"user_id": "user-abc123",
"item_id": 3187,
"event_id": 42,
"session_id": null,
"request_id": null,
"context_id": 101,
"placement": null,
"metadata": {
"surface": "home_feed",
"context_id": 101,
"purchase": {
"amount": 4999,
"currency": "usd"
}
},
"occurred_at": 1777478400,
"created": 1777478405
}
],
"has_more": false,
"url": "/v1/events",
"inserted": 1,
"processed": 1,
"session": {
"with_session_id": 0,
"with_request_id": 0
},
"embedding_refresh": {
"users_in_batch": 1,
"enqueued": true,
"mode": "async",
"min_seconds": 30
}
}user_id, the NSL integer item_id, and the non-zero integer event-type ID shown in Data → Events. Built-in event-type IDs can be negative.
{
"user_id": "user-123",
"item_id": 3187,
"event_id": 42,
"context_id": 101,
"request_id": "c7f0d2bb-56b1-4ca7-8f09-84d8e4ed02b4",
"session_id": "visit-456"
}
Attribution and retries
Copyrequest_id from the list the user acted on. Use occurred_at in Unix seconds for delayed or historical events. Reuse a deduplication_id only for retries of the same occurrence. Check the returned inserted and processed counts; additional diagnostic fields may be present.
Search events
A search event has a non-emptyquery and no item_id. Its event_id can be omitted to use the workspace’s Search signal binding. Include result_item_ids when your own search engine displayed results; those IDs do not count as clicked items.
Use Search to record a search and fetch results in one call. See Events for signal configuration, batching and delivery behaviour.Authorizations
Body
- object
- object[]
A user ID is always required. An item event needs a non-zero dashboard event_id and a positive NSL-generated item_id. A search event sends a query and no item_id; its event_id is optional and defaults to the event your search signal is bound to. context_id is a positive NSL-generated integer when supplied.
What the user searched for. An event with a query and no item_id is a search event: it steers the user's recommendations by the weight of its event type, and event_id defaults to the event your search signal is bound to. With an item_id, the query is kept on the item event as the search the user reached it from. Longer queries are cut to 256 characters.
256"waterproof trail shoes"
The anonymous visitor ID on the device that sent the event: a browser's first-party ID or an app's install ID. Kept on the event after Identify links the visitor to a user, so the console can show which device each event came from.
255"aid_7f3c2b91e0"
Response
Inserted events
Was this page helpful?

