Events
Events are customer behavioral events (such as page views, clicks, or purchases) received from websites, mobile apps, and servers. They can be stored in the workspace's data warehouse and forwarded to applications. You can also import customer data for identity resolution and unification.
These endpoints allow you to ingest events, List events from the data warehouse, get the event schema, and manage event listeners.
Ingest events
This endpoint allows you to ingest a batch of events.
You can also use one of the available SDKs to send events, instead of interacting with this endpoint directly.
Authentication
It supports authentication with both an API key and an event write key:
- For a website or mobile app, you must exclusively use an event write key, as it only provides access to event ingestion endpoints.
- For a server application, using an event write key is recommended if you don't need access to other endpoints.
Alternative payloads
Alternatively, when using an event write key, you can also pass the array of events directly in the request body.
If there is a single event to ingest, you can pass the event object directly, similar to the Ingest event endpoint, but specifying the event type in the request body.
Browser requests and CORS
This endpoint supports cross-origin requests from browsers (CORS) and handle preflight OPTIONS requests, unlike other API endpoints, which are intended for server-to-server use.
If you send events from a website or web application, we recommend using the JavaScript SDK, which automatically manages CORS and authentication details.
If you experience CORS-related errors in the browser, make sure that:
- requests are sent to this event ingestion endpoint;
- you are using an event write key;
- the request is not routed through a proxy or CDN that blocks
OPTIONSrequests.
Request
-
connectionId
int Conditionally RequiredThe ID of the source connection to which the events refer. It can only be a source SDK or webhook connection.
It is required only if the call is authenticated using an API key. If authentication is done with an event write key, it is not needed, as the connection is that of the key.
-
batch
array of object RequiredThe events to ingest.
-
anonymousId
nullable string Conditionally RequiredA unique identifier assigned to a user before authentication, used to track anonymous activity across sessions.
Either
anonymousIdoruserIdmust be provided, and neither can be null or empty. -
channel
stringThe source channel through which the event was received (e.g., web, mobile, server).
-
category
nullable string Conditionally RequiredIt is used to group related pages or screens for analysis and reporting. It is allowed only for page events.
-
context
objectInformation about the environment where the event occurred.
-
context.app
objectThe application that sent the event.
-
context.app.name
stringThe application name.
-
context.app.version
stringThe application version.
-
context.app.build
stringThe application build identifier.
-
context.app.namespace
stringThe application namespace or internal identifier.
-
-
context.browser
objectThe browser from which the event originates.
If not explicitly provided, Krenalis will attempt to infer it from the
context.userAgentproperty, if available.-
context.browser.name
stringThe name of the browser from which the event originated.
Krenalis tries to normalize this field and store it with one of those names:
"Chrome","Safari","Edge","Firefox","Samsung Internet"or"Opera".Otherwise, if the passed browser name cannot be normalized, it is set to
"Other"and the passed name is stored — as is — intocontext.browser.other. -
context.browser.version
stringThe version of the browser from which the event originated.
-
-
context.campaign
objectThe campaign that originated the event.
-
context.campaign.name
stringThe campaign name.
-
context.campaign.source
stringThe campaign source.
-
context.campaign.medium
stringThe campaign medium (e.g. email, social).
-
context.campaign.term
stringThe campaign keyword or term.
-
context.campaign.content
stringThe campaign content or variation.
-
-
context.device
objectThe device from which the event originated.
-
context.device.id
stringThe device identifier.
-
context.device.advertisingId
stringThe advertising identifier.
-
context.device.adTrackingEnabled
booleanIndicates whether ad tracking is enabled.
-
context.device.manufacturer
stringThe device manufacturer.
-
context.device.model
stringThe device model.
-
context.device.name
stringThe device name.
-
context.device.type
stringThe device type (e.g., mobile, desktop).
-
context.device.token
stringThe unique device token.
-
-
context.ip
ipThe IP address associated with the event. If not specified, for JavaScript, Android and iOS connections, the event's IP address is automatically derived from the HTTP request.
The following special values let you change the default behavior and control how the IP address is determined or masked:
-
"255.255.255.255": Use the IP address of the request. -
"255.255.255.0": Use the IP address of the request, masking it with255.255.255.0, which sets the last segment to 0 (e.g.,192.168.45.32→192.168.45.0). Use this for partial anonymization. -
"255.255.0.0": Use the IP address of the request, masking it with255.255.0.0, which sets the last two segments to 0 (e.g.,192.168.45.32→192.168.0.0). Use this for stronger anonymization. -
"0.0.0.0": Don't include an IP address in the event. Use this with JavaScript, Android and iOS connections when no IP address is applicable or when it should not be associated for privacy reasons.
-
-
context.library
objectThe analytics library used to send the event.
-
context.library.name
stringThe name of the analytics library.
-
context.library.version
stringThe version of the analytics library.
-
-
context.locale
stringThe user's language and regional settings, such as
"en-US". -
context.location
objectThe device location from which the event originated. If not explicitly provided, Krenalis attempts to determine it automatically based on the event's IP.
-
context.location.city
stringThe city.
-
context.location.country
stringThe country.
-
context.location.latitude
floatThe latitude.
-
context.location.longitude
floatThe longitude.
-
context.location.speed
floatThe speed at which the device is moving, in meters per second.
-
-
context.network
objectThe network to which the device originating the event is connected.
-
context.network.bluetooth
booleanIndicates whether Bluetooth is active.
-
context.network.carrier
stringThe mobile network carrier name.
-
context.network.cellular
booleanIndicates whether a cellular connection is active.
-
context.network.wifi
booleanIndicates whether Wi-Fi is active.
-
-
context.os
objectThe OS of the device or browser from which the event originated.
If not explicitly provided, Krenalis will attempt to infer it from the
context.userAgentproperty, if available.-
context.os.name
stringThe name of the OS.
Krenalis tries to normalize this field and store it with one of those names:
"Android","Windows","macOS","iOS","Linux"or"Chrome OS".Otherwise, if the passed OS name cannot be normalized, it is set to"Other"and the passed name is stored — as is — intocontext.os.other. -
context.os.version
stringThe version of the OS.
-
-
context.page
objectThe page where the event originated.
-
context.page.path
stringThe page path.
-
context.page.referrer
stringThe referring URL.
-
context.page.search
stringThe URL search parameters.
-
context.page.title
stringThe page title.
-
context.page.url
stringThe full page URL.
-
-
context.referrer
objectThe URL of the page or source that referred the user to the current page.
-
context.referrer.id
stringThe identifier of the referring source (e.g., campaign or partner ID).
-
context.referrer.type
stringThe source category of the referrer (e.g., search, social, email).
-
-
context.screen
objectThe screen of the app where the event was originated.
-
context.screen.width
16 bit intThe screen width. Must be in range [1, 32767].
-
context.screen.height
16 bit intThe screen height. Must be in range [1, 32767].
-
context.screen.density
decimal(3, 2)The screen density. Must be a positive number.
-
-
context.session
objectThe current user session
-
context.session.id
64 bit intThe session identifier.
-
context.session.start
booleanIndicates whether the event starts a session.
-
-
context.sessionId
64 bit intThe session identifier. This field can be passed as an alternative to
context.session.idfor compatibility with RudderStack. -
context.sessionStart
booleanIndicates whether the event started a session. This field can be passed as an alternative to
context.session.startfor compatibility with RudderStack. -
context.timezone
stringThe user's timezone as a tzdata string (e.g., America/New_York).
-
context.userAgent
stringThe device identifier from which the event originates.
-
-
event
string Conditionally RequiredThe name of the user action in a track event. Examples: Product Viewed, Order Completed.
It is required only for track events. For all other types of events, it is not permitted.
-
groupId
nullable string Conditionally RequiredIdentifier of the group (e.g., account, company, organization) associated with the user.
It is required only for group events. For all other types of events, it is not permitted.
-
messageId
nullable stringThe ID that uniquely identifies the event. If it is missing or null, a generated identifier will be used as its value.
-
name
stringThe title of the viewed page or screen in page and screen events.
It is allowed only for page and screen events.
-
properties
jsonA key–value pairs describing contextual details about the event (e.g., product_id, revenue, rating). Distinct from
traits, which describe user attributes.It is allowed only for page, screen, and track events.
-
sentAt
datetimeAn UTC timestamp indicating when the event was sent, in ISO 8601 format. The year must be in the range 1 to 9999.
-
originalTimestamp
nullable datetimeAn UTC timestamp indicating when the event occurred on the client, in ISO 8601 format. The year must be in the range 1 to 9999.
Pass this property if the event occurred in the past.
-
timestamp
nullable datetime Conditionally RequiredAn UTC timestamp indicating when the event occurred, in ISO 8601 format. The year must be in the range 1 to 9999.
It will be adjusted by Krenalis to account for clock drift.
It is required if the property
originalTimestampis present. -
traits
json Conditionally RequiredA key–value pairs containing user information (e.g., name, email, plan).
It is allowed only for identify and group events. You can use
context.traitsfor other types of events. -
type
string RequiredThe event type.
Possible values:"alias","identify","group","page","screen"or"track". -
previousId
string Conditionally RequiredThe user's previous identifier. Not used by Krenalis.
It is required only for alias events. For all other types of events, it is not permitted.
-
userId
nullable string Conditionally RequiredThe unique identifier assigned to a user after authentication. If absent, the user is anonymous.
It is required and cannot be null or empty for identify and alias events. For other event types, either
anonymousIdoruserIdmust be provided, and neither can be null or empty.
-
-
context
objectThis object defines shared context data applied to every event in the batch. If a property appears in both the global context and an event's own context, the event-specific value takes precedence.
-
context.app
objectThe application that sent the event.
-
context.app.name
stringThe application name.
-
context.app.version
stringThe application version.
-
context.app.build
stringThe application build identifier.
-
context.app.namespace
stringThe application namespace or internal identifier.
-
-
context.browser
objectThe browser from which the event originates.
If not explicitly provided, Krenalis will attempt to infer it from the
context.userAgentproperty, if available.-
context.browser.name
stringThe name of the browser from which the event originated.
Krenalis tries to normalize this field and store it with one of those names:
"Chrome","Safari","Edge","Firefox","Samsung Internet"or"Opera".Otherwise, if the passed browser name cannot be normalized, it is set to
"Other"and the passed name is stored — as is — intocontext.browser.other. -
context.browser.version
stringThe version of the browser from which the event originated.
-
-
context.campaign
objectThe campaign that originated the event.
-
context.campaign.name
stringThe campaign name.
-
context.campaign.source
stringThe campaign source.
-
context.campaign.medium
stringThe campaign medium (e.g. email, social).
-
context.campaign.term
stringThe campaign keyword or term.
-
context.campaign.content
stringThe campaign content or variation.
-
-
context.device
objectThe device from which the event originated.
-
context.device.id
stringThe device identifier.
-
context.device.advertisingId
stringThe advertising identifier.
-
context.device.adTrackingEnabled
booleanIndicates whether ad tracking is enabled.
-
context.device.manufacturer
stringThe device manufacturer.
-
context.device.model
stringThe device model.
-
context.device.name
stringThe device name.
-
context.device.type
stringThe device type (e.g., mobile, desktop).
-
context.device.token
stringThe unique device token.
-
-
context.ip
ipThe IP address associated with the event. If not specified, for JavaScript, Android and iOS connections, the event's IP address is automatically derived from the HTTP request.
The following special values let you change the default behavior and control how the IP address is determined or masked:
-
"255.255.255.255": Use the IP address of the request. -
"255.255.255.0": Use the IP address of the request, masking it with255.255.255.0, which sets the last segment to 0 (e.g.,192.168.45.32→192.168.45.0). Use this for partial anonymization. -
"255.255.0.0": Use the IP address of the request, masking it with255.255.0.0, which sets the last two segments to 0 (e.g.,192.168.45.32→192.168.0.0). Use this for stronger anonymization. -
"0.0.0.0": Don't include an IP address in the event. Use this with JavaScript, Android and iOS connections when no IP address is applicable or when it should not be associated for privacy reasons.
-
-
context.library
objectThe analytics library used to send the event.
-
context.library.name
stringThe name of the analytics library.
-
context.library.version
stringThe version of the analytics library.
-
-
context.locale
stringThe user's language and regional settings, such as
"en-US". -
context.location
objectThe device location from which the event originated. If not explicitly provided, Krenalis attempts to determine it automatically based on the event's IP.
-
context.location.city
stringThe city.
-
context.location.country
stringThe country.
-
context.location.latitude
floatThe latitude.
-
context.location.longitude
floatThe longitude.
-
context.location.speed
floatThe speed at which the device is moving, in meters per second.
-
-
context.network
objectThe network to which the device originating the event is connected.
-
context.network.bluetooth
booleanIndicates whether Bluetooth is active.
-
context.network.carrier
stringThe mobile network carrier name.
-
context.network.cellular
booleanIndicates whether a cellular connection is active.
-
context.network.wifi
booleanIndicates whether Wi-Fi is active.
-
-
context.os
objectThe OS of the device or browser from which the event originated.
If not explicitly provided, Krenalis will attempt to infer it from the
context.userAgentproperty, if available.-
context.os.name
stringThe name of the OS.
Krenalis tries to normalize this field and store it with one of those names:
"Android","Windows","macOS","iOS","Linux"or"Chrome OS".Otherwise, if the passed OS name cannot be normalized, it is set to"Other"and the passed name is stored — as is — intocontext.os.other. -
context.os.version
stringThe version of the OS.
-
-
context.page
objectThe page where the event originated.
-
context.page.path
stringThe page path.
-
context.page.referrer
stringThe referring URL.
-
context.page.search
stringThe URL search parameters.
-
context.page.title
stringThe page title.
-
context.page.url
stringThe full page URL.
-
-
context.referrer
objectThe URL of the page or source that referred the user to the current page.
-
context.referrer.id
stringThe identifier of the referring source (e.g., campaign or partner ID).
-
context.referrer.type
stringThe source category of the referrer (e.g., search, social, email).
-
-
context.screen
objectThe screen of the app where the event was originated.
-
context.screen.width
16 bit intThe screen width. Must be in range [1, 32767].
-
context.screen.height
16 bit intThe screen height. Must be in range [1, 32767].
-
context.screen.density
decimal(3, 2)The screen density. Must be a positive number.
-
-
context.session
objectThe current user session
-
context.session.id
64 bit intThe session identifier.
-
context.session.start
booleanIndicates whether the event starts a session.
-
-
context.sessionId
64 bit intThe session identifier. This field can be passed as an alternative to
context.session.idfor compatibility with RudderStack. -
context.sessionStart
booleanIndicates whether the event started a session. This field can be passed as an alternative to
context.session.startfor compatibility with RudderStack. -
context.timezone
stringThe user's timezone as a tzdata string (e.g., America/New_York).
-
context.userAgent
stringThe device identifier from which the event originates.
-
-
sentAt
datetimeAn UTC timestamp indicating when the event was sent, in ISO 8601 format. The year must be in the range 1 to 9999. The sentAt value of each event, if present, overwrites this value.
-
writeKey
stringThe event write key of the connection, which can be used for authentication as an alternative to the Authorization header.
Response
No response.curl https://example.com/v1/events \ -H "Authorization: Bearer api_xxxxxxx" \ --json '{ "connectionId": 1371036433, "batch": [ { "anonymousId": "3e93e10e-5ca0-4a8c-bef6-cf9197b37729", "context": { "page": { "path": "/dashboard", "title": "User Dashboard", "url": "https://app.example.com/dashboard" }, "screen": { "width": 3024, "height": 1964, "density": 2 }, "session": { "id": 1766272512048, "start": true }, "timezone": "America/Los_Angeles", "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 14_5) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.2.1 Safari/605.1.15" }, "event": "Workout Completed", "messageId": "82c8516b-434b-48f4-a32c-a6369e1543fd", "properties": { "workout_type": "Cardio", "duration_minutes": 45, "calories_burned": 380, "device": "Smartwatch" }, "sentAt": "2025-10-20T16:15:24.327Z", "timestamp": "2025-10-20T16:15:24.010Z", "type": "track", "userId": "802661375" } ] }' Ingest event
Ingests a single event.
This endpoint supports authentication only with an event write key. To ingest events with an API key, use the Ingest events endpoint, which supports both authentication methods.
You can also use one of the available SDKs to send events, instead of interacting with this endpoint directly.
Browser requests and CORS
This endpoint supports cross-origin requests from browsers (CORS) and handle preflight OPTIONS requests, unlike other API endpoints, which are intended for server-to-server use.
If you send events from a website or web application, we recommend using the JavaScript SDK, which automatically manages CORS and authentication details.
If you experience CORS-related errors in the browser, make sure that:
- requests are sent to this event ingestion endpoint;
- you are using an event write key;
- the request is not routed through a proxy or CDN that blocks
OPTIONSrequests.
Request
-
:type
string RequiredThe type of the event.
Possible values:"alias","identify","group","page","screen"or"track". -
anonymousId
nullable string Conditionally RequiredA unique identifier assigned to a user before authentication, used to track anonymous activity across sessions.
Either
anonymousIdoruserIdmust be provided, and neither can be null or empty. -
channel
stringThe source channel through which the event was received (e.g., web, mobile, server).
-
category
nullable string Conditionally RequiredIt is used to group related pages or screens for analysis and reporting. It is allowed only for page events.
-
context
objectInformation about the environment where the event occurred.
-
context.app
objectThe application that sent the event.
-
context.app.name
stringThe application name.
-
context.app.version
stringThe application version.
-
context.app.build
stringThe application build identifier.
-
context.app.namespace
stringThe application namespace or internal identifier.
-
-
context.browser
objectThe browser from which the event originates.
If not explicitly provided, Krenalis will attempt to infer it from the
context.userAgentproperty, if available.-
context.browser.name
stringThe name of the browser from which the event originated.
Krenalis tries to normalize this field and store it with one of those names:
"Chrome","Safari","Edge","Firefox","Samsung Internet"or"Opera".Otherwise, if the passed browser name cannot be normalized, it is set to
"Other"and the passed name is stored — as is — intocontext.browser.other. -
context.browser.version
stringThe version of the browser from which the event originated.
-
-
context.campaign
objectThe campaign that originated the event.
-
context.campaign.name
stringThe campaign name.
-
context.campaign.source
stringThe campaign source.
-
context.campaign.medium
stringThe campaign medium (e.g. email, social).
-
context.campaign.term
stringThe campaign keyword or term.
-
context.campaign.content
stringThe campaign content or variation.
-
-
context.device
objectThe device from which the event originated.
-
context.device.id
stringThe device identifier.
-
context.device.advertisingId
stringThe advertising identifier.
-
context.device.adTrackingEnabled
booleanIndicates whether ad tracking is enabled.
-
context.device.manufacturer
stringThe device manufacturer.
-
context.device.model
stringThe device model.
-
context.device.name
stringThe device name.
-
context.device.type
stringThe device type (e.g., mobile, desktop).
-
context.device.token
stringThe unique device token.
-
-
context.ip
ipThe IP address associated with the event. If not specified, for JavaScript, Android and iOS connections, the event's IP address is automatically derived from the HTTP request.
The following special values let you change the default behavior and control how the IP address is determined or masked:
-
"255.255.255.255": Use the IP address of the request. -
"255.255.255.0": Use the IP address of the request, masking it with255.255.255.0, which sets the last segment to 0 (e.g.,192.168.45.32→192.168.45.0). Use this for partial anonymization. -
"255.255.0.0": Use the IP address of the request, masking it with255.255.0.0, which sets the last two segments to 0 (e.g.,192.168.45.32→192.168.0.0). Use this for stronger anonymization. -
"0.0.0.0": Don't include an IP address in the event. Use this with JavaScript, Android and iOS connections when no IP address is applicable or when it should not be associated for privacy reasons.
-
-
context.library
objectThe analytics library used to send the event.
-
context.library.name
stringThe name of the analytics library.
-
context.library.version
stringThe version of the analytics library.
-
-
context.locale
stringThe user's language and regional settings, such as
"en-US". -
context.location
objectThe device location from which the event originated. If not explicitly provided, Krenalis attempts to determine it automatically based on the event's IP.
-
context.location.city
stringThe city.
-
context.location.country
stringThe country.
-
context.location.latitude
floatThe latitude.
-
context.location.longitude
floatThe longitude.
-
context.location.speed
floatThe speed at which the device is moving, in meters per second.
-
-
context.network
objectThe network to which the device originating the event is connected.
-
context.network.bluetooth
booleanIndicates whether Bluetooth is active.
-
context.network.carrier
stringThe mobile network carrier name.
-
context.network.cellular
booleanIndicates whether a cellular connection is active.
-
context.network.wifi
booleanIndicates whether Wi-Fi is active.
-
-
context.os
objectThe OS of the device or browser from which the event originated.
If not explicitly provided, Krenalis will attempt to infer it from the
context.userAgentproperty, if available.-
context.os.name
stringThe name of the OS.
Krenalis tries to normalize this field and store it with one of those names:
"Android","Windows","macOS","iOS","Linux"or"Chrome OS".Otherwise, if the passed OS name cannot be normalized, it is set to"Other"and the passed name is stored — as is — intocontext.os.other. -
context.os.version
stringThe version of the OS.
-
-
context.page
objectThe page where the event originated.
-
context.page.path
stringThe page path.
-
context.page.referrer
stringThe referring URL.
-
context.page.search
stringThe URL search parameters.
-
context.page.title
stringThe page title.
-
context.page.url
stringThe full page URL.
-
-
context.referrer
objectThe URL of the page or source that referred the user to the current page.
-
context.referrer.id
stringThe identifier of the referring source (e.g., campaign or partner ID).
-
context.referrer.type
stringThe source category of the referrer (e.g., search, social, email).
-
-
context.screen
objectThe screen of the app where the event was originated.
-
context.screen.width
16 bit intThe screen width. Must be in range [1, 32767].
-
context.screen.height
16 bit intThe screen height. Must be in range [1, 32767].
-
context.screen.density
decimal(3, 2)The screen density. Must be a positive number.
-
-
context.session
objectThe current user session
-
context.session.id
64 bit intThe session identifier.
-
context.session.start
booleanIndicates whether the event starts a session.
-
-
context.sessionId
64 bit intThe session identifier. This field can be passed as an alternative to
context.session.idfor compatibility with RudderStack. -
context.sessionStart
booleanIndicates whether the event started a session. This field can be passed as an alternative to
context.session.startfor compatibility with RudderStack. -
context.timezone
stringThe user's timezone as a tzdata string (e.g., America/New_York).
-
context.userAgent
stringThe device identifier from which the event originates.
-
-
event
string Conditionally RequiredThe name of the user action in a track event. Examples: Product Viewed, Order Completed.
It is required only for track events. For all other types of events, it is not permitted.
-
groupId
nullable string Conditionally RequiredIdentifier of the group (e.g., account, company, organization) associated with the user.
It is required only for group events. For all other types of events, it is not permitted.
-
messageId
nullable stringThe ID that uniquely identifies the event. If it is missing or null, a generated identifier will be used as its value.
-
name
stringThe title of the viewed page or screen in page and screen events.
It is allowed only for page and screen events.
-
properties
jsonA key–value pairs describing contextual details about the event (e.g., product_id, revenue, rating). Distinct from
traits, which describe user attributes.It is allowed only for page, screen, and track events.
-
sentAt
datetimeAn UTC timestamp indicating when the event was sent. The year must be in the range 1 to 9999.
-
originalTimestamp
nullable datetimeAn UTC timestamp indicating when the event occurred on the client, in ISO 8601 format. The year must be in the range 1 to 9999.
Pass this property if the event occurred in the past.
-
timestamp
nullable datetime Conditionally RequiredAn UTC timestamp indicating when the event occurred, in ISO 8601 format. The year must be in the range 1 to 9999.
It will be adjusted by Krenalis to account for clock drift.
It is required if the property
originalTimestampis present. -
traits
jsonA key–value pairs containing user information (e.g., name, email, plan).
It is allowed only for identify and group events. You can use
context.traitsfor other types of events. -
previousId
string Conditionally RequiredThe user's previous identifier. Not used by Krenalis.
It is required only for alias events. For all other types of events, it is not permitted.
-
userId
nullable string Conditionally RequiredThe unique identifier assigned to a user after authentication. If absent, the user is anonymous.
It is required and cannot be null or empty for identify and alias events. For other event types, either
anonymousIdoruserIdmust be provided, and neither can be null or empty.
Response
No response.curl https://example.com/v1/events/track \ -H "Authorization: Bearer xxxxxxx" \ --json '{ "anonymousId": "3e93e10e-5ca0-4a8c-bef6-cf9197b37729", "context": { "page": { "path": "/dashboard", "title": "User Dashboard", "url": "https://app.example.com/dashboard" }, "screen": { "width": 3024, "height": 1964, "density": 2 }, "session": { "id": 1766272512048, "start": true }, "timezone": "America/Los_Angeles", "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 14_5) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.2.1 Safari/605.1.15" }, "event": "Workout Completed", "messageId": "82c8516b-434b-48f4-a32c-a6369e1543fd", "properties": { "workout_type": "Cardio", "duration_minutes": 45, "calories_burned": 380, "device": "Smartwatch" }, "sentAt": "2025-10-20T16:15:24.327Z", "timestamp": "2025-10-20T16:15:24.010Z", "userId": "802661375" }' List events
Retrieves events stored in the workspace's data warehouse, ordered by default from most recently received to oldest, up to the maximum number of events specified by limit.
If a filter is provided, only events that match the filter criteria will be returned.
You can also query events directly from the
eventsview in your workspace's data warehouse.
Request
-
properties
array of stringThe names of the event properties to return. If no properties are specified, all properties are returned.
-
filter
objectThe filter applied to the events. Only the events that match the filter will be returned.
It must be encoded in JSON, then escaped for the context of the query string. So, for example, the JSON-encoded filter:
{"logical":"and","conditions":[{"property":"kpid","operator":"is","values":["960ae86c-fc6e-438a-ae03-838fa6c94946"]}]}must be escaped and passed in the query string, for example as follows:
filter=%7b%22logical%22%3a%22and%22%2c%22conditions%22%3a%5b%7b%22property%22%3a%22kpid%22%2c%22operator%22%3a%22is%22%2c%22values%22%3a%5b%22960ae86c-fc6e-438a-ae03-838fa6c94946%22%5d%7d%5d%7d-
filter.logical
string Required Possible values:"and"or"or". -
filter.conditions
array of object RequiredA filter's condition.
-
property
string RequiredThe name or path of the property. If the property has a
jsontype, it can include a json path. -
operator
string RequiredThe condition's operator. The allowed values depend on the property's type.
Possible values:"is","is not","is less than","is less than or equal to","is greater than","is greater than or equal to","is between","is not between","contains","does not contain","is one of","is not one of","starts with","ends with","is before","is on or before","is after","is on or after","is true","is false","is empty","is not empty","is null","is not null","exists"or"does not exist". -
values
array of stringThe values the operator applies to, if any. These depend on both the operator and the property's type, including whether they're present and how many there are.
-
-
-
order
stringThe name of the property by which to sort the events to be returned.
If not provided, the events are sorted by
Possible values:timestamp."kpid","connectionId","anonymousId","channel","category","event","groupId","messageId","name","receivedAt","sentAt","originalTimestamp","timestamp","type"or"userId". -
ascending
booleanIndicates whether the returned events are sorted in ascending order. If not provided or set to false, the events are sorted in descending order.
-
first
intThe number of events to skip before starting to return results. If not provided, no events are skipped.
-
limit
intThe maximum number of events to return. The value must be within the range [1, 1000]. If not provided, the default value is 100.
Response
-
events
array of object-
kpid
uuid OptionalThe ID of the Krenalis user associated with the event, if any; otherwise, this field is absent.
kpidis set for each event by the Identity Resolution process, and its value may change over time depending on how users are unified and associated with events. -
connectionId
intThe ID of the source connection from which the event originates. Automatically set by Krenalis when the event is received.
-
anonymousId
stringA unique identifier assigned to a user before authentication, used to track anonymous activity across sessions.
-
channel
string OptionalThe source channel through which the event was received (e.g., web, mobile, server).
-
category
string OptionalIt is used to group related pages or screens for analysis and reporting.
-
context
object OptionalInformation about the environment where the event occurred. If there's no information in the context, this field is not returned.
-
context.app
object OptionalThe application that sent the event.
-
context.app.name
string OptionalThe application name.
-
context.app.version
string OptionalThe application version.
-
context.app.build
string OptionalThe application build identifier.
-
context.app.namespace
string OptionalThe application namespace or internal identifier.
-
-
context.browser
object OptionalThe browser from which the event originated.
-
context.browser.name
string OptionalThe name of the browser from which the event originated.
If the value is
Possible values:"Other", then the fieldotheris populated with the browser name."Chrome","Safari","Edge","Firefox","Samsung Internet","Opera"or"Other". -
context.browser.other
string OptionalThe name of the browser in case it is not one of those recognized by Krenalis.
This field is present only when
nameis"Other". -
context.browser.version
string OptionalThe version of the browser from which the event originated.
-
-
context.campaign
object OptionalThe campaign that originated the event.
-
context.campaign.name
string OptionalThe campaign name.
-
context.campaign.source
string OptionalThe campaign source.
-
context.campaign.medium
string OptionalThe campaign medium (e.g. "email", "social").
-
context.campaign.term
string OptionalThe campaign keyword or term.
-
context.campaign.content
string OptionalThe campaign content or variation.
-
-
context.device
object OptionalThe device from which the event originated.
For iOS, note that model identifiers may differ from marketed names (e.g.,
"iPhone16,2"for iPhone 15 Pro Max).-
context.device.id
string OptionalThe device identifier.
-
context.device.advertisingId
string OptionalThe advertising identifier.
-
context.device.adTrackingEnabled
boolean OptionalIndicates whether ad tracking is enabled.
-
context.device.manufacturer
string OptionalThe device manufacturer.
-
context.device.model
string OptionalThe device model.
-
context.device.name
string OptionalThe device name.
-
context.device.type
string OptionalThe device type (e.g., mobile, desktop).
-
context.device.token
string OptionalThe unique device token.
-
-
context.ip
ip OptionalThe IP address associated with the event.
-
context.library
object OptionalThe analytics library used to send the event.
-
context.library.name
string OptionalThe name of the analytics library.
-
context.library.version
string OptionalThe version of the analytics library.
-
-
context.locale
string Optional -
context.location
object OptionalDevice location from which the event was originated.
-
context.location.city
string OptionalThe city.
-
context.location.country
string OptionalThe country.
-
context.location.latitude
float OptionalThe latitude.
-
context.location.longitude
float OptionalThe longitude.
-
context.location.speed
float OptionalThe speed at which the device is moving, in meters per second.
-
-
context.network
object OptionalThe network to which the device originating the event was connected.
-
context.network.bluetooth
boolean OptionalIndicates whether Bluetooth is active.
-
context.network.carrier
string OptionalThe mobile network carrier name.
-
context.network.cellular
boolean OptionalIndicates whether a cellular connection is active.
-
context.network.wifi
boolean OptionalIndicates whether Wi-Fi is active.
-
-
context.os
object OptionalThe OS of the device or browser from which the event was originated.
-
context.os.name
string OptionalThe name of the OS from which the event was originated.
If the value is
Possible values:"Other", then the fieldotheris populated with the OS name."Android","Windows","iOS","macOS","Linux","Chrome OS"or"Other". -
context.os.other
string OptionalThe name of the OS in case it is not one of those recognized by Krenalis.
This field is present only when
nameis"Other". -
context.os.version
string OptionalThe version of the OS.
-
-
context.page
object OptionalThe page where the event originated.
-
context.page.path
string OptionalThe page path.
-
context.page.referrer
string OptionalThe referring URL.
-
context.page.search
string OptionalThe URL search parameters.
-
context.page.title
string OptionalThe page title.
-
context.page.url
string OptionalThe full page URL.
-
-
context.referrer
object OptionalThe URL of the page or source that referred the user to the page where the event originated.
-
context.referrer.id
string OptionalThe identifier of the referring source (e.g., campaign or partner ID).
-
context.referrer.type
string OptionalThe source category of the referrer (e.g., search, social, email).
-
-
context.screen
object OptionalThe screen of the app where the event was originated.
-
context.screen.width
16 bit int OptionalThe screen width.
-
context.screen.height
16 bit int OptionalThe screen height.
-
context.screen.density
decimal(3, 2) OptionalThe screen density. It is a positive number.
-
-
context.session
object OptionalThe user session when the event was generated.
-
context.session.id
64 bit int OptionalThe session identifier.
-
context.session.start
boolean OptionalIndicates whether the event started a session.
-
-
context.timezone
string OptionalThe user's timezone as a tzdata string (e.g.,
"America/New_York"). -
context.userAgent
string OptionalThe device identifier from which the event originated.
-
-
event
string OptionalIdentifies a track-type event, for example with a value like
Product Purchased. For any other event type, it is never returned. -
groupId
string OptionalThe group ID related to the event. Returned only for group-type event, and absent for all other event types.
-
messageId
stringThe ID that uniquely identifies the event.
-
name
string OptionalThe title of the viewed page or screen in page and screen events. Not returned for other event types.
-
properties
json OptionalA key–value pairs describing contextual details about the event (e.g., product_id, revenue, rating). Distinct from
traits, which describe user attributes. -
receivedAt
datetimeAn UTC timestamp indicating when the event was received. Set by Krenalis.
-
sentAt
datetimeAn UTC timestamp indicating when the event was sent by the client. Not reliable for analysis due to potential client clock drift; use
timestampfor analytics. -
originalTimestamp
datetimeAn UTC timestamp indicating when the event occurred on the client, in ISO 8601 format. Not recommended for analysis due to possible clock drift; use
timestampinstead. -
timestamp
datetimeAn UTC timestamp indicating when the event occurred, in ISO 8601 format. Suitable for analysis.
-
traits
jsonA key–value pairs containing user information (e.g., name, email, plan).
This field is always returned, regardless of the event type.
If there are no traits, an empty JSON object is returned.
-
type
stringThe event type: one of "page", "screen", "track", "identify", "group", or "alias".
Possible values:"alias","identify","group","page","screen"or"track". -
previousId
string OptionalThe user's previous identifier.
-
userId
string OptionalThe unique identifier assigned to a user after authentication. If absent, the user is anonymous.
-
curl -G https://example.com/v1/events \ -H "Authorization: Bearer api_xxxxxxx" \ -d "properties=kpid,connectionId,anonymousId,context,event,messageId,properties,receivedAt,sentAt,originalTimestamp,timestamp,type,userId" \ -d "limit=50" {
"events": [
{
"kpid": "9102d2a1-0714-4c13-bafd-8a38bc3d0cff",
"connectionId": 1371036433,
"anonymousId": "3e93e10e-5ca0-4a8c-bef6-cf9197b37729",
"context": {
"browser": {
"name": "Safari",
"version": "17.2.1"
},
"ip": "172.91.24.57",
"library": {
"name": "krenalis.js",
"version": "1.0.0"
},
"locale": "en-US",
"os": {
"name": "macOS",
"version": "14.5"
},
"page": {
"path": "/dashboard",
"title": "User Dashboard",
"url": "https://app.example.com/dashboard"
},
"screen": {
"width": 3024,
"height": 1964,
"density": 2
},
"session": {
"id": "1766272512048"
},
"timezone": "America/Los_Angeles",
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 14_5) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.2.1 Safari/605.1.15"
},
"event": "Workout Completed",
"messageId": "82c8516b-434b-48f4-a32c-a6369e1543fd",
"properties": {
"workout_type": "Cardio",
"duration_minutes": 45,
"calories_burned": 380,
"device": "Smartwatch"
},
"receivedAt": "2025-10-20T16:15:24.340Z",
"sentAt": "2025-10-20T16:15:24.327Z",
"originalTimestamp": "2025-10-20T16:15:23.992Z",
"timestamp": "2025-10-20T16:15:24.010Z",
"type": "track",
"userId": "720572415"
}
]
}Get event schema
Return the event schema. The event schema is the same for all workspaces.
Request
No parameters.Response
-
schema
schema
curl https://example.com/v1/events/schema \ -H "Authorization: Bearer api_xxxxxxx" {
"schema": {
"kind": "object",
"properties": [
{
"name": "kpid",
"type": {
"kind": "uuid"
},
"readOptional": true,
"description": "Krenalis Profile ID"
},
{
"name": "connectionId",
"type": {
"kind": "int",
"bitSize": 32
},
"description": "Connection ID"
},
{
"name": "anonymousId",
"type": {
"kind": "string"
},
"description": "Anonymous ID"
},
{
"name": "channel",
"type": {
"kind": "string"
},
"readOptional": true,
"description": "Channel"
},
{
"name": "category",
"type": {
"kind": "string"
},
"readOptional": true,
"description": "Category"
},
{
"name": "context",
"type": {
"kind": "object",
"properties": [
{
"name": "app",
"type": {
"kind": "object",
"properties": [
{
"name": "name",
"type": {
"kind": "string"
},
"readOptional": true,
"description": "Name"
},
{
"name": "version",
"type": {
"kind": "string"
},
"readOptional": true,
"description": "Version"
},
{
"name": "build",
"type": {
"kind": "string"
},
"readOptional": true,
"description": "Build"
},
{
"name": "namespace",
"type": {
"kind": "string"
},
"readOptional": true,
"description": "Namespace"
}
]
},
"readOptional": true,
"description": "App"
},
{
"name": "browser",
"type": {
"kind": "object",
"properties": [
{
"name": "name",
"type": {
"kind": "string",
"values": [
"Chrome",
"Safari",
"Edge",
"Firefox",
"Samsung Internet",
"Opera",
"Other"
]
},
"readOptional": true,
"description": "Name"
},
{
"name": "other",
"type": {
"kind": "string"
},
"readOptional": true,
"description": "Other"
},
{
"name": "version",
"type": {
"kind": "string"
},
"readOptional": true,
"description": "Version"
}
]
},
"readOptional": true,
"description": "Browser"
},
{
"name": "campaign",
"type": {
"kind": "object",
"properties": [
{
"name": "name",
"type": {
"kind": "string"
},
"readOptional": true,
"description": "Name"
},
{
"name": "source",
"type": {
"kind": "string"
},
"readOptional": true,
"description": "Source"
},
{
"name": "medium",
"type": {
"kind": "string"
},
"readOptional": true,
"description": "Medium"
},
{
"name": "term",
"type": {
"kind": "string"
},
"readOptional": true,
"description": "Term"
},
{
"name": "content",
"type": {
"kind": "string"
},
"readOptional": true,
"description": "Content"
}
]
},
"readOptional": true,
"description": "Campaign"
},
{
"name": "device",
"type": {
"kind": "object",
"properties": [
{
"name": "id",
"type": {
"kind": "string"
},
"readOptional": true,
"description": "Id"
},
{
"name": "advertisingId",
"type": {
"kind": "string"
},
"readOptional": true,
"description": "Advertising ID"
},
{
"name": "adTrackingEnabled",
"type": {
"kind": "boolean"
},
"readOptional": true,
"description": "Ad tracking enabled"
},
{
"name": "manufacturer",
"type": {
"kind": "string"
},
"readOptional": true,
"description": "Manufacturer"
},
{
"name": "model",
"type": {
"kind": "string"
},
"readOptional": true,
"description": "Model"
},
{
"name": "name",
"type": {
"kind": "string"
},
"readOptional": true,
"description": "Name"
},
{
"name": "type",
"type": {
"kind": "string"
},
"readOptional": true,
"description": "Type"
},
{
"name": "token",
"type": {
"kind": "string"
},
"readOptional": true,
"description": "Token"
}
]
},
"readOptional": true,
"description": "Device"
},
{
"name": "ip",
"type": {
"kind": "ip"
},
"readOptional": true,
"description": "IP"
},
{
"name": "library",
"type": {
"kind": "object",
"properties": [
{
"name": "name",
"type": {
"kind": "string"
},
"readOptional": true,
"description": "Name"
},
{
"name": "version",
"type": {
"kind": "string"
},
"readOptional": true,
"description": "Version"
}
]
},
"readOptional": true,
"description": "Library"
},
{
"name": "locale",
"type": {
"kind": "string"
},
"readOptional": true,
"description": "Locale"
},
{
"name": "location",
"type": {
"kind": "object",
"properties": [
{
"name": "city",
"type": {
"kind": "string"
},
"readOptional": true,
"description": "City"
},
{
"name": "country",
"type": {
"kind": "string"
},
"readOptional": true,
"description": "Country"
},
{
"name": "latitude",
"type": {
"kind": "float",
"bitSize": 64
},
"readOptional": true,
"description": "Latitude"
},
{
"name": "longitude",
"type": {
"kind": "float",
"bitSize": 64
},
"readOptional": true,
"description": "Longitude"
},
{
"name": "speed",
"type": {
"kind": "float",
"bitSize": 64
},
"readOptional": true,
"description": "Speed"
}
]
},
"readOptional": true,
"description": "Location"
},
{
"name": "network",
"type": {
"kind": "object",
"properties": [
{
"name": "bluetooth",
"type": {
"kind": "boolean"
},
"readOptional": true,
"description": "Bluetooth"
},
{
"name": "carrier",
"type": {
"kind": "string"
},
"readOptional": true,
"description": "Carrier"
},
{
"name": "cellular",
"type": {
"kind": "boolean"
},
"readOptional": true,
"description": "Cellular"
},
{
"name": "wifi",
"type": {
"kind": "boolean"
},
"readOptional": true,
"description": "Wi-Fi"
}
]
},
"readOptional": true,
"description": "Network"
},
{
"name": "os",
"type": {
"kind": "object",
"properties": [
{
"name": "name",
"type": {
"kind": "string",
"values": [
"Android",
"Windows",
"iOS",
"macOS",
"Linux",
"Chrome OS",
"Other"
]
},
"readOptional": true,
"description": "Name"
},
{
"name": "other",
"type": {
"kind": "string"
},
"readOptional": true,
"description": "Other"
},
{
"name": "version",
"type": {
"kind": "string"
},
"readOptional": true,
"description": "Version"
}
]
},
"readOptional": true,
"description": "OS"
},
{
"name": "page",
"type": {
"kind": "object",
"properties": [
{
"name": "path",
"type": {
"kind": "string"
},
"readOptional": true,
"description": "Path"
},
{
"name": "referrer",
"type": {
"kind": "string"
},
"readOptional": true,
"description": "Referrer"
},
{
"name": "search",
"type": {
"kind": "string"
},
"readOptional": true,
"description": "Search"
},
{
"name": "title",
"type": {
"kind": "string"
},
"readOptional": true,
"description": "Title"
},
{
"name": "url",
"type": {
"kind": "string"
},
"readOptional": true,
"description": "URL"
}
]
},
"readOptional": true,
"description": "Page"
},
{
"name": "referrer",
"type": {
"kind": "object",
"properties": [
{
"name": "id",
"type": {
"kind": "string"
},
"readOptional": true,
"description": "ID"
},
{
"name": "type",
"type": {
"kind": "string"
},
"readOptional": true,
"description": "Type"
}
]
},
"readOptional": true,
"description": "Referrer"
},
{
"name": "screen",
"type": {
"kind": "object",
"properties": [
{
"name": "width",
"type": {
"kind": "int",
"bitSize": 16
},
"readOptional": true,
"description": "Width"
},
{
"name": "height",
"type": {
"kind": "int",
"bitSize": 16
},
"readOptional": true,
"description": "Height"
},
{
"name": "density",
"type": {
"kind": "decimal",
"precision": 3,
"scale": 2
},
"readOptional": true,
"description": "Density"
}
]
},
"readOptional": true,
"description": "Screen"
},
{
"name": "session",
"type": {
"kind": "object",
"properties": [
{
"name": "id",
"type": {
"kind": "int",
"bitSize": 64
},
"readOptional": true,
"description": "ID"
},
{
"name": "start",
"type": {
"kind": "boolean"
},
"readOptional": true,
"description": "Start"
}
]
},
"readOptional": true,
"description": "Session"
},
{
"name": "timezone",
"type": {
"kind": "string"
},
"readOptional": true,
"description": "Timezone"
},
{
"name": "userAgent",
"type": {
"kind": "string"
},
"readOptional": true,
"description": "User agent"
}
]
},
"readOptional": true,
"description": "Context"
},
{
"name": "event",
"type": {
"kind": "string"
},
"readOptional": true,
"description": "Event"
},
{
"name": "groupId",
"type": {
"kind": "string"
},
"readOptional": true,
"description": "Group ID"
},
{
"name": "messageId",
"type": {
"kind": "string"
},
"description": "Message ID"
},
{
"name": "name",
"type": {
"kind": "string"
},
"readOptional": true,
"description": "Name"
},
{
"name": "properties",
"type": {
"kind": "json"
},
"readOptional": true,
"description": "Properties"
},
{
"name": "receivedAt",
"type": {
"kind": "datetime"
},
"description": "Received at"
},
{
"name": "sentAt",
"type": {
"kind": "datetime"
},
"description": "Sent at"
},
{
"name": "originalTimestamp",
"type": {
"kind": "datetime"
},
"description": "Original timestamp"
},
{
"name": "timestamp",
"type": {
"kind": "datetime"
},
"description": "Timestamp"
},
{
"name": "traits",
"type": {
"kind": "json"
},
"description": "Traits"
},
{
"name": "type",
"type": {
"kind": "string",
"values": [
"alias",
"identify",
"group",
"page",
"screen",
"track"
]
},
"description": "Type"
},
{
"name": "previousId",
"type": {
"kind": "string"
},
"readOptional": true,
"description": "Previous ID"
},
{
"name": "userId",
"type": {
"kind": "string"
},
"readOptional": true,
"description": "User ID"
}
]
}
}Create event listener
Creates an event listener for the workspace that listens to events and returns its identifier.
Request
-
connectionId
nullable intThe ID of the source connection that received the events, or of the destination connection where the events are sent. The connection must support events.
-
size
nullable intThe maximum number of observed events to return. It must be between 1 and 1000. If not specified or set to null, the default is 10.
-
filter
nullable objectThe filter applied to the events. If not null, only events that match the filter will be included.
-
filter.logical
string Required Possible values:"and"or"or". -
filter.conditions
array of object RequiredA filter's condition.
-
property
string RequiredThe name or path of the property. If the property has a
jsontype, it can include a json path. -
operator
string RequiredThe condition's operator. The allowed values depend on the property's type.
Possible values:"is","is not","is less than","is less than or equal to","is greater than","is greater than or equal to","is between","is not between","contains","does not contain","is one of","is not one of","starts with","ends with","is before","is on or before","is after","is on or after","is true","is false","is empty","is not empty","is null","is not null","exists"or"does not exist". -
values
array of stringThe values the operator applies to, if any. These depend on both the operator and the property's type, including whether they're present and how many there are.
-
-
Response
-
id
intThe ID of the event listener.
curl https://example.com/v1/events/listeners \ -H "Authorization: Bearer api_xxxxxxx" \ --json '{ "connectionId": 1371036433, "size": 10, "filter": { "logical": "and", "conditions": [ { "property": "name", "operator": "is", "values": [ "Mary" ] } ] } }' {
"id": "a9081719-e505-405b-95d9-33c77facd987"
}List observed events
Returns the events captured by the specified listener along with the count of omitted events.
Request
-
:id
int RequiredThe ID of the event listener.
Response
-
events
array of objectThe observed events.
-
connectionId
intThe ID of the source connection from which the event originates. Automatically set by Krenalis when the event is received.
-
anonymousId
stringA unique identifier assigned to a user before authentication, used to track anonymous activity across sessions.
-
channel
string OptionalThe source channel through which the event was received (e.g., web, mobile, server).
-
category
string OptionalIt is used to group related pages or screens for analysis and reporting.
-
context
object OptionalInformation about the environment where the event occurred. If there's no information in the context, this field is not returned.
-
context.app
object OptionalThe application that sent the event.
-
context.app.name
string OptionalThe application name.
-
context.app.version
string OptionalThe application version.
-
context.app.build
string OptionalThe application build identifier.
-
context.app.namespace
string OptionalThe application namespace or internal identifier.
-
-
context.browser
object OptionalThe browser from which the event originated.
-
context.browser.name
string OptionalThe name of the browser from which the event originated.
If the value is
Possible values:"Other", then the fieldotheris populated with the browser name."Chrome","Safari","Edge","Firefox","Samsung Internet","Opera"or"Other". -
context.browser.other
string OptionalThe name of the browser in case it is not one of those recognized by Krenalis.
This field is present only when
nameis"Other". -
context.browser.version
string OptionalThe version of the browser from which the event originated.
-
-
context.campaign
object OptionalThe campaign that originated the event.
-
context.campaign.name
string OptionalThe campaign name.
-
context.campaign.source
string OptionalThe campaign source.
-
context.campaign.medium
string OptionalThe campaign medium (e.g. "email", "social").
-
context.campaign.term
string OptionalThe campaign keyword or term.
-
context.campaign.content
string OptionalThe campaign content or variation.
-
-
context.device
object OptionalThe device from which the event originated.
For iOS, note that model identifiers may differ from marketed names (e.g.,
"iPhone16,2"for iPhone 15 Pro Max).-
context.device.id
string OptionalThe device identifier.
-
context.device.advertisingId
string OptionalThe advertising identifier.
-
context.device.adTrackingEnabled
boolean OptionalIndicates whether ad tracking is enabled.
-
context.device.manufacturer
string OptionalThe device manufacturer.
-
context.device.model
string OptionalThe device model.
-
context.device.name
string OptionalThe device name.
-
context.device.type
string OptionalThe device type (e.g., mobile, desktop).
-
context.device.token
string OptionalThe unique device token.
-
-
context.ip
ip OptionalThe IP address associated with the event.
-
context.library
object OptionalThe analytics library used to send the event.
-
context.library.name
string OptionalThe name of the analytics library.
-
context.library.version
string OptionalThe version of the analytics library.
-
-
context.locale
string Optional -
context.location
object OptionalDevice location from which the event was originated.
-
context.location.city
string OptionalThe city.
-
context.location.country
string OptionalThe country.
-
context.location.latitude
float OptionalThe latitude.
-
context.location.longitude
float OptionalThe longitude.
-
context.location.speed
float OptionalThe speed at which the device is moving, in meters per second.
-
-
context.network
object OptionalThe network to which the device originating the event was connected.
-
context.network.bluetooth
boolean OptionalIndicates whether Bluetooth is active.
-
context.network.carrier
string OptionalThe mobile network carrier name.
-
context.network.cellular
boolean OptionalIndicates whether a cellular connection is active.
-
context.network.wifi
boolean OptionalIndicates whether Wi-Fi is active.
-
-
context.os
object OptionalThe OS of the device or browser from which the event was originated.
-
context.os.name
string OptionalThe name of the OS from which the event was originated.
If the value is
Possible values:"Other", then the fieldotheris populated with the OS name."Android","Windows","iOS","macOS","Linux","Chrome OS"or"Other". -
context.os.other
string OptionalThe name of the OS in case it is not one of those recognized by Krenalis.
This field is present only when
nameis"Other". -
context.os.version
string OptionalThe version of the OS.
-
-
context.page
object OptionalThe page where the event originated.
-
context.page.path
string OptionalThe page path.
-
context.page.referrer
string OptionalThe referring URL.
-
context.page.search
string OptionalThe URL search parameters.
-
context.page.title
string OptionalThe page title.
-
context.page.url
string OptionalThe full page URL.
-
-
context.referrer
object OptionalThe URL of the page or source that referred the user to the page where the event originated.
-
context.referrer.id
string OptionalThe identifier of the referring source (e.g., campaign or partner ID).
-
context.referrer.type
string OptionalThe source category of the referrer (e.g., search, social, email).
-
-
context.screen
object OptionalThe screen of the app where the event was originated.
-
context.screen.width
16 bit int OptionalThe screen width.
-
context.screen.height
16 bit int OptionalThe screen height.
-
context.screen.density
decimal(3, 2) OptionalThe screen density. It is a positive number.
-
-
context.session
object OptionalThe user session when the event was generated.
-
context.session.id
64 bit int OptionalThe session identifier.
-
context.session.start
boolean OptionalIndicates whether the event started a session.
-
-
context.timezone
string OptionalThe user's timezone as a tzdata string (e.g.,
"America/New_York"). -
context.userAgent
string OptionalThe device identifier from which the event originated.
-
-
event
string OptionalIdentifies a track-type event, for example with a value like
Product Purchased. For any other event type, it is never returned. -
groupId
string OptionalThe group ID related to the event. Returned only for group-type event, and absent for all other event types.
-
messageId
stringThe ID that uniquely identifies the event.
-
name
string OptionalThe title of the viewed page or screen in page and screen events. Not returned for other event types.
-
properties
json OptionalA key–value pairs describing contextual details about the event (e.g., product_id, revenue, rating). Distinct from
traits, which describe user attributes. -
receivedAt
datetimeAn UTC timestamp indicating when the event was received. Set by Krenalis.
-
sentAt
datetimeAn UTC timestamp indicating when the event was sent by the client. Not reliable for analysis due to potential client clock drift; use
timestampfor analytics. -
originalTimestamp
datetimeAn UTC timestamp indicating when the event occurred on the client, in ISO 8601 format. Not recommended for analysis due to possible clock drift; use
timestampinstead. -
timestamp
datetimeAn UTC timestamp indicating when the event occurred, in ISO 8601 format. Suitable for analysis.
-
traits
jsonA key–value pairs containing user information (e.g., name, email, plan).
This field is always returned, regardless of the event type.
If there are no traits, an empty JSON object is returned.
-
type
stringThe event type: one of "page", "screen", "track", "identify", "group", or "alias".
Possible values:"alias","identify","group","page","screen"or"track". -
previousId
string OptionalThe user's previous identifier.
-
userId
string OptionalThe unique identifier assigned to a user after authentication. If absent, the user is anonymous.
-
-
omitted
intThe number of omitted events.
curl https://example.com/v1/events/listeners/a9081719-e505-405b-95d9-33c77facd987 \ -H "Authorization: Bearer api_xxxxxxx" {
"events": [
{
"connectionId": 1371036433,
"anonymousId": "3e93e10e-5ca0-4a8c-bef6-cf9197b37729",
"context": {
"browser": {
"name": "Safari",
"version": "17.2.1"
},
"ip": "172.91.24.57",
"library": {
"name": "krenalis.js",
"version": "1.0.0"
},
"locale": "en-US",
"os": {
"name": "macOS",
"version": "14.5"
},
"page": {
"path": "/dashboard",
"title": "User Dashboard",
"url": "https://app.example.com/dashboard"
},
"screen": {
"width": 3024,
"height": 1964,
"density": 2
},
"session": {
"id": "1766272512048"
},
"timezone": "America/Los_Angeles",
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 14_5) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.2.1 Safari/605.1.15"
},
"event": "Workout Completed",
"messageId": "82c8516b-434b-48f4-a32c-a6369e1543fd",
"properties": {
"workout_type": "Cardio",
"duration_minutes": 45,
"calories_burned": 380,
"device": "Smartwatch"
},
"receivedAt": "2025-10-20T16:15:24.340Z",
"sentAt": "2025-10-20T16:15:24.327Z",
"originalTimestamp": "2025-10-20T16:15:23.992Z",
"timestamp": "2025-10-20T16:15:24.010Z",
"type": "track",
"userId": "720572415"
}
],
"omitted": 572
}Delete event listener
Deletes an event listener. It does nothing if the event listener does not exist.
Request
-
:id
int RequiredThe ID of the event listener.
Response
No response.curl -X DELETE https://example.com/v1/events/listeners/a9081719-e505-405b-95d9-33c77facd987 \ -H "Authorization: Bearer api_xxxxxxx"