SendGrid’s modern surface is the v3 REST API at https://api.sendgrid.com/v3/, authenticated with an API key sent as a bearer token, plus a first-party SMTP relay using the same credential. Twilio maintains 7 official SDKs across roughly 30 resource groups. On MCP the answer is narrower than the noise suggests: Twilio ships an official server, but it only reads documentation.
The MCP question splits in two: can an agent read the API schemas reliably, and can it execute against the account. SendGrid answers yes to the first and no to the second.
Twilio operates an official server at https://mcp.twilio.com/docs, in Public Beta as of the July 20, 2026 doc update. It indexes Twilio’s public API specs — SendGrid included — across 1,800+ endpoints and 30+ products, exposing exactly two read-only tools. It cannot execute SendGrid calls or send email.
Six servers are worth knowing. The two OFFICIAL entries come from Twilio and neither is a general-purpose SendGrid email tool. The rest wrap the v3 API and deserve the scrutiny you give any unsupported dependency holding a live key.
Read-only search over Twilio and SendGrid API specs. Two tools, no auth, no side effects. Public Beta.
Executes against Twilio’s public API with an Account SID plus key and secret. Explicitly alpha, and never names SendGrid or email.
The most-referenced community server. Drives v3 for lists, templates, single sends, validation and stats.
Reference build for Twilio’s blog tutorial of December 3, 2025, written by a community contributor. A guide, not a service.
Hosted endpoint exposing Zapier’s SendGrid actions, with Zapier holding the credentials.
Commercial hosted server wrapping Pipedream’s SendGrid components.
SendGrid scores well on authoring and poorly on operating. The docs server improves the odds an agent writes correct SendGrid code first time, because it retrieves real schemas instead of recalling a 2022 blog post. Putting an agent in the send path means handing an SG. key to a community server you do not control, paying an aggregator to hold it, or wrapping an official SDK in your own MCP server. The third is a day of work and usually right for production volume.
Everything modern lives under /v3/. There is one transactional send endpoint and a much larger Marketing Campaigns surface with different pagination and a different object model — treating them as one API is the commonest confusion.
| Base URL (global) | https://api.sendgrid.com/v3/ |
| Base URL (EU residency) | https://api.eu.sendgrid.com — required for EU subusers |
| Current version | v3 RECOMMENDED |
| Legacy version | Web API v2, form-encoded at /api/mail.send.json |
| Response format | JSON. Mail Send returns 202 plus X-Message-Id |
| Auth header | Authorization: Bearer SG.xxxx |
| Pagination (core v3) | limit + offset; limit 1–1000, default 10 |
| Pagination (Marketing) | page_size (max 1000) + page_token, with _metadata |
| Subuser impersonation | on-behalf-of: <subuser_username> |
| SMTP relay | smtp.sendgrid.net — see SMTP settings |
| Inbound routing | MX on mx.sendgrid.net, priority 10 |
Two pagination models is a migration hazard. A helper that walks limit and offset returns the same first page forever against /v3/marketing/lists, which ignores offset and expects you to follow _metadata.next until it is absent. Write one pager that branches on _metadata. A third interface is easy to forget: the SMTP relay accepts an X-SMTPAPI header carrying JSON instructions — substitutions, categories, unsubscribe groups, scheduling.
The primary method for every v3 endpoint. Create the key under Settings › API Keys and send it as Authorization: Bearer SG.xxxx. Keys are shown once at creation, and the same string doubles as the SMTP password — a leaked key is a full-send compromise unless you constrained it.
Keys can be restricted to specific permission scopes instead of Full Access. A transactional sender should carry Mail Send and nothing else — the difference between a leaked credential that can send spam and one that can also read your contact database. GET /v3/scopes returns the scopes on the calling key.
A parent-account key acts as one of its subusers by adding on-behalf-of: <subuser_username>. This is how multi-tenant platforms isolate reputation per client without minting a key per tenant. Subuser management is Pro tier and above.
The relay authenticates with AUTH LOGIN over STARTTLS or implicit TLS. The username is the literal lowercase string apikey and the password is the full API key. Port and TLS detail lives on the SMTP settings tab.
OAuth 2.0 client credentials exists for the Event Webhook, where SendGrid is the client: it fetches a token from your Token URL and presents it when POSTing events. It is not an inbound auth method for the REST API.
Authenticating v3 with your account username and password is deprecated and no longer supported. Any tutorial or plugin still asking for a SendGrid login rather than an API key describes a dead path — if it works, it is hitting legacy v2. The same trap applies to SMTP: that username field takes apikey, never your email address.
| Limit | Value | Notes |
|---|---|---|
| Mail Send throughput | 10,000 req/s | Published for POST /v3/mail/send |
| Recipients per message | 1,000 | Across every to, cc and bcc in all personalizations |
| Total message size | 30 MB | Including base64-encoded attachments |
| Concurrent SMTP connections | 10,000 | From a single server to the relay |
| Messages per SMTP connection | 5,000 | Reconnect after this many on one session |
| Inbound Parse size | 30 MB | Spam checking only runs under 2.5 MB |
| Email Activity query | 160 conditions | Limit 1–1000; needs the paid add-on |
| Event Webhook endpoints | 2 / 5 | Essentials / Pro and Premier |
| Other v3 endpoints | Not published | Enforced per endpoint but never numbered |
SendGrid publishes no emails-per-hour cap anywhere. Throughput is bounded by your plan’s monthly volume, dedicated-IP warmup state, and per-endpoint limits that are enforced but unnumbered. Read the headers instead: every v3 response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset (a Unix timestamp). Back off as Remaining nears zero and sleep until Reset on an HTTP 429 rather than pinning a rate in config. Teams needing a contractual figure end up on Amazon SES, where the send rate is an explicit, raisable quota.
Twilio maintains 7 first-party libraries under the sendgrid GitHub organisation. All wrap the same v3 surface; the mail helpers differ in ergonomics, not capability. Alongside them sit smtpapi header helpers and Event Webhook signature-verification helpers for the same languages.
| Language | Package | Install | Repo |
|---|---|---|---|
| Python | sendgrid | pip install sendgrid | sendgrid-python |
| Node.js | @sendgrid/mail | npm i @sendgrid/mail | sendgrid-nodejs |
| PHP | sendgrid/sendgrid | composer require sendgrid/sendgrid | sendgrid-php |
| Ruby | sendgrid-ruby | gem install sendgrid-ruby | sendgrid-ruby |
| Java | com.sendgrid:sendgrid-java | Maven or Gradle coordinate | sendgrid-java |
| C# / .NET | SendGrid | dotnet add package SendGrid | sendgrid-csharp |
| Go | sendgrid-go | go get github.com/sendgrid/sendgrid-go | sendgrid-go |
Twilio calls several of these repos community-driven: SendGrid leads them, but release tags lag commit activity. The Python library’s v6.12.5 tag dates to September 19, 2025 and the Go library’s v3.16.1 to May 29, 2025, with repo activity into June 2026. Fine for Mail Send; less fine when a new Marketing Campaigns field has no typed helper for months. When an SDK lags, use the raw HTTP client each library exposes.
Most teams reach SendGrid through a framework bridge. Symfony ships an official transport, symfony/sendgrid-mailer, driven by a sendgrid:// DSN. Django users take Anymail, whose backend also handles inbound and tracking webhooks. On Drupal, the SendGrid Integration module sends through the Web API; on WordPress the dominant route is WP Mail SMTP’s SendGrid mailer, which routes wp_mail() through the API rather than SMTP.
The fifteen resources below carry the traffic in most integrations. Full schemas are in the official v3 API reference.
| Resource | Methods | Description |
|---|---|---|
| Mail Send /v3/mail/send | POST | Transactional send. Returns 202 plus X-Message-Id. |
| Scheduled Sends /v3/user/scheduled_sends | GET, POST, PATCH, DELETE | Pauses or cancels mail queued with send_at, by batch_id. |
| Email Activity /v3/messages | GET | Filtered delivery search. Requires the paid history add-on. |
| Marketing Contacts /v3/marketing/contacts | GET, PUT, DELETE | Async upsert by email onto lists. Returns a job_id you poll. |
| Contact Search /v3/marketing/contacts/search | POST | SQL-like segmentation query by field value or engagement. |
| Marketing Lists /v3/marketing/lists | GET, POST, PATCH, DELETE | CRUD for contact lists, paginated by page_token. |
| Segments 2.0 /v3/marketing/segments/2.0 | GET, POST, PATCH, DELETE | Dynamic segments over contact fields and engagement events. |
| Single Sends /v3/marketing/singlesends | GET, POST, PATCH, DELETE | One-off marketing sends. Separate from /v3/mail/send. |
| Templates /v3/templates | GET, POST, PATCH, DELETE | Handlebars templates; versions under /versions. |
| Suppressions /v3/suppression/bounces | GET, DELETE | Bounces, plus sibling blocks, spam reports and unsubscribes. |
| Unsubscribe Groups /v3/asm/groups | GET, POST, PATCH, DELETE | Per-stream opt-out groups and their suppressions. |
| Event Webhook /v3/user/webhooks/event/settings/all | GET, POST, PATCH, DELETE | Endpoints, event types, signing and OAuth settings. |
| Inbound Parse /v3/user/webhooks/parse/settings | GET, POST, PATCH, DELETE | Hostname-to-URL mappings; /parse/stats returns volume. |
| Domain Authentication /v3/whitelabel/domains | GET, POST, PATCH, DELETE | Creates and validates sending domains; returns DNS records. |
| Statistics /v3/stats | GET | Aggregated stats by day, week or month, with geo variants. |
The cheapest auth check there is: it tells you not just whether the key is valid but what it may do — the real question when a send returns 403.
curl -sS -X GET "https://api.sendgrid.com/v3/scopes" \
-H "Authorization: Bearer $SENDGRID_API_KEY"
# 200 OK -> { "scopes": [ "mail.send", ... ] }
# 401 means the key is wrong or revoked. A 200 whose scopes
# array lacks "mail.send" is why your send returns 403.# pip install sendgrid
import os
import sendgrid
from sendgrid.helpers.mail import Mail, Email, To, Content
sg = sendgrid.SendGridAPIClient(api_key=os.environ.get('SENDGRID_API_KEY'))
message = Mail(
Email('sender@yourdomain.com'),
To('recipient@example.com'),
'Sending with SendGrid is Fun',
Content('text/plain', 'and easy to do anywhere, even with Python')
)
response = sg.client.mail.send.post(request_body=message.get())
print(response.status_code) # 202 Accepted
print(response.headers.get('X-Message-Id'))// npm install --save @sendgrid/mail
const sgMail = require('@sendgrid/mail');
sgMail.setApiKey(process.env.SENDGRID_API_KEY);
const msg = {
to: 'recipient@example.com',
from: 'sender@yourdomain.com', // verified sender or authenticated domain
subject: 'Sending with Twilio SendGrid is Fun',
text: 'and easy to do anywhere, even with Node.js',
};
(async () => {
try {
const [response] = await sgMail.send(msg);
console.log(response.statusCode); // 202
} catch (error) {
if (error.response) console.error(error.response.body);
}
})();Not your account email, not the key ID. The relay authenticates with username apikey in lowercase and the full SG. key as the password, and that key needs at least Mail Send permission. If you base64-encode credentials by hand, do it locally with openssl and check no newline crept in. See SMTP settings.
SendGrid announced on May 27, 2025 that the Free Email API and Free Marketing Campaigns plans were retiring over 60 days. Sending was then paused on free accounts, and accounts holding more than 100 contacts had them permanently deleted. What exists in 2026 is a trial of 100 emails per day for 60 days; paid tiers start at $19.95/month. If a free tier is a hard requirement, see Brevo or Amazon SES.
The Email Activity feed and its API only return extended history if you buy the Additional Email Activity History add-on, which extends retention to 30 days. Without it a debugging query against /v3/messages will not return what you expect, and reseller or very-high-volume accounts cannot use the feed at all. Treat the Event Webhook as your source of truth and store events yourself; Postmark bundles message history instead of charging for it.
Regional EU sending, launched April 23, 2024, is not a checkbox. You need an EU Data Resident subuser, a dedicated IP provisioned in the EU, and calls to https://api.eu.sendgrid.com. It is Pro tier or higher. Miss any one and you get an error stating the user “is not authorized to send mail based on their regional attribute”; EU subusers cannot send from global IPs.
The old v2 mail endpoint is why so much legacy SendGrid code keeps working untouched. But on July 9, 2025 its recipients-per-request limit dropped from 10,000 to 1,000, and batch jobs sending ten thousand recipients in one call broke overnight. New work should use POST /v3/mail/send, capped at 1,000 recipients under a 30 MB ceiling.
https://api.eu.sendgrid.com base URL.Track changes at the official Twilio changelog. There is no SendGrid-only feed, so filter by product.
The global base URL is https://api.sendgrid.com/v3/, with an API key sent as a bearer token: Authorization: Bearer SG.xxxx. Create the key under Settings › API Keys and scope it to the minimum needed. EU data residency accounts call https://api.eu.sendgrid.com. Basic auth with account credentials is deprecated.
Install the official SDK (pip install sendgrid or npm install @sendgrid/mail), set your key from an environment variable, and call the mail send helper. Both wrap POST /v3/mail/send, which returns 202 Accepted with an empty body and an X-Message-Id header. A 202 means accepted, not delivered — the outcome arrives on the Event Webhook. See the code examples.
v3 is the current JSON REST API with bearer-token auth, the personalizations model, dynamic templates and the full Marketing Campaigns surface. v2 is a legacy form-encoded endpoint at /api/mail.send.json that still answers, which is why old integrations keep working. On July 9, 2025 its recipient limit was cut from 10,000 to 1,000. Use v3 for anything new.
Configure an HTTPS URL under Settings › Mail Settings › Event Webhook, or via /v3/user/webhooks/event/settings. SendGrid POSTs a JSON array of delivery events (processed, dropped, deferred, delivered, bounce), engagement events (open, click, spam report, unsubscribe) and account status changes. Every event carries sg_event_id — deduplicate on it — and sg_message_id. Enable the Signed Event Webhook: requests carry an ECDSA signature and timestamp, verified as SHA-256 over the timestamp plus the raw request bytes. Endpoints are plan-gated at 2 on Essentials, 5 on Pro and Premier.
Point an MX record for a dedicated subdomain such as parse.example.com at mx.sendgrid.net with priority 10, then map that hostname to a POST URL under Settings › Inbound Parse. SendGrid POSTs multipart/form-data containing headers, dkim, to, from, subject, text, html, sender_ip, envelope and attachment info. Turn on “POST the raw, full MIME message” if you handle attachments. Maximum inbound size is 30 MB and the hostname cannot be changed later.
Not one that sends email. Twilio operates an official server at https://mcp.twilio.com/docs, in Public Beta, which indexes Twilio and SendGrid API specs and exposes two read-only tools. It cannot execute SendGrid API calls. An alpha Twilio Labs server, @twilio-alpha/mcp, executes against Twilio’s core public API but does not document SendGrid email coverage. Everything that calls POST /v3/mail/send over MCP today is community-built, such as Garoth/sendgrid-mcp, or a commercial aggregator such as Zapier or Pipedream MCP.
This review follows our email infrastructure testing methodology. We disclose affiliate relationships in our editorial independence policy.