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

Subuser Unsubscribes


(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 Unsubscribes

retrieve-unsubscribes page anchor
URI ParameterRequiredRequirementsDescription
taskYesMust be set to getTask to retrieve unsubscribes for subuser
userYesSubuser must be under your accountSubuser to retrieve unsubscribes for
dateNo0 or 1Optional argument to retrieve the timestamps, in ISO-8601 format, Pacific Timezone: YYYY-MM-DD HH:MM:SS
JSONXML

Call

POSThttps://api.sendgrid.com/api/user.unsubscribes.json
POST Dataapi_user=your_sendgrid_username&api_key=your_sendgrid_password&user=subuser_username&task=get&date=1

Response


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



SendGrid suppresses messages to unsubscribed addresses, but entries can be removed from the suppression list at any time if redelivery to an unsubscribed address is desired. Take care that the address should be redelivered to.

URI ParameterRequiredRequirementsDescription
taskYesMust be set to deleteTask to remove unsubscribed address from subuser
userYesSubuser must be under your accountSubuser to remove unsubscribed address from
emailYesAddress exists on the listAddress to remove from the Unsubscribe suppression list
JSONXML
POSThttps://api.sendgrid.com/api/user.unsubscribes.json
POST Dataapi_user=your_sendgrid_username&api_key=your_sendgrid_password&user=subuser_username&task=delete&email=unsubscribe@sample.com

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



Manually add address to the Unsubscribe suppression list, to prevent delivery to the address.

URI ParameterRequiredRequirementsDescription
taskYesMust be set to addTask to add address to subuser Unsubscribe list
userYesSubuser must be under your accountSubuser to add Unsubscribed address
emailYesValid email addressAddress to add to the Unsubscribe suppression list
JSONXML
POSThttps://api.sendgrid.com/api/user.unsubscribes.json
POST Dataapi_user=your_sendgrid_username&api_key=your_sendgrid_password&user=subuser_username&task=add&email=unsubscribe@sample.com

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


Rate this page: