Skip to contentSkip to navigationSkip to topbar
Page tools
Useful for sharing or LLM
Accelerate development with AI

On this page
Looking for more inspiration?Visit the

Retrieve all suppressions


API Overview

api-overview page anchor

Suppressions are recipient email addresses that are added to unsubscribe groups. Once a recipient's address is on the suppressions list for an unsubscribe group, they will not receive any emails that are tagged with that unsubscribe group.


GET/v3/asm/suppressions

Base url: https://api.sendgrid.com (for global users and subusers)

Base url: https://api.eu.sendgrid.com (for EU regional subusers)

This endpoint allows you to retrieve a list of all suppressions.


Authentication

authentication page anchor
Property nameTypeRequiredDescription
Authorizationstring
required
Default: Bearer <<YOUR_API_KEY_HERE>>

on-behalf-ofstring

Optional

The on-behalf-of header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be "account-id" followed by the customer account's ID (e.g., on-behalf-of: account-id <account-id>). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., on-behalf-of: <subuser-username>). It is important to use the Base URL that corresponds to the region of the account or Subuser you specify in the on-behalf-of header. See On Behalf Of for more information.

200
SchemaExample

Array of:

Property nameTypeRequiredDescriptionChild properties
emailstring

Optional

The email address that was suppressed.


group_idinteger

Optional

The id of the suppression group that this email address belongs to.


group_namestring

Optional

The name of the suppression group that this email address belongs to.


created_atinteger

Optional

A UNIX timestamp indicating when the suppression was created.

Retrieve all suppressionsLink to code sample: Retrieve all suppressions
1
const client = require("@sendgrid/client");
2
client.setApiKey(process.env.SENDGRID_API_KEY);
3
4
const request = {
5
url: `/v3/asm/suppressions`,
6
method: "GET",
7
};
8
9
client
10
.request(request)
11
.then(([response, body]) => {
12
console.log(response.statusCode);
13
console.log(response.body);
14
})
15
.catch((error) => {
16
console.error(error);
17
});