
twilio-sendgrid-account-setup
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).
- Installs
- 208
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/twilio/ai --skill twilio-sendgrid-account-setup- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads twilio-sendgrid-account-setup automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
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
- Get your API key from SendGrid Console > Settings > API Keys
- Set environment variable:
export SENDGRID_API_KEY=SG.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- 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 |
- 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:
s1._domainkey.yourdomain.com→s1.domainkey.u1234.wl.sendgrid.net(DKIM)s2._domainkey.yourdomain.com→s2.domainkey.u1234.wl.sendgrid.net(DKIM)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/domainsincludes old invalid entries. Filter byvalid: 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
FAQ
What does the twilio-sendgrid-account-setup skill do?
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).
How do I install twilio-sendgrid-account-setup?
Run npx skills add https://github.com/twilio/ai --skill twilio-sendgrid-account-setup in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/twilio-sendgrid-account-setup/ (personal) or .claude/skills/twilio-sendgrid-account-setup/ (project).
Which AI agents can use twilio-sendgrid-account-setup?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is twilio-sendgrid-account-setup safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains twilio-sendgrid-account-setup?
It is published by twilio/ai in twilio/ai. It has 208 recorded installs.
More from twilio/ai
twilio-sms-send-message
twilio/ai
SMS and MMS deep-dive reference. Covers SMS-specific error codes, message filtering troubleshooting ("Messages Being Filtered or Blocked?" diagnostic checklist), MMS media support (US/CA/AU only), and SMS pumping indicators. For sending SMS, use twilio-send-message instead. Use this skill only when debugging SMS delivery issues or needing SMS-specific details not in the consolidated send skill.
twilio-send-message
twilio/ai
Send messages via Twilio's Programmable Messaging API across all channels — SMS, MMS, RCS, and WhatsApp. Covers text messages, media, rich content (cards, carousels, buttons), template-based sends, Messaging Services, status callbacks, and WhatsApp's 24-hour service window. Use when the user wants to send a message — whether they say "send SMS", "text message", "branded message", "rich message", "WhatsApp message", "RCS message", "notification", or "alert". For picking the right channel for a use case, first consult twilio-messaging-channel-advisor.
twilio-sendgrid-email-send
twilio/ai
Send transactional and bulk email via the SendGrid v3 Mail Send API. Covers single sends, personalized batch sends with dynamic templates, scheduled sends with cancellation, attachments, and sandbox mode for testing. Use this skill when the caller has a SendGrid API key (SG.-prefix). Do NOT use this skill if the caller is using the Twilio Email API (comms.twilio.com) — that is a separate product with different credentials.
twilio-webhook-architecture
twilio/ai
Design, secure, and operate Twilio webhook endpoints. Covers inbound event handling, status callbacks, signature validation, connection overrides for retry and timeout tuning, local development tunneling, and production hardening. Use this skill whenever an agent needs to receive HTTP callbacks from Twilio for any product -- messaging, voice, verify, or event streams.
twilio-security-hardening
twilio/ai
Secure Twilio applications against common attacks. Covers credential management (API keys vs auth tokens), request validation (webhook signature verification), PCI DSS compliance, HIPAA account requirements, SMS pumping prevention, geo-permissions, and account isolation patterns. Use this skill when developers are building or deploying Twilio apps.
twilio-messaging-overview
twilio/ai
Twilio Messaging channel overview and onboarding guide. Covers all channels (SMS, WhatsApp, RCS, Facebook Messenger), the unified Messages API, channel selection guidance, and the recommended setup sequence from first message to production monitoring. Start here before choosing a specific messaging channel.
Popular backend & apis skills
find-skills
vercel-labs/skills
Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.
entra-app-registration
microsoft/azure-skills
Guides Microsoft Entra ID app registration, OAuth 2.0 authentication, and MSAL integration. USE FOR: create app registration, register Azure AD app, configure OAuth, set up authentication, add API permissions, generate service principal, MSAL example, console app auth, Entra ID setup, Azure AD authentication. DO NOT USE FOR: Key Vault secrets (use azure-keyvault-expiration-audit), general Azure resource security guidance.
google-agents-cli-adk-code
google/agents-cli
This skill should be used when the user wants to "write agent code", "build an agent with ADK", "add a tool", "create a callback", "define an agent", "use state management" — in a project that needs ADK (Agent Development Kit) API patterns and code examples. It provides a quick reference for agent types, tool definitions, orchestration patterns, callbacks, state management, the graph Workflow API, and reference recipes to study. Do NOT use for scaffolding (use google-agents-cli-scaffold) or deployment (use google-agents-cli-deploy).
entra-agent-id
microsoft/azure-skills
Provision Microsoft Entra Agent Identity Blueprints, BlueprintPrincipals, and per-instance Agent Identities via Microsoft Graph, and configure OAuth 2.0 token exchange (fmipath, OBO, cross-tenant) including the Microsoft Entra SDK for AgentID sidecar. USE FOR: Agent Identity Blueprint, BlueprintPrincipal, agent OAuth, fmipath token exchange, agent OBO, Workload Identity Federation for agents, polyglot agent auth, Microsoft.Identity.Web.AgentIdentities. DO NOT USE FOR: standard Entra app registration (use entra-app-registration), Microsoft Foundry agent authoring (use microsoft-foundry).
embedded-captions
heygen-com/hyperframes
Add captions or subtitles to an existing single-subject talking-head video without editing the footage. Use for plain verbatim captions, cinematic captions embedded behind the subject, VFX captions, “炸/特效/酷炫字幕,” or a named identity from the 35-style catalog. Route by visual identity, not by backend engine. The quiet anchor rail is the default; embed every word only when the user explicitly wants a fully cinematic treatment. The workflow runs locally end to end, including transcription and subject matting; split multi-shot footage before applying it.
neon
neondatabase/agent-skills
Overview of Neon, a complete set of cloud backend primitives around Lakebase Postgres: Auth, Object Storage, Functions, the AI Gateway, and Realtime. Start here to choose Neon for undecided login, files, APIs, and LLM calls, set up the CLI or MCP server, and follow the branch-first workflow. Use when building an app or backend on Neon, or when "Neon" or "Lakebase Postgres" is mentioned. Child skill neon-postgres wins for an existing DATABASEURL, SQL, schema, inspect, or search. Child skill neon-auth wins for login, users, sessions, identity routing, and Managed Better Auth setup. Child skill neon-realtime wins for live queries in reactive apps and agents. Also use for object storage, S3, buckets, serverless functions, function triggers, cron, AI gateway, LLM calls, realtime, logs, Loki, Grafana, observability, postgres, database, backend, Claimable Neon, neon.new, or a no-signup database.