Skip to main content
Users
CloudPortalLogin
  • Powered byPowered by
Developing with Sitecore Personalize
Data privacy
Before you start sending data
Integrating with Sitecore Personalize
Stream API
Personalize API Flow execution
REST APIs
  • Sitecore Personalize for developers
  • Stream API
  • Direct HTTP requests reference
  • Sending events

Sending events

Note

Instead of using direct HTTP requests, we recommend that you send events using the Engage SDK. Using the Engage SDK, you have to format and send your event data differently than described in this section. See Sending events.

GET /v1.2/event/create.json?client_key=client_key&message=event

To send events to Sitecore Personalize using direct HTTP requests, for example, a VIEW event, make GET requests using the Event API (Stream API type). Pass the event object in the message parameter. Make sure to format the event object correctly and to include all the required attributes.

sidebar. Parameters

Parameter

Type

Description

Example

client_key

string

Your client key.

ZpHxO9WvLOfQRVPlvo0BqB8YjGYuFfNe

event

JSON object

All the event details.

{"key1":"value","key2":"value"}

sidebar. Format of event objects

The event data is sent as a JSON object in the URL. Attend to the following:

  • Wrap the object in curly braces {}.

  • Wrap every key and every value in double quotes "".

  • Don't add line breaks.

  • Don't add spaces around keys and around values.

Example 33. Correctly formatted event object for a VIEW event
RequestResponse
{"channel":"MOBILE_APP","type":"VIEW","language":"EN","currency":"EUR","page":"homepage","pos":"myretailsite/ireland","browser_id":"a38b230c-11eb-4cf9-8d5d-274e9f344925​"}


sidebar. Required attributes

At a minimum, every event data object must include the following attributes. Note that event data objects for different event types may require more attributes than listed in this table.

Attribute

Type

Description

Example

channel

string (uppercase)

The touchpoint where the user interacts with your brand.

For example, for webpages, the channel is "WEB". For mobile app screens, the channel is "MOBILE_APP".

Must be one of:

  • "AIRPORT_KIOSK"

  • "BRANCH"

  • "CALL_CENTER"

  • "EMAIL"

  • "GDS"

  • "KIOSK"

  • "MOBILE_APP"

  • "MOBILE_WEB"

  • "SMS"

  • "OFFLINE"

  • "OTA"

  • "OTHER"

  • "WEB"

type

string (uppercase)

The type of the event that takes place when the user interacts with your brand.

To send a Sitecore Personalize standard event, for example, VIEW or IDENTITY, set the value to a Sitecore Personalize reserved event name.

To send a custom event, set the value to a custom event name of your choice. The custom event name must be different than Sitecore Personalize reserved event names.

Sitecore Personalize reserved event names:

  • Any event name starting with "SC_"

  • "ADD" - standard ADD event.

  • "ADD_CONSUMERS" - standard ADD_CONSUMERS event.

  • "ADD_CONTACTS" - standard ADD_CONTACTS event.

  • "CAMPAIGN_TRACKING" - internally reserved event. Do not use.

  • "CHECKOUT" - standard CHECKOUT event.

  • "CLEAR_CART" - standard CLEAR_CART event.

  • "CONFIRM" - standard CONFIRM event.

  • "FEEDBACK" - FEEDBACK event.

  • "IDENTITY" - standard IDENTITY event.

  • "INTERACTION" - internally reserved event. Do not use.

  • "ORDER_CHECKOUT" - standard ORDER_CHECKOUT event.

  • "PAYMENT" - standard PAYMENT event.

  • "SUBSCRIPTION" - internally reserved event. Do not use.

  • "SEARCH" - standard SEARCH event.

  • "TRACKING" - internally reserved event. Do not use.

  • "VIEW" - standard VIEW event.

  • "myretailsite:CLICKED_POPUP"

  • "CUSTOM_EVENT_SEARCH"

  • "CUSTOM_EVENT_BANNER_CLICK"

language

string (uppercase ISO 639-1)

The language the user is using your app in.

For example, if the user selects the Japanese language on your website, the language is "JA".

  • "DE"

  • "EN"

  • "FR"

currency

string (uppercase ISO 4217)

The alphabetic currency code of the currency the user is using in your app.

For example, if the user selects Australian dollars as the currency on your website, the currency is "AUD".

  • "EUR"

  • "GBP"

  • "USD"

page

string

The name of the webpage where the interaction with your brand takes place.

This is a custom value of your choice.

  • "home"

  • "contact-us.html"

pos

string

The name of the point of sale where the interaction with your brand takes place.

You must set this value to the name of a point of sale that exists in your instance of Sitecore Personalize.

"myretailsite/ireland"

browser_id

string

The browser ID.

The browser ID is a string similar to:

"a38b230c-11eb-4cf9-8d5d-274e9f344925​"

RequestResponse
curl -X GET -g '<baseURL>/v1.2/event/create.json?client_key=<client_key>&message={"channel":"MOBILE_APP","type":"VIEW","language":"EN","currency":"EUR","page":"homepage","pos":"myretailsite/ireland","browser_id":"a38b230c-11eb-4cf9-8d5d-274e9f344925​"}'
RequestResponse
{
    "status": "OK",
    "version": "1.2",
    "client_key": "ZpHxO9WvLOfQRVPlvo0BqB8YjGYuFfNe",
    "ref": "dcb27c41-688d-4c36-8ed7-536e7bf590ba"
}

Do you have some feedback for us?

If you have suggestions for improving this article,

Privacy policySitecore Trust CenterCopyright © 1999-2025 Sitecore