Retrieve Spam Reports
Parameter
Required
Requirements
Description
user
Yes
Customer must be registered under your
account
The customer 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
method
Yes
Must be set to
spamreports
Allows you to access spam reports
functionality
Call
1
https://sendgrid.com/apiv2/reseller.manage.xml?api_user=your_sendgrid_username&api_key=your_sendgrid_password&method=spamreports&user=customer@example.com&task=get&date=
Response
1
2
3
4
5
6
7
8
9
10
11
12
<?xml version="1.0" encoding="ISO-8859-1"?>
<spamreports>
<spamreport>
<email> email1@domain.com</email>
<created> 2009-06-10 12:40:30</created>
</spamreport>
<spamreport>
<email> email2@domain2.com</email>
<created> 2009-06-10 12:40:30</created>
</spamreport>
</spamreports>
Call
1
https://sendgrid.com/apiv2/reseller.manage.json?api_user=your_sendgrid_username&api_key=your_sendgrid_password&method=spamreports&user=customer@example.com&task=get&date=1
Response
1
2
3
4
5
6
7
8
9
10
[
{
"email" : "email1@domain.com" ,
"created" : "2009-06-01 19:41:39"
},
{
"email" : "email2@domain2.com" ,
"created" : "2009-06-01 19:41:39"
}
]
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.
Parameter
Required
Requirements
Description
user
Yes
Customer must be registered under your
account
The customer 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 reports
You must specify the spam reports to remove
method
Yes
Must be set to
spamreports
Allows you to access spam reports
functionality
Call
1
https://sendgrid.com/apiv2/reseller.manage.xml?api_user=your_sendgrid_username&api_key=your_sendgrid_password&method=spamreports&user=customer@example.com&task=delete&email=spamreport@domain.com
Response: Success
1
2
3
4
5
<?xml version="1.0" encoding="ISO-8859-1"?>
<result>
<message> success</message>
</result>
Response: Error
1
2
3
4
5
<?xml version="1.0" encoding="ISO-8859-1"?>
<result>
<message> Email does not exist</message>
</result>
Call
1
https://sendgrid.com/apiv2/reseller.manage.json?api_user=your_sendgrid_username&api_key=your_sendgrid_password&method=spamreports&user=customer@example.com&task=delete&email=spamreport@domain.com
Response: Success
1
2
3
{
"message" : "success"
}
Response: Error
1
2
3
{
"message" : "Email does not exist"
}