Skip to content

Data Removal

Greg Svoboda edited this page Mar 4, 2026 · 1 revision

Data Removal

Data removal requests support GDPR and privacy compliance by removing personal data from Postmark. These operations are done through AccountClient. You will need an account API token.

import postmark

account = postmark.AccountClient("your-account-token")

Request Data Removal

Submit a data removal request for a specific email address.

import asyncio

async def main():
    result = await account.data_removals.create(
        requested_by="admin@example.com",
        requested_for="user@example.com",
        notify_when_completed=True,
    )

    print(f"Request ID: {result.id}")
    print(f"Status:     {result.status}")

asyncio.run(main())
  • requested_by — The admin or system making the request
  • requested_for — The end user whose data should be removed
  • notify_when_completed — Whether to send an email notification on completion

Check Removal Status

import asyncio

async def main():
    result = await account.data_removals.get(removal_id=42)

    print(f"ID:     {result.id}")
    print(f"Status: {result.status}")

asyncio.run(main())

Further Reading

Clone this wiki locally