Skip to main content
POST
/
experiences
/
events
curl --location --request POST 'https://sdk-0X.moengage.com/v1/experiences/events' \ --header 'Accept: */*' \ --header 'Content-Type: application/json' \ --header 'Authorization: Basic <Authorisation>' \ --header 'MOE-APPKEY: <Your APP Key>' \ --data-raw '{ "elements": [ { "customer_id": "<unique user identifier like email or phone number. Eg: john@example.com>", "user_timezone_offset": 19800, "actions": [ { "action": "MOE_PERSONALIZATION_MESSAGE_SHOWN", "moe_event_uuid": "aa886712-4537-47c1-b126-2686efda2e26", "event_time": 1725258666, "platform": "web", "attributes": { "cid": "66d55ae445921e4d35ae4368_F_T_WP_AB_2_P_0_AU_5A", "experience": "Test Server side experience", "moe_locale_id": "0", "moe_variation_id": "2", "audience_name": "All Users", "audience_id": "5A", "type": "Web Personalization" } } ] } ] }'

Using MoEngage Web SDK

Refer to this article on reporting Experience shown event using the Personalize SDK.

Using MoEngage App SDK

  • Refer to this article on reporting Experience shown event using the Android SDK.
  • Refer to this article on reporting Experience shown event using the iOS SDK.

Authorizations

Authorization
string
header
required

The API request will be authenticated through Basic Authentication. Basic Authentication sends a Base64-encoded string containing your username and password with every API request. It encodes a 'username:password' string in Base64 and appends the encoded string with 'Basic '. This string is included in the authorization header as shown below:

{"Authorization":"Basic bmF2ZWVua3VtYXI6bW9lbmdhZ2U="}

The username and password details can be obtained from the MoEngage Dashboard.

  1. Navigate to Settings -> Account -> APIs.
  2. Click the Copy icon in the Personalize tile in the API Keys section to copy the API Key.
  3. Use the Workspace ID as the username and the Personalize API Key as the password to generate the authentication header.

Headers

MOE-APPKEY
string
required

This is the Workspace ID of your MoEngage account, and it needs to be passed along with the request. You can find your MoEngage Workspace ID in the MoEngage Dashboard API Settings. For more information, refer to Authentication.

Example:

"Workspace ID"

Authorization
string
required

This authentication parameter, used for access control, must be passed along with the request. To generate the authentication header, refer to Authentication.

Example:

"Basic bmF2ZWVua3VtYXI6bW9lbmdhZ2U=="

Body

application/json
elements
object[]

Response

200

Success. The event was successfully submitted.