Menu

Expand

This documentation is for the SendGrid Web API v2

To access all the latest features and upcoming developments, please see our v3 API.

Rate this page:

Customer Subuser Spam Reports

Manage your Customer Subusers' Spam Report records.

Retrieve Spam Reports

URI Parameter Required Requirements Description
user Yes Customer subuser must be registered under your account The customer subuser we are retrieving spam reports from
task Yes Must be set to get This will allow you to retrieve the spam reports for the specified user
date No Must be set to 1 Retrieves the timestamps. It will return a date in a MySQL timestamp format - YYYY-MM-DD HH:MM:SS

Call

POST https://api.sendgrid.com/apiv2/reseller.manageSubuser.json
POST Data api_user=your_sendgrid_username&api_key=your_sendgrid_password&method=spamreports&user=example@example.com&task=get&date=

Response

[
  {
    "email": "emaieexampexample@example.com",
    "created": "2009-06-01 19:41:39"
  },
  {
    "email": "emaileexampexample@example.com",
    "created": "2009-06-01 19:41:39"
  }
]

Call

POST https://api.sendgrid.com/apiv2/reseller.manageSubuser.xml
POST Data api_user=your_sendgrid_username&api_key=your_sendgrid_password&method=spamreports&user=example@example.com&task=get&date=

Response

<spamreports>
   <spamreport>
      <email>emaieexampexample@example.com</email>
      <created>2009-06-10 12:40:30</created>
   </spamreport>
   <spamreport>
      <email>emaileexampexample@example.com</email>
      <created>2009-06-10 12:40:30</created>
   </spamreport>
</spamreports>

Delete Spam Reports

Since SendGrid does not deliver to spam reported addresses, users can remove spam reports from their list at any time if re-delivery to a spam reported address is desired.

URI Parameter Required Requirements Description
user Yes Customer subuser must be registered under your account The customer subuser we are retrieving spam reports from
task Yes Must be set to delete This will allow you to delete a spam report for the specified user
email No Must be a spam report You must specify the spam reports to remove

Call

POST https://api.sendgrid.com/apiv2/reseller.manageSubuser.json
POST Data api_user=your_sendgrid_username&api_key=your_sendgrid_password&method=spamreports&user=example@example.com&task=delete&email=spamreport@domain.com

Response

{
  "message": "success"
}

Call

POST https://api.sendgrid.com/apiv2/reseller.manageSubuser.xml
POST Data api_user=your_sendgrid_username&api_key=your_sendgrid_password&method=spamreports&user=example@example.com&task=delete&email=spamreport@domain.com

Response

<result>
   <message>success</message>
</result>
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