Global Unsubscribes

Global Unsubscribes are email addresses that will not receive any emails.

List all globally unsubscribed email addresses [GET]

URI Parameter Required Requirements Description
start_time No timestamp Refers start of the time range in unix timestamp when an unsubscribe email was created (inclusive).
Example: 1443651141
end_time No timestamp Refers end of the time range in unix timestamp when an unsubscribe email was created (inclusive).
Example: 1443651154
limit No integer Limit the number of items
Example: 10
offset No integer Paging offset
Example: 0

Request

1
GET https://api.sendgrid.com/v3/suppression/unsubscribes?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
HTTP/1.1 200
[
  {
    "created": 1443651141,
    "email": "user1@example.com"
  },
  {
    "created": 1443651154,
    "email": "user2@example.com"
  }
]

Add email addresses to the Global Unsubscribes collection [POST]

Request

1
POST https://api.sendgrid.com/v3/asm/suppressions/global HTTP/1.1
Request Body
1
2
3
4
5
6
{
  "recipient_emails": [
    "test1@example.com",
    "test2@example.com"
  ]
}

Response

1
2
3
4
5
6
7
HTTP/1.1 201
{
  "recipient_emails": [
    "test1@example.com",
    "test2@example.com"
  ]
}

Determine if an email address belongs to the Global Unsubscribes collection [GET]

If the email address belongs to the Global Unsubscribes collection:
URI Parameter Required Requirements Description
email Yes string The email address.
Example: test@test.com

Request

1
GET https://api.sendgrid.com/v3/asm/suppressions/global/{email} HTTP/1.1

Response

1
2
3
4
HTTP/1.1 200
{
  "recipient_email": "{email}"
}
If the email address does not belongs to the Global Unsubscribes collection:
URI Parameter Required Requirements Description
email Yes string The email address.
Example: test@test.com

Request

1
GET https://api.sendgrid.com/v3/asm/suppressions/global/{email} HTTP/1.1

Response

1
2
3
HTTP/1.1 200
{
}

Remove an email address from the Global Unsubscribes collection [DELETE]

URI Parameter Required Requirements Description
email Yes string The email address.
Example: test@test.com

Request

1
DELETE https://api.sendgrid.com/v3/asm/suppressions/global/{email} HTTP/1.1

Response

1
HTTP/1.1 204