Menu

Expand
Rate this page:

Recipients' Data Erasure API

The Recipients' Data Erasure API allows Twilio SendGrid customers to delete their own customers' personal data from the Twilio SendGrid Platform. The use of this API facilitates the self-service removal of email personal data from the Twilio SendGrid platform and will enable customers to comply with various obligatory data privacy regulations.

Erase Recipients' Email Data

The Recipients' Data Erasure API is available to customers that want to delete their recipients' data. Please file a support ticket to request access to this API.

POST /v3/recipients/erasejob

Base url: https://api.sendgrid.com

This operation allows you to delete your recipients' personal email data

The Delete Recipients' Email Data operation accepts a list of 5,000 email_addresses or a total payload size of 256Kb per request, whichever comes first. Upon a successful request with this operation, SendGrid will run a search on the email addresses provided against the SendGrid system to identify matches. SendGrid will then delete all personal data associated with the matched users such as the recipients' names, email addresses, subject lines, categories, and IP addresses.

All email addresses are filtered for uniqueness and tested for structural validity—any invalid addresses will be returned in an error response.

Please note that recipient data is deleted for the account making the request only—deletions do not cascade from a parent account to its Subusers' recipients. To delete a Subuser's recipients' data, you can use the on-behalf-of header.

Authentication

  • API Key

Headers

Authorization
string
default: Bearer <<YOUR_API_KEY_HERE>>
required
on-behalf-of
string

The on-behalf-of header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be "account-id" followed by the customer account's ID (e.g., on-behalf-of: account-id <account-id>). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., on-behalf-of: <subuser-username>). See On Behalf Of for more information.

default: None

Request Body

object
email_addresses
array[string]

List of unique recipient email addresses whose PII will be erased. You may include a maximum of 5,000 addresses or a maximum payload size of 256Kb, whichever comes first.

maxItems: 5000minItems: 1
required
{
  "email_addresses": [
    "user1@example.com",
    "user2@example.com"
  ]
}

Responses

object
job_id
string

The job ID associated with the data erasure request.

required
{
  "job_id": "12a975bd-c742-4713-8f47-cb3ae4e56c74"
}
object
errors
array[object]
required
message
string

The message representing the error from the API

required
field
string

The field associated with the error

required
object
errors
array[object]
required
message
string

The message representing the error from the API

required
field
string

The field associated with the error

required
object
errors
array[object]
required
message
string

The message representing the error from the API

required
field
string

The field associated with the error

required
object
errors
array[object]
required
message
string

The message representing the error from the API

required
field
string

The field associated with the error

required
No response body.
object
errors
array[object]
required
message
string

The message representing the error from the API

required
field
string

The field associated with the error

required
Loading Code Sample...
        
        

        Erase Recipients' Email Data

        Rate this page:

        Need some help?

        We all do sometimes. Get help now from the Twilio SendGrid Support Team.

        Running into a coding hurdle? Lean on the wisdom of the crowd by browsing the SendGrid tag on Stack Overflow or visiting Twilio's Stack Overflow Collective.

        Loading Code Sample...
              
              
              

              Thank you for your feedback!

              Please select the reason(s) for your feedback. The additional information you provide helps us improve our documentation:

              Sending your feedback...
              🎉 Thank you for your feedback!
              Something went wrong. Please try again.

              Thanks for your feedback!

              thanks-feedback-gif