Data Privacy Laws Compliance
Use Contact Management to record data privacy requests for your customers.
Named Users uninstall
Disassociate and delete all channels associated with the named_user_id(s) and also delete the named_user_id(s). This call removes all channels associated with a Named User from Airship systems in compliance with data privacy laws.
Uninstalling channels also removes accompanying analytic data (including Performance Analytics) from the system.
See Individual Data Privacy Rights Under Data Privacy Laws for more information about data privacy law compliance.
POST /api/named_users/uninstall
Channel uninstallation, like channel creation, is an asynchronous operation and may take some time to complete.
Security:
Request body:
Content-Type:
OBJECT PROPERTIESapplication/json- named_user_id array[string]REQUIRED
Array of strings representing the named_user_id(s) you wish to be uninstalled. Must have between 1 to 100 items in the array with a 128 character/byte maximum per item.
Responses
200
All channels have been deleted and disassociated from the Named User.
Response body:
- Content-Type:
application/vnd.urbanairship+json; version=3Returned with 2xx Responses. At a minimum, successful calls return
truefor theokkey. If your call includes a verbose response (as withGETrequests, etc.), theokkey will appear in the top-most object, outside the verbose response.
400
There was a parsing or validation error in the request. Bad Request errors typically include
pathandlocationin the response to help you find the cause of the error.Response body:
- Content-Type:
application/jsonErrors returned with 4xx responses. Errors include as much information as possible to help you understand the reason for the failure.
401
Authentication information (the app key and secret or bearer token) was either incorrect or missing.
Response body:
- Content-Type:
text/plainErrors returned with 4xx responses. Errors include as much information as possible to help you understand the reason for the failure.
403
Authentication was correct, but the user does not have permission to access the requested API, e.g., if the feature in question is not included in your pricing plan.
Response body:
- Content-Type:
application/jsonErrors returned with 4xx responses. Errors include as much information as possible to help you understand the reason for the failure.
406
Return when the client requests a version of the API that cannot be satisfied, because no compatible version is currently deployed.
Response body:
- Content-Type:
application/jsonErrors returned with 4xx responses. Errors include as much information as possible to help you understand the reason for the failure.
Examples
Example delete all users and their associated channels
POST /api/named_users/uninstall HTTP/1.1
Authorization: Basic <master authorization string>
Accept: application/vnd.urbanairship+json; version=3
Content-Type: application/json
{
"named_user_id": ["user-id-1234","user-id-5678"]
}
HTTP/1.1 200 OK
Content-Type: application/vnd.urbanairship+json; version=3
{
"ok": true
}
UrbanAirshipClient client = UrbanAirshipClient.newBuilder()
.setKey("<app key>")
.setSecret("<master secret>")
.build();
NamedUserUninstallRequest namedUserUninstallRequest = NamedUserUninstallRequest
.newUninstallRequest(ImmutableList.of("user-id-1234","user-id-5678"));
Response<GenericResponse> response = client.execute(namedUserUninstallRequest);
from urbanairship import (
BasicAuthClient, NamedUser
)
client = BasicAuthClient(
key='<app_key>',
secret='<master_secret>'
)
response = NamedUser.uninstall(
client=client,
named_users=["user-id-1234", "user-id-5678"]
)
require 'urbanairship'
UA = Urbanairship
airship = UA::Client.new(key: '<app key>', secret: '<master secret>')
named_user_uninstall = UA::NamedUserUninstaller.new(client: airship)
named_user_uninstall.named_user_ids = ['user-id-1234']
named_user_uninstall.uninstall
Uninstall channels
Uninstalls a channel, removing it and all accompanying analytic data (including Performance Analytics) from Airship systems in accordance with data privacy law compliance.
Uninstallation is handled automatically by the Airship SDK and push systems. If a user decides to opt in to communications again (either by using your app or other user preferences), they will create a new channel and a new set of analytic data. The value of a Channel ID may be the same as before however none of the associated metadata will persist when a user opts in again. A new Channel ID will be created if the user clears their browser’s cookies and data, deletes and reinstalls the app, etc.
See Individual Data Privacy Rights Under Data Privacy Laws for more information about data privacy law compliance.
POST /api/channels/uninstall
Channel uninstallation, like channel creation, is an asynchronous operation and may take some time to complete.
Security:
Request body:
Content-Type:
application/jsonarray<object>Min items: 1, Max items: 1000
ARRAY ITEMSpecifies the Channel ID and device type you want to uninstall.
OBJECT PROPERTIES- channel_id stringREQUIREDThe Channel ID.
- device_type stringREQUIREDThe device type of the channel.
Possible values:
ios,android,amazon,web,open
Responses
202
Returns OK for success.
Response body:
- Content-Type:
application/vnd.urbanairship+json; version=3Returned with 2xx Responses. At a minimum, successful calls return
truefor theokkey. If your call includes a verbose response (as withGETrequests, etc.), theokkey will appear in the top-most object, outside the verbose response.
400
There was a parsing or validation error in the request. Bad Request errors typically include
pathandlocationin the response to help you find the cause of the error.Response body:
- Content-Type:
application/jsonErrors returned with 4xx responses. Errors include as much information as possible to help you understand the reason for the failure.
401
Authentication information (the app key and secret or bearer token) was either incorrect or missing.
Response body:
- Content-Type:
text/plainErrors returned with 4xx responses. Errors include as much information as possible to help you understand the reason for the failure.
Examples
Example
POST /api/channels/uninstall HTTP/1.1
Authorization: Basic <master authorization string>
Accept: application/vnd.urbanairship+json; version=3
Content-Type: application/json
[
{
"channel_id": "b8f9b663-0a3b-cf45-587a-be880946e881",
"device_type": "ios"
},
{
"channel_id": "13863b3c-f860-4bbf-a9f1-4d785379b8a2",
"device_type": "android"
}
]
HTTP/1.1 202 Accepted
Content-Type: application/vnd.urbanairship+json; version=3
{
"ok": true
}
UrbanAirshipClient client = UrbanAirshipClient.newBuilder()
.setKey("<app key>")
.setSecret("<master secret>")
.build();
Set<ChannelUninstallDevice> channels = ImmutableSet.of(
new ChannelUninstallDevice("00f74677-4616-4958-bd91-30e949814d2c", ChannelUninstallDeviceType.IOS),
new ChannelUninstallDevice("007f7156-9b82-4cb6-a2f9-e2c8e7fce13d", ChannelUninstallDeviceType.ANDROID)
);
ChannelUninstallPayload payload = ChannelUninstallPayload.newBuilder()
.setChannels(channels)
.build();
ChannelUninstallRequest request = ChannelUninstallRequest.newRequest(payload);
Response<ChannelUninstallResponse> response = client.execute(request);
from urbanairship import (
BasicAuthClient, ChannelUninstall
)
client = BasicAuthClient(
key='<app_key>',
secret='<master_secret>'
)
channel_uninstall = ChannelUninstall(client)
channel = {
"channel_id": 'b8f9b663-0a3b-cf45-587a-be880946e881',
"device_type": "ios"
}
channel_uninstall.uninstall(channel)
require 'urbanairship'
UA = Urbanairship
airship = UA::Client.new(key: '<app key>', secret: '<master secret>')
cu = UA::ChannelUninstall.new(client: airship)
chans = [{"channel_id" => "b8f9b663-0a3b-cf45-587a-be880946e881",
"device_type" => "ios"},
{"channel_id" => "13863b3c-f860-4bbf-a9f1-4d785379b8a2",
"device_type" => "android"}]
cu.uninstall(channels: chans)