This endpoint should be called when an Emarsys contact logs out of the application. It removes the association between the Mobile Engage device and the Emarsys contact and the contact is no longer reachable via push messages. The value of the push_accepted contact field changes from 1 to empty. This DOES NOT create an anonymous user.

Endpoint

POST https://push.eservice.emarsys.net/api/mobileengage/v2/users/logout

Example

{
  "application_id": "F661E-162A6",
  "hardware_id": "61C53F6F-4E93-46C0-9E67-83768B371CEB"
}

Responses

Status code Meaning
202 Accepted.
409 Hardware ID already exists.
500 Database error (everything else).

Calling this from iOS

var parameters: [String:AnyObject] = [String:AnyObject]()

parameters["application_id"] = APPLICATION_ID
parameters["hardware_id"] = HWID