Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

230 lines (180 sloc) 5.478 kb
layout weight title seo navigation
page
0
Subuser Bounces
robots
NOINDEX, FOLLOW
show
true

{% warning %} This feature is deprecated, please go to the Version 2 Customer Subuser API Bounces page. {% endwarning %}

{% anchor h2 %} Retrieve Bounces {% endanchor %} Note that you can use either the days parameter or the start_date and end_date parameter.

Parameter Required Requirements Description
user Yes Subuser must be registered under your account The subuser we are retrieving bounces from
task Yes Must be set to *get* This will allow you to retrieve the bounces for the specified subuser
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

{% xmljsontabs get %}

### Call {% requestblock %} {% requesturl POST %}https://api.sendgrid.com/api/user.bounces.xml {% endrequesturl %} {% requestdata Data POST %}api_user=your_sendgrid_username&api_key=your_sendgrid_password&user=example@example.com&task=get&date= {% endrequestdata %} {% endrequestblock %} ### Response {% codeblock lang:xml %} email1@domain.com 5.1.1 host [127.0.0.1] said: 550 5.1.1 unknown or illegal user: email1@domain.com 2009-06-10 12:40:30 email2@domain2.com 5.1.1 host [127.0.0.1] said: 550 5.1.1 unknown or illegal user: email2@domain2.com 2009-06-10 12:40:30 {% endcodeblock %}
### Call {% requestblock %} {% requesturl POST %}https://api.sendgrid.com/api/user.bounces.json {% endrequesturl %} {% requestdata Data POST %}api_user=your_sendgrid_username&api_key=your_sendgrid_password&user=example@example.com&task=get&date=1 {% endrequestdata %} {% endrequestblock %} ### Response {% codeblock lang:json %} [ { "email": "email1@domain.com", "status": "5.1.1", "reason": "host [127.0.0.1] said: 550 5.1.1 unknown or illegal user: email1@domain.com", "created": "2009-06-01 19:41:39" }, { "email": "email2@domain2.com", "status": "5.1.1", "reason": "host [127.0.0.1] said: 550 5.1.1 unknown or illegal user: email2@domain2.com", "created": "2009-06-01 19:41:39" } ] {% endcodeblock %}


{% anchor h2 %} Delete Bounces {% endanchor %} Since SendGrid does not re-deliver to bounced addresses, users can remove bounces from their list at any time if redelivery to a bounced address is desired.

Parameter Required Requirements Description
user Yes Subuser must be registered under your account The subuser we are retrieving bounces from
task Yes Must be set to *delete* This will allow you to delete the bounces for the specified user
email No Bounce email address you want to delete You must specify the bounced email message to remove

{% xmljsontabs delete %}

### Call {% requestblock %} {% requesturl POST %}https://api.sendgrid.com/api/user.bounces.xml {% endrequesturl %} {% requestdata Data POST %}api_user=your_sendgrid_username&api_key=your_sendgrid_password&user=example@example.com&task=delete&email=bounce@example.com {% endrequestdata %} {% endrequestblock %} ### Response: Success {% codeblock lang:xml %} success {% endcodeblock %} ### Response: Error {% codeblock lang:xml %} Email does not exist {% endcodeblock %}
### Call {% requestblock %} {% requesturl POST %}https://api.sendgrid.com/api/user.bounces.json {% endrequesturl %} {% requestdata Data POST %}api_user=your_sendgrid_username&api_key=your_sendgrid_password&user=example@example.com&task=delete&email=bounce@example.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.