Skip to content

Data Removals

Jens Balvig edited this page Oct 11, 2023 · 1 revision

https://postmarkapp.com/developer/api/data-removals-api

For these API requests you will need to use the account API token.

account_token = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
client = Postmark::AccountApiClient.new(account_token)

Create a Data Removal request

client.request_data_removal(
  requested_for: "[email protected]", 
  requested_by: "[email protected]", 
  notify_when_completed: true
)

# => { id: 1234, status: "Pending" }

Check a Data Removal request status

client.get_data_removal_status(1234)

# => { id: 1234, status: "Done" }