Email Integrations Guide: Connecting ESPs, CRMs & Marketing Platforms
Connect and unify your email stack across SendGrid, Mailgun, HubSpot, GoHighLevel, Amazon SES, and more. Learn API integration, webhook setup, and cross-platform analytics.
Why a Unified Email Stack Matters
The average mid-market company in 2026 sends email through at least three different platforms. A marketing automation tool handles campaigns and nurture sequences. A transactional email service fires password resets, order confirmations, and shipping notifications. A CRM sends sales outreach, meeting invitations, and follow-up sequences. Some organizations layer on additional tools for customer support ticketing, product notifications, or review requests. Each platform operates independently, with its own dashboard, its own metrics definitions, and its own alerting thresholds.
of email teams report using 3 or more sending platforms with no unified reporting layer
This fragmentation creates a blind spot that is both pervasive and dangerous. When your marketing emails bounce at 4% on HubSpot while your transactional emails bounce at 1.2% on SendGrid, the discrepancy might signal a list quality problem, an authentication misconfiguration on one platform, or even a blacklisting event that only affects certain sending IPs. But if each team monitors only its own dashboard, nobody sees the full picture. The marketing team assumes their bounce rate is normal. The engineering team never looks at marketing metrics. And the deliverability problem festers for weeks before someone connects the dots.
The consequences of siloed analytics are concrete and measurable. Deliverability incidents that could be caught in minutes with cross-platform monitoring take an average of 3-7 days to identify when teams rely on individual ESP dashboards. During that window, domain reputation degrades, complaint rates climb, and inbox placement erodes across all sending streams -- not just the one where the problem originated. A spam trap hit on your marketing platform can drag down your transactional email reputation if both share the same root domain, and you will not know it happened until password reset emails start landing in spam.
Unifying your email stack is not about replacing your existing tools. It is about building a connective tissue layer that ingests events from every platform, normalizes them into a common data model, and presents a single source of truth for deliverability health. This integration layer answers questions that no single ESP can answer on its own: Is our overall bounce rate trending up, or is it isolated to one platform? Did the authentication failure on our subdomain propagate to other sending streams? Which ESP is delivering the best inbox placement for Gmail recipients right now?
The business case is straightforward. Companies that implement unified email analytics report 40-60% faster incident detection, 25% lower average complaint rates (because cross-platform suppression prevents sending to addresses that bounced elsewhere), and significantly reduced engineering time spent manually cross-referencing dashboards during outages.
ESP Integration Landscape in 2026
The email service provider market has matured into four distinct categories, each optimized for different use cases, team sizes, and technical requirements. Understanding this landscape is essential for choosing the right integration approach, because the APIs, webhook capabilities, and event models vary dramatically across categories.
Transactional-first ESPs like Postmark, Mailgun, and SparkPost are built for developers. Their APIs are RESTful, well-documented, and optimized for high-throughput programmatic sending. Webhook support is robust, with granular event types and signature verification built in. These platforms excel at password resets, order confirmations, and any email triggered by user actions in your application. Their deliverability is typically excellent for transactional mail because they enforce strict sending policies and actively monitor for abuse on their shared infrastructure.
Marketing automation platforms like HubSpot, Mailchimp, Klaviyo, and ActiveCampaign focus on campaigns, sequences, and audience segmentation. Their APIs tend to be broader but shallower -- designed for CRM synchronization and contact management rather than raw message sending. Webhook support varies widely; HubSpot offers comprehensive webhook workflows, while some platforms require polling their API for event data. These tools are optimized for marketers, not engineers, which means integration often requires translating between marketing-oriented data models and technical deliverability metrics.
All-in-one platforms like SendGrid and GoHighLevel attempt to serve both transactional and marketing use cases. SendGrid, owned by Twilio, offers one of the most mature email APIs in the market with granular event webhooks, dedicated IP management, and strong developer documentation. GoHighLevel targets agencies and small businesses with a bundled CRM-plus-email platform that simplifies operations but provides fewer integration hooks for advanced monitoring. These platforms are popular precisely because they reduce the number of tools in the stack, but they can become single points of failure if not monitored externally.
Infrastructure providers like Amazon SES and Google Workspace SMTP relay sit at the lowest layer of the stack. Amazon SES offers raw email sending at extremely low cost ($0.10 per 1,000 emails) with a powerful but complex API. It requires more manual configuration -- reputation management, bounce handling, and complaint processing are your responsibility, not the platform's. SES is the backbone for many SaaS products that need high-volume, low-cost email delivery with full control. Note that engagement metrics (opens, clicks) require enabling Virtual Deliverability Manager (VDM) in the SES console -- without it, the SES API does not expose open/click data, even though the SES console displays it internally.
The integration complexity varies enormously across these categories. Connecting SendGrid or Mailgun to an external monitoring platform typically takes 15-30 minutes: generate an API key, configure a webhook endpoint, and start receiving events. Integrating HubSpot or Mailchimp may require OAuth flows, custom webhook workflows, and API polling to get equivalent event coverage. Amazon SES requires configuring SNS (Simple Notification Service) topics, setting up SES configuration sets, enabling Virtual Deliverability Manager (VDM) for engagement metrics, and routing events through AWS infrastructure before they reach your monitoring layer.
API Integration Patterns
Every ESP integration starts with the API -- the programmatic interface through which your applications send email and retrieve delivery data. The two dominant patterns are REST APIs and SMTP relay, and the choice between them affects everything from error handling to observability.
REST APIs are the modern standard. You construct an HTTP POST request with your message content, recipient, headers, and metadata as a JSON payload, send it to the ESP's API endpoint, and receive a synchronous response with a message ID and acceptance status. REST APIs offer richer functionality than SMTP: you can pass custom metadata (tags, categories, unique arguments) that flow through to webhook events, making it possible to trace a specific delivery event back to the campaign, user action, or application feature that triggered it. SendGrid's v3 Mail Send API, Mailgun's Messages endpoint, and Amazon SES's SendEmail action all follow this pattern.
SMTP relay uses the traditional email protocol. Your application connects to the ESP's SMTP server (e.g., smtp.sendgrid.net:587), authenticates with credentials, and submits the email using standard SMTP commands. SMTP relay is simpler to configure in legacy applications, email clients, and platforms that don't support REST API integration. The tradeoff is less visibility: SMTP doesn't support custom metadata natively (though some ESPs allow X-headers for tagging), error responses are limited to SMTP status codes, and there is no synchronous message ID returned for tracking.
Rate limiting is a critical consideration for any API integration. Every ESP enforces rate limits to protect their infrastructure. SendGrid allows 10,000 API calls per second on higher-tier plans. Mailgun defaults to 300 messages per minute on free accounts. Amazon SES starts with a sending rate of 1 email per second for new accounts and scales to hundreds per second as your account matures. Your integration must implement exponential backoff with jitter: when you receive a 429 (Too Many Requests) response, wait an increasing interval before retrying, with a random offset to prevent thundering herd problems when multiple processes retry simultaneously.
Idempotency prevents duplicate sends during retries. If your API call to SendGrid times out, you don't know whether the email was sent or not. Without an idempotency mechanism, retrying the call might send the email twice. Some ESPs (like Postmark) support idempotency keys -- a unique identifier you include with each request, so the ESP can deduplicate retries. For ESPs that don't support this natively, implement idempotency at the application layer by tracking message IDs in your database before sending.
Rotate your API keys every 90 days and immediately after any team member with access leaves the organization. Store keys in a secrets manager (AWS Secrets Manager, HashiCorp Vault, or your platform's built-in secrets store) rather than environment variables or configuration files. Never commit API keys to version control -- even in private repositories. A single leaked SendGrid API key can be exploited to send millions of phishing emails through your domain within hours, destroying your sender reputation.
Retry logic should distinguish between transient and permanent failures. A 500 (Internal Server Error) or 429 (Rate Limited) response is transient -- retry with backoff. A 400 (Bad Request) or 401 (Unauthorized) response is permanent -- retrying won't help. A 413 (Payload Too Large) response requires reducing your batch size. Building this distinction into your integration prevents both lost emails (from failing to retry transient errors) and wasted resources (from endlessly retrying permanent failures).
Webhook Architecture for Real-Time Events
While APIs handle the outbound flow -- sending emails and querying status -- webhooks handle the inbound flow of event data. A webhook is an HTTP POST request that the ESP sends to your server whenever something happens to an email you sent. Instead of polling the ESP's API every few seconds to check whether an email was delivered, you register a webhook endpoint and the ESP pushes events to you in real time.
The core event types that every ESP reports through webhooks include: delivered (the receiving server accepted the email), bounced (the receiving server rejected the email, either hard or soft), opened (the recipient loaded tracking pixel), clicked (the recipient clicked a tracked link), complained (the recipient marked the email as spam), and unsubscribed (the recipient clicked the unsubscribe link). Some ESPs provide additional granularity: SendGrid reports "deferred" (temporary delivery failure, will retry), "dropped" (suppressed before sending due to prior bounce or unsubscribe), and "processed" (accepted by SendGrid's infrastructure for delivery). Mailgun distinguishes between "permanent failure" and "temporary failure" within its bounce events.
Webhook security is non-negotiable. Without verification, anyone who discovers your webhook URL can send forged events to your system -- marking real emails as bounced, injecting fake complaint data, or triggering suppression of valid addresses. Every major ESP provides a signature verification mechanism. SendGrid signs webhook payloads with an ECDSA signature that you verify against their public key. Mailgun includes an HMAC signature using your API key as the secret. Amazon SES signs SNS notifications with an X.509 certificate. Your webhook handler must validate every incoming request's signature before processing it. Reject any request that fails verification with a 403 response.
Payload normalization is where integration complexity lives. Each ESP structures its webhook payload differently. SendGrid sends an array of event objects with a top-level event field. Mailgun sends individual events with an event-data wrapper containing a event string. Amazon SES wraps everything in an SNS notification envelope with a nested Message field containing JSON-encoded SES event data. Postmark sends events with a RecordType field. Your webhook ingestion layer must parse each ESP's format, extract the relevant fields, and normalize them into a consistent internal schema before storage or processing.
Webhooks are not guaranteed to arrive in order, exactly once, or at all. Network failures, ESP outages, and your own endpoint downtime can cause missed or duplicated events. Design your webhook handler to be idempotent (processing the same event twice produces the same result) and implement a reconciliation process that polls ESP APIs periodically to catch any events your webhooks missed. SendGrid recommends maintaining a reconciliation window of at least 24 hours. Store raw webhook payloads in an append-only log so you can reprocess them if your normalization logic changes.
Webhook endpoint design matters for reliability. Your handler should accept the payload, return a 200 response immediately, and process the event asynchronously via a message queue (SQS, RabbitMQ, Redis). If your handler takes too long to respond (more than 5-10 seconds), the ESP will consider the delivery failed and retry, potentially creating duplicate events. Most ESPs retry failed webhook deliveries with exponential backoff for 24-72 hours before giving up. Configure alerting on your webhook endpoint's error rate so you know immediately when events are failing to ingest.
Cross-Platform Event Normalization
The single greatest technical challenge in building a multi-ESP integration is event normalization -- translating the different terminologies, taxonomies, and data structures that each ESP uses into a unified event model that your analytics platform can reason about consistently.
The problem is deeper than it appears on the surface. Consider something as fundamental as a "bounce." SendGrid distinguishes between "bounce" (hard bounce, permanent failure), "blocked" (rejected due to reputation or content filtering), and "dropped" (suppressed before sending). Mailgun classifies bounces into "permanent" (5xx SMTP codes) and "temporary" (4xx SMTP codes) failures. Amazon SES categorizes bounces as "Permanent" (with sub-types Undetermined, General, NoEmail, Suppressed) and "Transient" (with sub-types General, MailboxFull, MessageTooLarge, ContentRejected, AttachmentRejected). Postmark uses "HardBounce," "SoftBounce," "SpamNotification," and "ManuallyDeactivated." These are not just different labels for the same thing -- they represent genuinely different categorization philosophies.
Building a unified event model requires making deliberate mapping decisions for each of these edge cases. Your normalized schema should include at minimum: a canonical event type (from a fixed enumeration), the original ESP event type (for debugging), a severity level (for bounces and failures), the recipient address, the message ID (both your internal ID and the ESP's ID), the timestamp, the ESP name, and any additional metadata like SMTP response codes, bounce classification, or engagement user agents.
The mapping layer should be explicit and version-controlled. Create a configuration file or mapping table that defines exactly how each ESP event translates to your canonical types. When an ESP changes their event taxonomy (which happens -- SendGrid has revised their event structure twice in the past three years), you update the mapping configuration rather than rewriting your processing logic. This approach also makes it straightforward to add new ESPs: define the mapping for the new provider, deploy it, and your entire downstream analytics pipeline works without modification.
One particularly tricky normalization challenge is timestamp handling. ESPs report event timestamps in different formats and timezones. SendGrid uses Unix timestamps (integers). Mailgun uses RFC 2822 formatted strings. Amazon SES uses ISO 8601. Postmark uses ISO 8601 with millisecond precision. Your normalization layer must parse all of these into a consistent format -- UTC ISO 8601 with millisecond precision is the industry standard -- and handle edge cases like clock skew between ESPs that can make events appear out of order.
OAuth vs API Key Authentication
Integrating with email platforms requires authentication, and the two dominant mechanisms -- API keys and OAuth 2.0 -- serve different use cases with different security profiles. Choosing the right one depends on who is connecting, what access they need, and how long the connection should persist.
API keys are static credentials: a long, random string that you include in the Authorization header of every API request. They are simple to implement, universally supported by ESPs, and well-suited for server-to-server integrations where your backend communicates directly with the ESP's API. The integration pattern is straightforward: generate a key in the ESP's dashboard, store it in your secrets manager, and include it in requests. SendGrid, Mailgun, Postmark, and SparkPost all use API keys as their primary authentication mechanism.
The security risk with API keys is their static nature. A key that is leaked, committed to a public repository, or stolen from a compromised server grants access until it is manually revoked. There is no expiration, no automatic rotation, and no scope limitation (unless the ESP supports scoped keys, which SendGrid and Mailgun do). This makes API key hygiene critical: rotate keys on a scheduled basis, use scoped keys with the minimum required permissions, and monitor API usage for anomalous patterns that might indicate a compromised key.
OAuth 2.0 is a delegated authorization framework where a user explicitly grants your application permission to access their account on a third-party platform. Instead of a static key, OAuth uses short-lived access tokens (typically valid for 1 hour) and long-lived refresh tokens (valid for days or months) that your application exchanges for new access tokens as needed. HubSpot, Mailchimp, and Google Workspace APIs use OAuth 2.0 as their primary authentication mechanism.
OAuth is the right choice when you are building an application that connects to a user's account on their behalf -- for example, a deliverability monitoring platform that reads a customer's HubSpot email analytics. The user authorizes the connection through the ESP's consent screen, your application receives an authorization code, exchanges it for tokens, and stores the refresh token securely. When the access token expires, your application uses the refresh token to obtain a new one without requiring the user to re-authorize.
The OAuth token refresh flow requires careful error handling. Refresh tokens can be revoked by the user, expired by the provider, or invalidated by a password change. Your integration must handle invalid_grant errors gracefully by notifying the user that re-authorization is required, rather than silently failing and missing event data. Implement a health check that periodically validates your stored tokens and alerts when any connection becomes unhealthy.
Scope management is an OAuth-specific concern. When requesting authorization, your application specifies the scopes (permissions) it needs. Request only the minimum scopes required for your integration. If you only need to read email analytics, don't request write access to send emails. Over-scoped tokens are a security liability -- if the token is compromised, the attacker can do more damage.
Pro Tip from Boxset Team
Apply the principle of least privilege to every ESP connection. For API keys, use scoped keys restricted to only the endpoints your integration needs -- read-only access to stats and event data, not full send permissions. For OAuth, request the narrowest scopes possible. A monitoring integration should never need the ability to send emails or modify contacts. Audit your active connections quarterly and revoke any credentials that have broader access than necessary.
In practice, most multi-ESP monitoring setups use a hybrid approach: API keys for direct ESP connections (SendGrid, Mailgun, SES) where your server talks to the ESP, and OAuth for platform connections (HubSpot, Mailchimp, Google Postmaster Tools) where you are accessing a user's account data. The authentication method is typically dictated by the ESP, not by your preference.
Building a Multi-ESP Dashboard
A multi-ESP dashboard is the operational nerve center of your email program. It aggregates metrics from every sending platform into a single view, normalizes event data into consistent definitions, and surfaces anomalies that would be invisible when monitoring each ESP in isolation. Building one requires deliberate decisions about which metrics to unify, how to aggregate them, and how to handle the inherent latency differences between platforms.
The core metrics that every multi-ESP dashboard should display are: delivery rate (emails accepted by receiving servers divided by emails sent), bounce rate (hard bounces plus soft bounces divided by emails sent, broken down by type), complaint rate (spam complaints divided by emails delivered -- the metric mailbox providers use), inbox placement rate (emails reaching the inbox versus spam, which requires seed testing or inference), and engagement rates (opens and clicks, acknowledging the limitations of pixel-based open tracking in a post-MPP world). Each metric should be viewable in aggregate across all ESPs, per ESP, per sending domain, and per mailbox provider destination where the data is available.
The aggregation strategy depends on your data latency requirements. Real-time syncing via webhooks provides sub-second visibility into delivery events and is essential for detecting acute problems like a sudden spike in bounces or a blacklisting event. Batch syncing via periodic API polling (every 5-15 minutes) fills in gaps that webhooks miss and provides reliable aggregate statistics for reporting. The best dashboards use both: webhooks for real-time alerting and API polling for reconciliation and aggregate accuracy.
Cross-ESP correlation is where the dashboard provides value that no single ESP can offer. When your SendGrid bounce rate spikes from 1% to 5%, the first question is whether the problem is ESP-specific or list-wide. If Mailgun bounces remain at 1%, the issue is likely with SendGrid's infrastructure or your SendGrid configuration. If Mailgun bounces also spike, the problem is almost certainly a list quality issue or a blacklisting event. This correlation, which is trivial when all data lives in one dashboard, is nearly impossible when teams are logging into separate ESP portals.
Dashboard design should prioritize actionability over comprehensiveness. A wall of charts showing every metric for every ESP creates noise, not clarity. The most effective multi-ESP dashboards use a tiered layout: a top-level health score or traffic-light indicator for each ESP, a mid-level comparison view showing key metrics side-by-side across ESPs, and a detailed drill-down view for investigating specific events or time ranges. Alerting should surface problems proactively so the dashboard serves as a diagnostic tool, not a monitoring burden that requires constant watching.
How Boxset Connects Your Entire Stack
Building the integration infrastructure described in the preceding sections -- webhook handlers, event normalization, cross-platform suppression, anomaly detection -- is a significant engineering investment. For teams that send through two or three ESPs, the initial build can take 2-4 weeks of developer time, and ongoing maintenance (handling API changes, updating event mappings, managing credential rotation) adds a continuous operational burden.
Boxset eliminates this integration tax entirely. The platform provides pre-built connectors for every major ESP and marketing platform, with a setup process that takes minutes rather than weeks. You authenticate with your ESP (via API key or OAuth, depending on the platform), Boxset automatically configures webhook endpoints or API polling on your behalf, and normalized event data begins flowing into your unified dashboard immediately.
Connect Your Email Stack in Minutes
Boxset's one-click integrations with SendGrid, Mailgun, Amazon SES, HubSpot, Postmark, and 20+ other platforms give you a unified deliverability dashboard without any engineering effort.
Start Connecting ESPsOne-click ESP connections abstract away the complexity of API authentication, webhook configuration, and permission management. For API-key-based ESPs like SendGrid and Mailgun, you paste your scoped read-only key and Boxset handles the rest -- configuring webhook endpoints on the ESP, verifying connectivity, and beginning event ingestion. For OAuth-based platforms like HubSpot, Boxset's OAuth flow requests only the minimum required scopes and manages token refresh automatically. If a token expires or is revoked, Boxset alerts you immediately rather than silently losing data.
Normalized webhooks are the core of Boxset's integration layer. Every event from every ESP is parsed, validated, and mapped to Boxset's canonical event schema before it reaches your dashboard. The normalization handles all the edge cases described earlier: timestamp standardization, bounce classification mapping, engagement event deduplication, and suppression synchronization. When SendGrid changes their webhook payload format (as they did in their v3 Event Webhook update), Boxset's normalization layer absorbs the change transparently -- your dashboard and alerts continue working without any action on your part.
The unified dashboard presents cross-ESP metrics in a single view with drill-down capability. You see your aggregate delivery rate, bounce rate, and complaint rate across all platforms, with the ability to segment by ESP, sending domain, mailbox provider, or time range. Anomaly detection runs continuously across all data streams, correlating events across ESPs to provide instant triage context. When an alert fires, it tells you not just that bounces spiked, but whether the spike is isolated to one ESP or affecting your entire sending infrastructure -- the critical first question in any incident response.
Cross-platform suppression synchronization ensures that a hard bounce on any connected ESP triggers suppression across all of them within minutes. This single feature -- which is extremely difficult to build and maintain in-house -- prevents the cascading reputation damage that occurs when invalid addresses continue receiving email through platforms that don't know about bounces on other platforms.
ESP Setup Guides for Boxset
Ready to connect your email stack? Follow our step-by-step guides for each provider:
Each guide covers both the initial connection (API key or OAuth) and event tracking setup (webhooks). Most providers take 5-10 minutes to fully configure. For reputation monitoring, see our Google Postmaster Tools setup guide.
Frequently Asked Questions
Unify Your Email Stack
Connect SendGrid, Mailgun, HubSpot, GoHighLevel, Amazon SES, and more. See cross-platform insights no single tool can provide.
Connect Your Tools