Agent Native

twilio-sendgrid-account-setup

This skill guides agents through setting up a SendGrid account for email delivery, including API key creation, domain authentication with DNS records, and SDK…

by TwilioOfficial publisherNot reviewed

Identity proven by GitHub's verified organisation badge (twilio)

Agents
Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode, claude.ai and API
License
MIT (permissive)
Pin
8aba46fpinned Oct 9, 2026
Context cost
about 1,300 tokenswhen the skill loads
GitHub stars
37on twilio/ai
Scripts
None found

What it does

“Set up a SendGrid account for email delivery. Covers API key creation (SG.-prefix), domain authentication (DKIM/SPF via CNAME records), Single Sender Verification for testing, SDK installation, and the relationship between SendGrid and Twilio credentials. Use before any other SendGrid skill. This skill is for SendGrid only — not the Twilio Email API (comms.twilio.com).”
The author's description, from SKILL.md

Generated summary from the skill's own text

This skill guides agents through setting up a SendGrid account for email delivery, including API key creation, domain authentication with DNS records, and SDK installation across multiple languages. It clarifies that SendGrid uses separate credentials from Twilio and cannot be accessed through Twilio MCP tools. The skill covers both API and SMTP relay options, API key scoping for security, and production-level configuration requirements like DKIM, SPF, and DMARC records.

When to use it

  • Initializing SendGrid for the first time before sending emails
  • Setting up domain authentication for production email deliverability
  • Configuring API keys with appropriate scope restrictions
  • Installing SendGrid SDKs in Python, Node.js, Java, C#, Ruby, PHP, or Go

When not to

  • Using Twilio Email API instead, which has separate setup and credentials
  • When SendGrid account already exists and is fully configured
  • Accessing SendGrid through Twilio MCP tools, which do not exist for SendGrid

Install

These commands install from the publisher's repository and need no account.

skills CLI

npx skills add twilio/ai --skill twilio-sendgrid-account-setup

Installs from the repository's default branch, which may have changed since the commit we checked.

GitHub CLI 2.90 or later

gh skill install twilio/ai twilio-sendgrid-account-setup@8aba46fb65dc8d9a20f4b301a68352064b4159a5

Installs the commit we checked (8aba46f).

Copy by hand

Download the folder at 8aba46f and put it in .claude/skills/twilio-sendgrid-account-setup for Claude Code and in .agents/skills/twilio-sendgrid-account-setup for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode.

Skill folder on GitHub at 8aba46f

Claude Code plugin

/plugin install twilio-developer-kit@claude-plugins-official

The publisher's plugin in Claude's official marketplace. It may hold more than this skill, and we have not pinned it.

Copy for your agent

A prompt for any coding agent. It installs this skill from GitHub at the pinned commit, copies the files as they are, and runs nothing unless you ask.

Prompt

Install the agent skill "twilio-sendgrid-account-setup" by Twilio.

Source, pinned to commit 8aba46fb65dc8d9a20f4b301a68352064b4159a5:
https://github.com/twilio/ai/tree/8aba46fb65dc8d9a20f4b301a68352064b4159a5/skills/sendgrid/twilio-sendgrid-account-setup

1. Download that folder at exactly this commit. Do not use the default branch.
2. Copy every file unchanged, keeping the folder structure, into .claude/skills/twilio-sendgrid-account-setup/ for Claude Code and .agents/skills/twilio-sendgrid-account-setup/ for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode. Create the folders if they do not exist.
3. Do not edit the files, and do not run any script in the folder unless I ask you to.
4. When you are done, list the files you copied and where you put them.

Listing and checks: https://www.agentnative.dev/skills/twilio/twilio-sendgrid-account-setup

SKILL.md at the pin

---
name: twilio-sendgrid-account-setup
description: >
  Set up a SendGrid account for email delivery. Covers API key creation
  (SG.-prefix), domain authentication (DKIM/SPF via CNAME records), Single
  Sender Verification for testing, SDK installation, and the relationship
  between SendGrid and Twilio credentials. Use before any other SendGrid skill.
  This skill is for SendGrid only — not the Twilio Email API (comms.twilio.com).
---

## Overview

SendGrid is Twilio's email delivery engine but uses a **completely separate authentication system** — SendGrid API keys (starting with `SG.`) are not Twilio API keys. You cannot use Account SID/Auth Token for SendGrid, and no Twilio MCP tools wrap SendGrid.

---

## Quickstart

1. Get your API key from [SendGrid Console > Settings > API Keys](https://app.sendgrid.com/settings/api_keys)
2. Set environment variable:

```bash
export SENDGRID_API_KEY=SG.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
```

3. Install SDK:

| Language | Install | Package |
|----------|---------|---------|
| Python | `pip install sendgrid` | `sendgrid` |
| Node.js | `npm install @sendgrid/mail` | `@sendgrid/mail` (v8.x) |
| Java | Maven | `com.sendgrid:sendgrid-java` |
| C# | `dotnet add package SendGrid` | `SendGrid` |
| Ruby | `gem install sendgrid-ruby` | `sendgrid-ruby` |
| PHP | `composer require sendgrid/sendgrid` | `sendgrid/sendgrid` |
| Go | `go get github.com/sendgrid/sendgrid-go` | `sendgrid-go` |

4. Authenticate your sending domain (see below)

---

## API Key Scopes

| Scope | Use for | Risk |
|-------|---------|------|
| **Full Access** | Development only | Can do everything — never deploy with this |
| **Restricted Access** | Production | Scope to only what your app needs (e.g., Mail Send only) |
| **Billing Access** | Account management | Separate from mail operations |

A "Mail Send" restricted key can send email but cannot read suppressions, manage templates, or access stats. If you get `403 Forbidden`, check key permissions.

---

## SMTP Relay (Alternative to API)

SendGrid also supports SMTP for sending. Useful for frameworks with built-in SMTP support (e.g., Laravel, Django, Rails).

| Setting | Value |
|---------|-------|
| **Server** | `smtp.sendgrid.net` |
| **Port** | `587` (TLS) or `465` (SSL) |
| **Username** | `apikey` (literal string, not your key name) |
| **Password** | Your SendGrid API key (`SG.xxx`) |

---

## Domain Authentication (Required for Production)

Single Sender Verification is for testing only. Production requires domain authentication for deliverability.

**Setup:** SendGrid Console > Settings > Sender Authentication > Authenticate Your Domain

Create 3 CNAME DNS records:
1. `s1._domainkey.yourdomain.com` → `s1.domainkey.u1234.wl.sendgrid.net` (DKIM)
2. `s2._domainkey.yourdomain.com` → `s2.domainkey.u1234.wl.sendgrid.net` (DKIM)
3. `em1234.yourdomain.com` → `u1234.wl.sendgrid.net` (return path)

Verify via API: `GET /v3/whitelabel/domains/{id}/validate`

**DMARC:** After setting up DKIM and SPF via domain authentication, configure a DMARC DNS record (`_dmarc.yourdomain.com`) to instruct receiving servers how to handle authentication failures. Start with `p=none` for monitoring before enforcing.

**Dedicated IP (Pro+ plans):** Isolates your sending reputation. Requires an IP warming schedule — start with low volume and increase over 30 days.

---

## SendGrid and Twilio

| Twilio product | How it uses SendGrid | Sends email? |
|----------------|---------------------|-------------|
| **SendGrid** (this skill) | Direct email delivery via `api.sendgrid.com` | Yes |
| **Twilio Email API** | Direct email delivery via `comms.twilio.com/v1/emails` — uses Twilio creds, not SendGrid keys | Yes (separate product) |
| **Verify** | OTP via `channel: 'email'` | Delegates to SendGrid via Mailer config |
| **Conversations** | Tracks EMAIL as a channel type | No — logs/tracks only |
| **Flex** | Email channel for agents | Uses SendGrid for delivery |

**Servers:**
- Global: `https://api.sendgrid.com`
- EU regional: `https://api.eu.sendgrid.com`

---

## CANNOT

- **Cannot use Twilio credentials for SendGrid** — Separate API keys (`SG.`-prefix), separate Console, separate billing.
- **Cannot access SendGrid via Twilio MCP tools** — No MCP integration. Use SDK or direct REST.
- **Single Sender Verification requires re-verification on address change** — Changing the sender email requires a new verification. Use Domain Authentication for production.
- **Domain Authentication requires DNS access** — 3 CNAME records needed. If you can't modify DNS, you can't authenticate.
- **Domain Authentication API returns stale entries** — `GET /v3/whitelabel/domains` includes old invalid entries. Filter by `valid: true`.
- **API Key Secret shown only at creation** — Cannot retrieve afterward. Store immediately.

> **Security:** Your API key is shown only once at creation. Never display, log, or repeat a user's API key in responses. If a user shares their key in conversation, advise them to rotate it immediately. Store keys in a secrets manager (AWS Secrets Manager, HashiCorp Vault, etc.), not in code or environment files committed to version control.

---

## Next Steps

- **Send email:** `twilio-sendgrid-email-send`
- **Domain settings and templates:** `twilio-sendgrid-email-settings`
- **Delivery tracking:** `twilio-sendgrid-webhooks`
- **Docs:** [SendGrid API Reference](https://www.twilio.com/docs/sendgrid/api-reference)

From twilio/ai at 8aba46f, shown as plain text under its license: MIT (permissive). The license text is in LICENSE.

View SKILL.md on GitHub at 8aba46f

Files

4 files, 21 KB in total. Each file has a sha256 in the pin's manifest; the first 12 characters are shown.

Skill folder on GitHub at 8aba46f
All 50 skills from Twilio

More from Twilio

  • twilio-account-setup

    Sets up a Twilio account from scratch, including free trial signup, credential retrieval, phone number purchase, and enabling specific products like AI…

    Claude Code, Codex, Cursor +4 · about 2.5K tokens · pinned 6 days ago

  • twilio-agent-augmentation-architect

    This skill helps developers design AI-augmented contact center systems that enhance human agents with real-time intelligence.

    Claude Code, Codex, Cursor +3 · about 3.6K tokens · pinned 6 days ago

  • twilio-agent-connect

    Twilio Agent Connect is middleware that integrates LLM agents with Twilio communication channels (voice, SMS, RCS, WhatsApp, chat).

    Claude Code, Codex, Cursor +4 · about 4.1K tokens · pinned 6 days ago

  • twilio-ai-agent-architect

    Planning skill that helps developers design AI-powered conversational agents by assessing their use case across outcome sophistication, channels, and customer…

    Claude Code, Codex, Cursor +3 · about 4.9K tokens · pinned 6 days ago

  • twilio-call-recordings

    This skill teaches agents to record Twilio voice calls correctly using the appropriate method for the use case.

    Claude Code, Codex, Cursor +4 · about 2.6K tokens · pinned 6 days ago

  • twilio-cli-reference

    The Twilio CLI reference enables agents to manage Twilio resources directly from the terminal, including phone number provisioning, sending SMS and email…

    Claude Code, Codex, Cursor +4 · about 1.8K tokens · pinned 6 days ago

All Backend and APIs skills
  • twilio-conference-calls

    This skill enables multi-party call handling using Twilio Conference, covering warm and cold transfers, hold versus mute, supervisor coaching with whisper…

    by TwilioOfficial publisher

    Claude Code, Codex, Cursor +4 · about 2.8K tokens · pinned 6 days ago

  • twilio-content-template-builder

    This skill enables agents to create, manage, and send message templates through Twilio's Content API across WhatsApp, SMS, RCS, and MMS channels.

    by TwilioOfficial publisher

    Claude Code, Codex, Cursor +4 · about 1.3K tokens · pinned 6 days ago

  • twilio-conversation-orchestrator

    This skill configures Twilio Conversation Orchestrator to automatically capture and route SMS, voice, WhatsApp, RCS, and web chat into unified conversations.

    by TwilioOfficial publisher

    Claude Code, Codex, Cursor +4 · about 8.3K tokens · pinned 6 days ago

  • twilio-conversations-classic-api

    Build multi-channel messaging conversations using Twilio's classic API, combining SMS, WhatsApp, and web chat participants in persistent threads with message…

    by TwilioOfficial publisher

    Claude Code, Codex, Cursor +4 · about 4.2K tokens · pinned 6 days ago

  • twilio-iam-auth-setup

    This skill guides agents through setting up Twilio authentication methods including Auth Tokens, API Keys (Standard, Main, Restricted), Access Tokens for…

    by TwilioOfficial publisher

    Claude Code, Codex, Cursor +4 · about 2.3K tokens · pinned 6 days ago

  • twilio-isv-sms-best-practices

    This skill guides ISVs building multi-tenant SMS platforms on Twilio through subaccount architecture, customer onboarding for A2P 10DLC and toll-free…

    by TwilioOfficial publisher

    Claude Code, Codex, Cursor +4 · about 2.7K tokens · pinned 6 days ago

The skills listed here are third-party software, collected from public GitHub repositories as a catalog of recent skills and provided as is. Agent Native does not write or control them and is not responsible for any harm, loss or damage caused by installing or using them. Labels and checks describe what we saw at one commit and are not a guarantee. Read a skill's files before you run it. Terms of use