Skip to main content
POST
/
experiences
/
events
curl --request POST \
  --url https://sdk-{dc}.moengage.com/v1/experiences/events \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --header 'MOE-APPKEY: <moe-appkey>' \
  --data '
{
  "elements": [
    {
      "customer_id": "<unique user identifier like email or phone number. Eg: [email protected]>",
      "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"
          }
        }
      ]
    }
  ]
}
'

Authorizations

Authorization
string
header
required

Authentication is done via Basic Auth. This requires a base64-encoded string of your credentials in the format 'username:password'.

  • Username: Use your MoEngage workspace ID (also known as the App ID). You can find it in the MoEngage dashboard at Settings > Account > APIs > Workspace ID (earlier app id).
  • Password: Use your API Key, which you can find within the Personalize tile.

Note: After you generate and save the Personalize API Key (SECRET KEY), DO NOT generate a new key unless there is a security breach. After you generate a different key and save it, API calls using the older key won't work.

For more information on authentication and getting your credentials, refer here.

Headers

MOE-APPKEY
string
required

This is the Workspace ID of your MoEngage account that must be passed with the request. You can find it in the MoEngage dashboard at Settings > Account > APIs > Workspace ID (earlier app id).

Example:

"Workspace ID"

Body

application/json
elements
object[]

Response

200

Success. The event was successfully submitted.