Bounces
This endpoint allows you to retrieve and delete entries in the Bounces list.
get
Retrieve a list of bounces with addresses and response codes, optionally with dates.
| URI Parameter | Required | Requirements | Description |
|---|---|---|---|
| date | No | Must be set to 1. | Retrieve the timestamp of the bounce records. It will return a date in a MySQL timestamp format - YYYY-MM-DD HH:MM:SS. |
| days | No | If specified, must be an integer greater than 0. | Number of days in the past for which to retrieve bounces (includes today). |
| start_date | No | Date must be in YYYY-MM-DD format and be earlier than the end_date parameter. | The start of the date range for which to retrieve bounces. |
| end_date | No | Date must be in YYYY-MM-DD format and be later than the start_date parameter. | The end of the date range for which to retrieve bounces. |
| limit | No | Some integer. | Optional field to limit the number of results returned. |
| offset | No | Some integer. | Optional beginning point in the list to retrieve from. |
| type | No | Hard or soft. | Choose the type of bounce to search for. |
| No | Email address eg [email protected]. | Optional email addresses to search for. |
|
Call
| GET |
https://api.sendgrid.com/api/bounces.get.json?api_user=your_sendgrid_username&api_key=your_sendgrid_password&date=1
|
Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | |
Call
| GET |
https://api.sendgrid.com/api/bounces.get.xml?api_user=your_sendgrid_username&api_key=your_sendgrid_password&date=1
|
Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | |
delete
Delete an address from the Bounce list.
| URI Parameter | Required | Requirements | Description |
|---|---|---|---|
| start_date | No | Date must be in YYYY-mm-dd format and be before the end_date parameter. | Optional date to start deleting from. |
| end_date | No | Date must be in YYYY-mm-dd format and be after the start_date parameter. | Optional date to end deleting from. |
| type | No | Hard or soft. | Choose the type of bounce to be removed. |
| No | Must be a valid user account email. | Email bounce address to remove. | |
| delete_all | No | Must be set to 1. | This will delete the bounce list and will not be retrievable. |
|
Call
| POST |
https://api.sendgrid.com/api/bounces.delete.json
|
| POST Data |
api_user=your_sendgrid_username&
|
Response
1 2 3 | |
Call
| POST |
https://api.sendgrid.com/api/bounces.delete.xml
|
| POST Data |
api_user=your_sendgrid_username&
|
Response
1
| |
Count
| URI Parameter | Required | Requirements | Description |
|---|---|---|---|
| start_date | No | Date must be in YYYY-mm-dd format and be before the end_date parameter. | Optional date to start counting from. |
| end_date | No | Date must be in YYYY-mm-dd format and be after the start_date parameter. | Optional date to end counting from. |
| type | No | Hard or soft. | Choose the type of bounce to search for. |
|
Call
| GET |
https://api.sendgrid.com/api/bounces.count.json?api_user=your_sendgrid_username&api_key=your_sendgrid_password
|
Response
1 2 3 | |
Call
| GET |
https://api.sendgrid.com/api/bounces.count.xml?api_user=your_sendgrid_username&api_key=your_sendgrid_password
|
Response
1 2 3 | |
Yes
No
Feedback