Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: develop
Fetching contributors…

Cannot retrieve contributors at this time

101 lines (85 sloc) 3.202 kb
layout weight title navigation
page
150
Subuser Unsubscribes
show
true

{% anchor h2 %} Retrieve Unsubscribes {% endanchor %}

{% parameters get %} {% parameter task Yes 'Must be set to get' 'Task to retrieve unsubscribes for subuser' %} {% parameter user Yes 'Subuser must be under your account' 'Subuser to retrieve unsubscribes for' %} {% parameter date No '0 or 1' 'Optional argument to retrieve the timestamps, in ISO-8601 format, Pacific Timezone: YYYY-MM-DD HH:MM:SS' %} {% endparameters %}

{% apiexample get POST https://api.sendgrid.com/api/user.unsubscribes api_user=your_sendgrid_username&api_key=your_sendgrid_password&user=subuser_username&task=get&date=1 %} {% response json %} [ { "email": "email1@domain.com", "created": "2009-06-01 19:41:39" }, { "email": "email2@domain2.com", "created": "2009-06-01 19:41:39" } ] {% endresponse %} {% response xml %} email1@domain.com 2009-06-10 12:40:30 email2@domain2.com 2009-06-10 12:40:30

{% endresponse %} {% endapiexample %}


{% anchor h2 %} Delete Unsubscribes {% endanchor %} 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.

{% parameters delete %} {% parameter task Yes 'Must be set to delete' 'Task to remove unsubscribed address from subuser' %} {% parameter user Yes 'Subuser must be under your account' 'Subuser to remove unsubsribed address from' %} {% parameter email Yes 'Address exists on the list' 'Address to remove from the Unsubscribe suppression list' %} {% endparameters %}

{% apiexample delete POST https://api.sendgrid.com/api/user.unsubscribes api_user=your_sendgrid_username&api_key=your_sendgrid_password&user=subuser_username&task=delete&email=unsubscribe@sample.com %} {% response json %} { "message": "success" } {% endresponse %} {% response xml %} success

{% endresponse %} {% endapiexample %}


{% anchor h2 %} Add Unsubscribes {% endanchor %} Manually add address to the Unsubscribe suppression list, to prevent delivery to the address.

{% parameters add %} {% parameter task Yes 'Must be set to add' 'Task to add address to subuser Unsubscribe list' %} {% parameter user Yes 'Subuser must be under your account' 'Subuser to add Unsubscribed address' %} {% parameter email Yes 'Valid email address' 'Address to add to the Unsubscribe suppression list' %} {% endparameters %}

{% apiexample add POST https://api.sendgrid.com/api/user.unsubscribes api_user=your_sendgrid_username&api_key=your_sendgrid_password&user=subuser_username&task=add&email=unsubscribe@sample.com %} {% response json %} { "message": "success" } {% endresponse %} {% response xml %} success

{% endresponse %} {% endapiexample %}

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