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
Copy
{
"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": []
}
}
Copy
{
"error":"unauthorized"}
403 Forbidden
Copy
{
"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.