Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

196 lines (160 sloc) 5.109 kb
layout weight title seo navigation
page
0
Customer Spam Reports
robots
NOINDEX, FOLLOW
show
true

{% warning %} This feature is deprecated, please go to the Version 2 Reseller Customer Spam Reports page. {% endwarning %}

{% anchor h2 %} Retrieve Spam Reports {% endanchor %}

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

XML Call

{% requestblock %}

{% requesturl POST %}https://api.sendgrid.com/api/distributor.manage.xml {% endrequesturl %}

{% requestdata Data POST %}api_user=your_sendgrid_username&api_key=your_sendgrid_password&method=spamreports&user=customer@example.com&task=get&date= {% endrequestdata %}

{% endrequestblock %}

Response

{% codeblock %} spamreports>email1@domain.com2009-06-10 12:40:30email2@domain2.com2009-06-10 12:40:30</spamreports {% endcodeblock %}

JSON Call

{% requestblock %}

{% requesturl POST %}https://api.sendgrid.com/api/distributor.manage.json {% endrequesturl %}

{% requestdata Data POST %}api_user=your_sendgrid_username&api_key=your_sendgrid_password&method=spamreports&user=customer@example.com&task=get&date= {% endrequestdata %}

{% endrequestblock %}

Response

{% codeblock %} {"email":"email1@domain.com","created":"2009-06-01 19:41:39"},{"email":"email2@domain2.com","created":"2009-06-01 19:41:39"} {% endcodeblock %}


{% anchor h2 %} Delete Spam Reports {% endanchor %}

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

XML Call

{% requestblock %}

{% requesturl POST %}https://api.sendgrid.com/api/distributor.manage.xml {% endrequesturl %}

{% requestdata Data POST %}api_user=your_sendgrid_username&api_key=your_sendgrid_password&method=spamreports&user=customer@example.com&task=delete&email=spamreport@domain.com {% endrequestdata %}

{% endrequestblock %}

Response: Success

{% codeblock %} result>success {% endcodeblock %}

Response: Error

{% codeblock %} result>Email does not exist {% endcodeblock %}

JSON Call

{% requestblock %}

{% requesturl POST %}https://api.sendgrid.com/api/distributor.manage.json {% endrequesturl %}

{% requestdata Data POST %}api_user=your_sendgrid_username&api_key=your_sendgrid_password&method=spamreports&user=customer@example.com&task=delete&email=spamreport@domain.com {% endrequestdata %}

{% endrequestblock %}

Response: Success

{% codeblock lang:json %} { "message": "success" } {% endcodeblock %}

Response: Error

{% codeblock lang:json %} { "message": "Email does not exist" } {% endcodeblock %}

Jump to Line
Something went wrong with that request. Please try again.