The most common use cases for this API are the following:

Opt-in to Push messages

Start your application with the login event, to register the device and the used application in the Mobile Engage database.

To send a push message, the application user needs to enable push (accept push messages), and we need the user’s permission to do that. The large platforms (iOS and Android) are pushing the developers to request permissions at a point where the benefit of the permission is clear for the user – ask for push permission at such a point. If the permission is granted, call the login endpoint with the push_token.

After the first Mobile Engage contact gets the push_token, you can create a segment in the Emarsys platform, using the Push accepted custom field that is created for you during the onboarding process.

Check message open reporting

In order to learn how many users opened your message, you have to send the message_open event to the message_open endpoint. Include the sid parameter in the call along with the application_id and hardware_id, and Mobile Engage will know which message was read by which Emarsys contact.