List all invalid emails [GET]

URI Parameter Required Requirements Description
start_time No timestamp Refers start of the time range in unix timestamp when an invalid email was created (inclusive).
Example: 1443651141
end_time No timestamp Refers end of the time range in unix timestamp when an invalid email was created (inclusive).
Example: 1443651154
limit No integer Limit the number of results to be displayed per page.
Example: 10
offset No integer Paging offset. The point in the list to begin displaying results.
Example: 0

Request

1
GET https://api.sendgrid.com/v3/suppression/invalid_emails?start_time={start_time}&end_time={end_time}&limit=10&offset=0 HTTP/1.1

Response

1
2
3
4
5
6
7
8
9
10
11
12
13
HTTP/1.1 200
[
  {
    "created": 1449953655,
    "email": "user1@example.com",
    "reason": "Mail domain mentioned in email address is unknown"
  },
  {
    "created": 1449939373,
    "email": "user1@example.com",
    "reason": "Mail domain mentioned in email address is unknown"
  }
]
There are two options for deleting invalid email addresses:

1) You can delete all invalid email addresses by setting "delete_all" to true in the request body.
2) You can delete some invalid email addresses by specifying certain addresses in an array in the request body.

Delete invalid emails [DELETE]

Request

1
DELETE https://api.sendgrid.com/v3/suppression/invalid_emails 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/invalid_emails 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 specific invalid email [GET]

URI Parameter Required Requirements Description
email Yes string Email address of invalid email entry.
Example: spam1@test.com

Request

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

Response

1
2
3
4
5
6
7
8
HTTP/1.1 200
[
  {
    "created": 1454433146,
    "email": "test1@example.com",
    "reason": "Mail domain mentioned in email address is unknown"
  }
]

Delete a specific invalid email [DELETE]

URI Parameter Required Requirements Description
email Yes string Email address of invalid email entry.
Example: spam1@test.com

Request

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

Response

1
HTTP/1.1 204