POST Devices / Erase

Endpoint used to purge all device data.

Endpoint URL: https://api.carnivalmobile.com/v6/devices/:device_id/erase

Parameters

Name Type Required Definition
device_id string The Sailthru Mobile Device ID

Examples

curl -X POST -u :$API_KEY -H 'Accept: application/json' https://api.carnivalmobile.com/v6/devices/$device_id/erase

Result Format

200 OK

{
  "device": {
    "id": ":device_id",
    "user_id": null,
    "email": null,
    "platform": "Unknown",
    "last_opened": null,
    "installed_at": null,
    "push_enabled": false,
    "user_attributes": {},
    "user_events": {},
    "location": {
      "gps": {},
      "geoip": {
        "lat": null,
        "lng": null,
        "city": null,
        "country": null
      }
    },
    "erased_at": "0000-00-00T00:00:00.000Z",
    "push_token": null,
    "tags": []
  }
}

401 Unauthorized

{
  "error":"unauthorized"
}

403 Forbidden

{
  "error":"your api client does not have the correct roles"
}

This operation cannot be reverted

Once erased, all device data will be gone forever. Any request trying to update the device will return the HTTP error 451.
Use this API to remove any data related to a device ID. The user will still be able to use the app integrated to our SDK, but any data related to its device is going to be removed from our system. Deleted devices don't count as uninstalls. As the device is removed from our system straight away, this device will never count as an Uninstall in our analytics even after the user uninstalls the app from their phone.

Contact us

Top