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:

Customer Bounces

Manage your customers' bounce records.

Retrieve Bounces

These are Reseller only APIs. For more information, see the Reseller Overview.

URI Parameter Required Requirements Description
user Yes Customer must be registered under your account The customer we are retrieving bounces from
task Yes Must be set to get This will allow you to retrieve the bounces for the specified customer
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
method Yes Must be set to bounces Allows you to access bounces functionality

Call

POST https://api.sendgrid.com/apiv2/reseller.manage.json
POST Data api_user=your_sendgrid_username&api_key=your_sendgrid_password&method=bounces&user=eexampexample@example.com&task=get&date=1

Response

[
  {
    "email": "emaieexampexample@example.com",
    "status": "5.1.1",
    "reason": "host [127.0.0.1] said: 550 5.1.1 unknown or illegal user: emaieexampexample@example.com",
    "created": "2009-06-01 19:41:39"
  },
  {
    "email": "emaileexampexample@example.com",
    "status": "5.1.1",
    "reason": "host [127.0.0.1] said: 550 5.1.1 unknown or illegal user: emaileexampexample@example.com",
    "created": "2009-06-01 19:41:39"
  }
]

Call

POST https://api.sendgrid.com/apiv2/reseller.manage.xml
POST Data api_user=your_sendgrid_username&api_key=your_sendgrid_password&method=bounces&user=eexampexample@example.com&task=get&date=1

Response

<bounces>
   <bounce>
      <email>emaieexampexample@example.com</email>
      <status>5.1.1</status>
      <reason>host [127.0.0.1] said: 550 5.1.1 unknown or illegal user: emaieexampexample@example.com</reason>
      <created>2009-06-10 12:40:30</created>
   </bounce>
   <bounce>
      <email>emaileexampexample@example.com</email>
      <status>5.1.1</status>
      <reason>host [127.0.0.1] said: 550 5.1.1 unknown or illegal user: emaileexampexample@example.com</reason>
      <created>2009-06-10 12:40:30</created>
   </bounce>
</bounces>

Delete Bounces

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.

URI 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 Yes Bounce email address you want to delete You must specify the bounced email message to remove
method Yes Must be set to bounces Allows you to access bounces functionality

Call

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

Response

{
  "message": "success"
}

Call

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

Response

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

Need some help?

We all do sometimes. Get help now from the Twilio SendGrid Support Team.

Running into a coding hurdle? Lean on the wisdom of the crowd by browsing the SendGrid tag on Stack Overflow or visiting Twilio's Stack Overflow Collective.

Loading Code Sample...
        
        
        

        Thank you for your feedback!

        Please select the reason(s) for your feedback. The additional information you provide helps us improve our documentation:

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

        Thanks for your feedback!

        thanks-feedback-gif