Skip to contentSkip to navigationSkip to topbar
Rate this page:
On this page

Spam Reports


(warning)

This documentation is for the SendGrid Web API v2

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

Retrieve and delete entries in the Spam Reports list.


Get

get page anchor
URI ParameterRequiredRequirementsDescription
dateNoMust be set to 1Retrieve the timestamp of the spam report records. It will return a date in a MySQL timestamp format - YYYY-MM-DD HH:MM:SS
daysNoIf specified, must be an integer greater than 0Number of days in the past for which to retrieve spam reports (includes today)
start_dateNoDate must be in YYYY-MM-DD format and be earlier than the end_date parameter.The start of the date range for which to retrieve spam reports.
end_dateNoDate must be in YYYY-MM-DD format and be later than the start_date parameter.The end of the date range for which to retrieve spam reports.
limitNoSome integerOptional field to limit the number of results returned.
offsetNoSome integerOptional beginning point in the list to retrieve from.
emailNoEmail address e.g. testing@example.comOptional email addresses to search for.
JSONXML

Call

GEThttps://api.sendgrid.com/api/spamreports.get.json
GET Dataapi_user=your_sendgrid_username&api_key=your_sendgrid_password&date=1

Response


_12
[
_12
{
_12
"ip": "174.36.80.219",
_12
"email": "example@aol.com",
_12
"created": "2009-12-06 15:45:08"
_12
},
_12
{
_12
"ip": "74.63.202.105",
_12
"email": "example@example.com",
_12
"created": "2009-12-08 07:43:01"
_12
}
_12
]



Retrieve the count of Spam Reports.

URI ParameterRequiredRequirementsDescription
start_dateNoDate must be in YYYY-MM-DD format and be earlier than the end_date parameter.The start of the date range for which to retrieve spam reports.
end_dateNoDate must be in YYYY-MM-DD format and be later than the start_date parameter.The end of the date range for which to retrieve spam reports.
JSONXML
GEThttps://api.sendgrid.com/api/spamreports.count.json
GET Dataapi_user=your_sendgrid_username&api_key=your_sendgrid_password

_10
{
_10
"count": 2
_10
}



Delete an address from the Spam Reports list.

URI ParameterRequiredRequirementsDescription
start_dateNoDate must be in YYYY-mm-dd format and be before the end_date parameter.Optional date to start deleting from.
end_dateNoDate must be in YYYY-mm-dd format and be after the start_date parameter.Optional date to end deleting from.
emailNoMust be a valid user account emailEmail spam reports address to remove.
delete_allNovalue=1This will delete the bounce list and will not be retrievable.
JSONXML
POSThttps://api.sendgrid.com/api/spamreports.delete.json
POST Dataapi_user=your_sendgrid_username&api_key=your_sendgrid_password&email=emailToDelete@domain.com

_10
{
_10
"message": "success"
_10
}


Rate this page: