Overview

Integration

User guide

API reference

Webhooks

Data Removal API

This endpoint allows you to erase recipient data from a specific account - for example when you’re processing Data Subject Requests (DSR) under GDPR or CCPA. Plus, you can review the status of your data removal requests.

This endpoint is available by request only. If you wish to have this functionality, please contact support.

Create a Data Removal request #

post

/data-removals

Request headers

Accept required

application/json

X-Postmark-Account-Token required

This request requires account level privileges. Only accessible by the account owner, this token can be found on the API Tokens tab of your Postmark account.

Example request with curl

curl "https://api.postmarkapp.com/data-removals" \
  -X POST \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "X-Postmark-Account-Token: account token" \
  -d '{
      "RequestedBy": "email@domain.com",
      "RequestedFor": "email2@domain.com",
      "NotifyWhenCompleted": true
    }'

Body format

RequestedBy string

The email address of the user that is making the request.

RequestedFor string

The email address of the recipient who's asking for their data to be removed. This must be a valid email address.

NotifyWhenCompleted boolean

Specifies whether the RequestedBy email address is notified when the data removal request is complete.

Example body format

{
  "RequestedBy": "email@domain.com",
  "RequestedFor": "email2@domain.com",
  "NotifyWhenCompleted": true
}

Response

ID integer

ID of data removal request

Status string

Status of the data removal request. Possible values: Pending, Done. While the removal request is being processed, it will indicate Pending. Once the data removal request has completed, it will indicate Done.

Example response

HTTP/1.1 200 OK
Content-Type: application/json
{
  "ID": 1234,
  "Status": "Pending"
}

Check a Data Removal request status #

get

/data-removals/{id}

Request headers

Accept required

application/json

X-Postmark-Account-Token required

This request requires account level privileges. Only accessible by the account owner, this token can be found on the API Tokens tab of your Postmark account.

Example request with curl

curl "https://api.postmarkapp.com/data-removals/{id}" \
  -X GET \
  -H "Accept: application/json" \
  -H "X-Postmark-Account-Token: account token"

Response

ID integer

ID of data removal request

Status string

Status of the data removal request. Possible values: Pending, Done. While the removal request is being processed, it will indicate Pending. Once the data removal request has completed, it will indicate Done.

Example response

HTTP/1.1 200 OK
Content-Type: application/json
{
  "ID": 1234,
  "Status": "Done"
}