Skip to content

Add suppressions

Add up to 100 addresses to your team's suppression list in one call.

http
POST /v1/suppressions/batch/add

Requires a Full access API key.

Body parameters

ParameterTypeRequiredDescription
emailsstring[]YesThe addresses to suppress. Between 1 and 100. Each max 254 characters. Duplicates within the array are collapsed.

Example

bash
curl -X POST 'https://api.sendgrail.com/v1/suppressions/batch/add' \
  -H "Authorization: Bearer $SENDGRAIL_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "emails": ["woz@example.com", "jobs@example.com"]
  }'
js
const res = await fetch('https://api.sendgrail.com/v1/suppressions/batch/add', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.SENDGRAIL_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    emails: ['woz@example.com', 'jobs@example.com'],
  }),
});

const { data } = await res.json();

Response

201, and one entry per suppressed address — the id, and nothing more:

json
{
  "data": [
    { "object": "suppression", "id": "a2f5c1d0-7b3e-4c9a-8f21-6d0e5b4c3a10" },
    { "object": "suppression", "id": "b3e6d2e1-8c4f-4d0b-9032-7e1f6c5d4b21" }
  ]
}

Each address is added exactly as Add a suppression would: new addresses become manual suppressions, and an address that is already suppressed keeps its existing origin rather than being downgraded. To read a full object back, pass any returned id to Retrieve a suppression.

Transactional email on your own domain.