Bounces

List all bounces [GET]

URI Parameter Required Requirements Description
start_time No number Refers start of the time range in unix timestamp when a bounce was created (inclusive).
Example: 1443651141
end_time No number Refers end of the time range in unix timestamp when a bounce was created (inclusive).
Example: 1443651154
limit No number Some integer <= 500 Optional field to limit the number of results returned. If not used, then 500 is the default limit.
offset No number Some integer Optional beginning point in the list to retrieve from.

Request

1
GET https://api.sendgrid.com/v3/suppression/bounces?start_time={start_time}&end_time={end_time} HTTP/1.1

Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
HTTP/1.1 200
[
  {
    "created": 1443651125,
    "email": "testemail1@test.com",
    "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  https://support.google.com/mail/answer/6596 o186si2389584ioe.63 - gsmtp ",
    "status": "5.1.1"
  },
  {
    "created": 1433800303,
    "email": "testemail2@testing.com",
    "reason": "550 5.1.1 <testemail2@testing.com>: Recipient address rejected: User unknown in virtual alias table ",
    "status": "5.1.1"
  }
]
There are two bounce delete options: 1) deleting all bounces by specifying "delete_all" to true in the request body, or 2) deleting some bounces by specifying "emails" and an array of emails in the request body.

Delete bounces [DELETE]

Request

1
DELETE https://api.sendgrid.com/v3/suppression/bounces HTTP/1.1
Request Body
1
2
3
{
  "delete_all": true
}

Response

1
HTTP/1.1 204

Request

1
DELETE https://api.sendgrid.com/v3/suppression/bounces HTTP/1.1
Request Body
1
2
3
4
5
6
{
  "emails": [
    "email1@test.com",
    "email2@test.com"
  ]
}

Response

1
HTTP/1.1 204

Get a bounce [GET]

URI Parameter Required Requirements Description
email Yes string Email address of bounce entry to retrieve
Example: bounce1@test.com

Request

1
GET https://api.sendgrid.com/v3/suppression/bounces/{email} HTTP/1.1

Response

1
2
3
4
5
6
7
8
9
HTTP/1.1 200
[
  {
    "created": 1443651125,
    "email": "bounce1@test.com",
    "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  https://support.google.com/mail/answer/6596 o186si2389584ioe.63 - gsmtp ",
    "status": "5.1.1"
  }
]

Delete a bounce [DELETE]

URI Parameter Required Requirements Description
email Yes string Email address of bounce entry to retrieve
Example: bounce1@test.com

Request

1
DELETE https://api.sendgrid.com/v3/suppression/bounces/{email} HTTP/1.1

Response

1
HTTP/1.1 204