Skip to main content
skill CX Codex GP ChatGPT official · OpenAI

twilio-sendgrid-suppressions — Codex skill: features and install

This skill helps investigate SendGrid suppressions and manage category-based unsubscribes. Use it when diagnosing delivery problems or building unsubscribe flows.

Install into Codex · Skills CLI (Vercel) All methods and platforms ↓
npx skills add openai/plugins --skill twilio-sendgrid-suppressions -a codex
Open on GitHub

What twilio-sendgrid-suppressions does

The skill covers suppressions caused by hard and soft bounces, blocks, spam complaints, invalid addresses, and unsubscribes. It describes checking and removing records through the API, plus using ASM groups to separate unsubscribe categories. API access requires a SendGrid key with the SG- prefix.

Suppressions generally affect all future sends, so deleting a hard-bounce record does not make an invalid mailbox usable. Spam-complaint suppressions cannot be overridden, and records cannot be removed in bulk by domain. Removing a complaint record can expose the sender to reputation damage, so the skill advises confirming removals with the user.

What it helps with

  • inspect addresses listed as hard bounces
  • trace why SendGrid is suppressing a delivery
  • remove a suppression record for one address
  • set up ASM groups for category-specific unsubscribes
  • understand the risks of automatic bounce and block cleanup

Example prompts for the agent

  • Check why [email protected] is suppressed in SendGrid and explain the reason.
  • Help me set up ASM groups so people can unsubscribe from marketing mail without leaving every email list.
  • Explain the consequences of removing this address's hard-bounce record.

How to install twilio-sendgrid-suppressions

1Skills CLI (Vercel)

npx skills add openai/plugins --skill twilio-sendgrid-suppressions -a codex

2Manually: put the files in place

.agents/skills/twilio-sendgrid-suppressions/SKILL.md

For all projects use ~/.agents/skills/

Step by step, with commands for each platform: Codex skills: how to install, where they live, how to call them

Questions about twilio-sendgrid-suppressions

How do I install twilio-sendgrid-suppressions in Codex?

Run npx skills add openai/plugins --skill twilio-sendgrid-suppressions -a codex. The skill file is installed at .agents/skills/twilio-sendgrid-suppressions/SKILL.md.

What does twilio-sendgrid-suppressions do?

It helps inspect and manage SendGrid suppression records, and explains how to use ASM groups for category-based unsubscribes.

What do I need to access the SendGrid API?

You need a SendGrid API key beginning with SG-. This skill does not apply to the Twilio Email API.

Source text

SKILL.md · MIT
---
name: twilio-sendgrid-suppressions
description: >
  Manage SendGrid email suppressions: bounces, blocks, spam reports,
  invalid emails, global unsubscribes, and ASM suppression groups.
  Covers when and how to remove suppressions, reputation impact, and
  category-based unsubscribe management. Use when debugging SendGrid
  delivery issues or building unsubscribe flows. Requires a SendGrid API
  key (SG.-prefix) — not applicable to the Twilio Email API (comms.twilio.com).
---

## Overview

Suppressions prevent SendGrid from sending to addresses that have bounced, reported spam, or unsubscribed. They protect your sender reputation but can also block legitimate re-sends if not managed correctly.

---

## Suppression Types

| Type | Endpoint | What triggers it | Auto-added? |
|------|----------|-----------------|-------------|
| **Hard Bounces** | `/v3/suppression/bounces` | Permanent delivery failure (invalid mailbox, domain doesn't exist) | Yes |
| **Soft Bounces** | No management API — automatic retry only | Temporary failure (mailbox full, server down) — SendGrid auto-retries before suppressing | Yes, after repeated failures |
| **Blocks** | `/v3/suppression/blocks` | Temporary rejection by receiving server (reputation, policy, content) | Yes |
| **Spam Reports** | `/v3/suppression/spam_reports` | Recipient marks email as spam | Yes |
| **Invalid Emails** | `/v3/suppression/invalid_emails` | Malformed email address | Yes |
| **Global Unsubscribes** | `/v3/suppression/unsubscribes` | Recipient unsubscribes from all email | Yes |
| **Group Unsubscribes (ASM)** | `/v3/asm/groups/{id}/suppressions` | Recipient unsubscribes from a category | Yes |

**Hard vs Soft bounces:** Hard bounces (permanent) immediately suppress the address. Soft bounces (temporary) trigger retries — SendGrid will retry delivery before eventually suppressing if the issue persists.

---

## Managing Suppressions

**List bounces (Python)**
```python
import os, requests

headers = {"Authorization": f"Bearer {os.environ['SENDGRID_API_KEY']}"}
response = requests.get("https://api.sendgrid.com/v3/suppression/bounces", headers=headers)
for bounce in response.json():
    print(f"{bounce['email']}: {bounce.get('reason', 'unknown')}")
```

**Remove a bounce (Python)**
```python
requests.delete(f"https://api.sendgrid.com/v3/suppression/bounces/{email}", headers=headers)
```

> **Caution:** Deleting suppression records (especially spam reports) allows re-sending to addresses that previously complained. Always confirm with the user before removal and document the business reason.

---

## ASM Suppression Groups

Use suppression groups for category-based unsubscribes (e.g., "Marketing", "Transactional", "Product Updates"). Recipients can unsubscribe from one category without being suppressed from all email.

**Create a group:**
```python
requests.post("https://api.sendgrid.com/v3/asm/groups",
    headers={**headers, "Content-Type": "application/json"},
    json={"name": "Marketing Emails", "description": "Promotional offers and updates"})
```

**Send with a suppression group:**
Include `asm.group_id` in your Mail Send request. Recipients see a "manage preferences" link instead of a global unsubscribe.

---

## Auto-Purge (Bounce & Block Cleanup)

Configure automatic purge schedules in Console > Settings > Mail Settings > Purge Bounces & Blocks:

- **Soft Bounces:** Auto-purge after N days (1–3,650 days)
- **Hard Bounces:** Auto-purge after N days (1–3,650 days)

**Caution:** Enabling auto-purge without a business reason allows re-sending to previously bounced addresses, which damages sender reputation. Do not use as a workaround to force delivery.

---

## Address Allow List

Console > Settings > Mail Settings > Address Allow List allows specific email addresses or domains to bypass all suppressions. Useful for internal testing addresses.

**Use with extreme caution** — never allowlist domains you don't control (e.g., `gmail.com`), and never use to bypass spam report suppressions.

---

## CANNOT

- **Suppressions are global by default** — A bounce or spam report on ANY email suppresses the address from ALL future sends. Use ASM groups to scope unsubscribes.
- **Removing a suppression does not fix the underlying issue** — Deleting a bounce record lets you retry, but the mailbox is likely still invalid. Re-sending to hard bounces damages sender reputation.
- **Cannot prevent spam report suppressions** — When a recipient marks you as spam, the suppression is automatic and cannot be overridden.
- **Cannot bulk-remove suppressions by domain** — Must remove individually by email address via API.

---

## Next Steps

- **Send email:** `twilio-sendgrid-email-send`
- **Delivery tracking:** `twilio-sendgrid-webhooks`
- **Account setup:** `twilio-sendgrid-account-setup`

© Twilio · MIT · openai/plugins

Similar skills

All skills for Backend and APIs →

From the same set528

The whole set →
twilio-voice-twiml A skill for building voice call logic with TwiML: Say, Play, Gather, Dial, Record and Conference verbs, plus a full inbound IVR example. CX Codex GP ChatGPT ★ 7,604repo stars twilio-verify-send-otp A skill that walks your agent through the full OTP lifecycle in Twilio Verify: create a service, send a code, check the submitted one. CX Codex GP ChatGPT ★ 7,604repo stars twilio-sms-send-message This skill helps diagnose Twilio SMS and MMS delivery failures, including error codes, message filtering, and signs of SMS pumping. CX Codex GP ChatGPT ★ 7,604repo stars twilio-isv-sms-best-practices A skill for teams embedding SMS into a SaaS platform where customers message their own end users. Covers A2P 10DLC and toll-free onboarding, subaccounts and billing. CX Codex GP ChatGPT ★ 7,604repo stars twilio-sendgrid-inbound-parse A skill that walks your agent through SendGrid Inbound Parse: MX records, parsed vs raw mode, attachments and the usual pitfalls. CX Codex GP ChatGPT ★ 7,604repo stars twilio-sendgrid-email-settings Configure SendGrid templates, email tracking, and branded links with this skill. Use it when changing message content or delivery settings. CX Codex GP ChatGPT ★ 7,604repo stars twilio-sendgrid-email-send A skill that shows the agent how to send mail through the SendGrid v3 Mail Send API: single sends, batch sends with templates, scheduled sends and attachments. Requires an SG-prefixed API key. CX Codex GP ChatGPT ★ 7,604repo stars twilio-sendgrid-account-setup Prepares SendGrid for email delivery with API keys, sender checks, domain authentication, and SDK setup. Use it before other SendGrid skills. CX Codex GP ChatGPT ★ 7,604repo stars

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor