Menu

Expand

This documentation is for the SendGrid Web API v2

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

Rate this page:

Subuser Bounces

Retrieve Bounces

URI Parameter Required Requirements Description
task Yes Must be set to get Task to retrieve bounces
user Yes Subuser must be under your account Subuser to retrieve bounces of
date No 0 or 1 Optional argument to retrieve the timestamps, in ISO-8601 format, Pacific Timezone: YYYY-MM-DD HH:MM:SS

Call

POST https://api.sendgrid.com/api/user.bounces.json
POST Data api_user=your_sendgrid_username&api_key=your_sendgrid_password&user=subuser_username&task=get&date=1

Response

[
  {
    "email": "emaieexampexample@example.com",
    "status": "5.1.1",
    "reason": "550 5.1.1 unknown or illegal user: emaieexampexample@example.com",
    "created": "2014-12-06 08:34:48"
  },
  {
    "email": "emaileexampexample@example.com",
    "status": "5.1.1",
    "reason": "550 5.1.1 The email account that you tried to reach does not exist. Please try double-checking the recipient's email address for typos or unnecessary spaces. Learn more at http:\/\/support.google.com\/mail\/bin\/answer.py?answer=6596 qy3si50924603pab.12 - gsmtp ",
    "created": "2014-12-06 08:36:34"
  }
]

Call

POST https://api.sendgrid.com/api/user.bounces.xml
POST Data api_user=your_sendgrid_username&api_key=your_sendgrid_password&user=subuser_username&task=get&date=1

Response

<bounces>
   <bounce>
      <email>emaieexampexample@example.com</email>
      <status>5.1.1</status>
      <reason>550 5.1.1 unknown or illegal user: emaieexampexample@example.com</reason>
      <created>2014-12-06 08:34:48</created>
   </bounce>
   <bounce>
      <email>emaileexampexample@example.com</email>
      <status>5.1.1</status>
      <reason>550 5.1.1 The email account that you tried to reach does not exist. Please try double-checking the recipient's email address for typos or unnecessary spaces. Learn more at http:\/\/support.google.com\/mail\/bin\/answer.py?answer=6596 qy3si50924603pab.12 - gsmtp </reason>
      <created>2014-12-06 08:36:34</created>
   </bounce>
</bounces>

Delete Bounces

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

URI Parameter Required Requirements Description
task Yes Must be set to delete Task to remove address from bounce suppression list
user Yes Subuser must be under your account Subuser to retrieve bounces of
email Yes Address exists on the list Address to remove from the Bounce suppression list

Call

POST https://api.sendgrid.com/api/user.bounces.json
POST Data api_user=your_sendgrid_username&api_key=your_sendgrid_password&user=subuser_username&task=delete&email=bounceexampexample@example.com

Response

{
  "message": "success"
}

Call

POST https://api.sendgrid.com/api/user.bounces.xml
POST Data api_user=your_sendgrid_username&api_key=your_sendgrid_password&user=subuser_username&task=delete&email=bounceexampexample@example.com

Response

<result>
   <message>success</message>
</result>
Rate this page:

Need some help?

We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd browsing the SendGrid tag on Stack Overflow.

      
      
      

      Thank you for your feedback!

      We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

      Sending your feedback...
      🎉 Thank you for your feedback!
      Something went wrong. Please try again.

      Thanks for your feedback!

      Refer us and get $10 in 3 simple steps!

      Step 1

      Get link

      Get a free personal referral link here

      Step 2

      Give $10

      Your user signs up and upgrade using link

      Step 3

      Get $10

      1,250 free SMSes
      OR 1,000 free voice mins
      OR 12,000 chats
      OR more