Skip to content

Data Removal

Igor Balos edited this page Oct 9, 2023 · 4 revisions

For these API requests you will need to use a account API token. Once you obtain it, you will need to use account API client.

AccountApiClientclient = Postmark.getAccountApiClient(<accounttoken>);

Create a Data removal request

DataRemovaldataRemoval = newDataRemoval("requestedBy@example.com", "requestedFor@example.com", false);
DataRemovalStatusdataRemovalStatus = accountClient.requestDataRemoval(dataRemoval);
System.out.println(dataRemovalStatus.getStatus());
System.out.println(dataRemovalStatus.getId());

Retrieve data removal status

DataRemovalStatusdataRemovalStatus = accountClient.getDataRemovalStatus(1);
System.out.println(dataRemovalStatus.getStatus());
System.out.println(dataRemovalStatus.getId());

Clone this wiki locally