skills/sales-mailgun/SKILL.md
Mailgun (Sinch) platform help — developer-first transactional email API and SMTP relay with inbound routing, webhooks, and Mailgun Optimize deliverability tools. Use when Mailgun emails not delivering, DNS records (DKIM/SPF) failing verification, inbound routing not catching messages, webhooks not firing, templates rendering wrong, Mailgun Optimize showing poor inbox placement, or API calls returning errors. Do NOT use for general email deliverability strategy (use /sales-deliverability), cross-platform email marketing (use /sales-email-marketing), or email open/click tracking strategy (use /sales-email-tracking).
npx skillsauth add sales-skills/sales sales-mailgunInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Help the user with Mailgun (Sinch) platform questions — from sending transactional email via the REST API and SMTP relay through Inbound Email Routing, Templates, Mailing Lists, Domains, Routes, Webhooks, Metrics, and Mailgun Optimize. Mailgun is a developer-first transactional email API service founded in 2010 by Ev Kontsevoy and Taylor Wakefield, acquired by Rackspace (2012), Thoma Bravo (2019), and Sinch (2021). Josh Odom is President of the Sinch Developer & Email unit.
If references/learnings.md exists, read it first for accumulated knowledge.
Ask the user:
What area of Mailgun do you need help with?
POST /v3/{domain}/messages) or SMTP relayWhat's your role?
What are you trying to accomplish? (describe your specific goal or question)
If the user's request already provides most of this context, skip directly to the relevant step. Lead with your best-effort answer using reasonable assumptions (stated explicitly), then ask only the most critical 1-2 clarifying questions at the end — don't gate your response behind gathering complete context.
Note: If the user needs a specialized skill, route them there with a brief explanation of why that skill is a better fit.
If the request maps to a specialized skill, route:
/sales-deliverability/sales-email-marketing/sales-email-tracking/sales-sendgrid/sales-postmark/sales-integration/sales-funnelOtherwise, answer directly from platform knowledge using the reference below.
Read references/platform-guide.md for detailed module documentation, pricing, integrations, and data model.
You no longer need the platform guide details — focus on the user's specific situation.
Based on the user's specific question:
Sending transactional email via the API:
include:mailgun.org, DKIM CNAME/TXT)GET /v3/domains/{domain}POST /v3/{domain}/messages with Basic Auth (api:YOUR_API_KEY), passing from, to, subject, and text/html fields/messages endpoints only for securityo:tag) and custom variables (v:my-var) for tracking and analyticsGET /v3/{domain}/events) or set up webhooks for real-time notificationsSetting up inbound email routing:
POST /v3/routes) or UI — define a match expression and actionmatch_recipient("[email protected]"), match_header("subject", ".*order.*"), catch_all()forward("https://yourapp.com/webhook"), forward("[email protected]"), store(notify="https://yourapp.com/notify")Setting up domain-level templates:
POST /v3/{domain}/templates with name, description, and initial version content{{first_name}}, {{order_number}}, {{items}}template parameter with the template name and h:X-Mailgun-Variables with the JSON data objectConfiguring webhooks for delivery tracking:
POST /v3/domains/{domain}/webhooks with the event type (e.g., delivered, opened, permanent_fail) and your endpoint URLUsing Mailgun Optimize for deliverability:
GET /v4/address/[email protected] — returns risk level (deliverable, undeliverable, risky, unknown)Best-effort from research — review these, especially items about plan-gated features and integration gotchas that may be outdated.
https://api.mailgun.net/v3/, EU domains use https://api.eu.mailgun.net/v3/. Once a domain is created in a region, it cannot be moved to the other. If you need EU data residency for GDPR compliance, create the domain in the EU region from the start. Using the wrong base URL will return authentication errors that can be confusing to debug./messages endpoints for security isolation. Using a Domain Sending Key for other API calls will return 401 errors.references/learnings.md with today's date./sales-deliverability — Cross-platform email deliverability — SPF/DKIM/DMARC, warmup, inbox placement/sales-email-marketing — Opt-in email marketing strategy across tools/sales-email-tracking — Email engagement tracking strategy/sales-integration — Connect Mailgun to CRM, Slack, or other tools via webhooks/Zapier/sales-sendgrid — SendGrid platform help — primary Mailgun competitor/sales-postmark — Postmark platform help — primary Mailgun competitor/sales-customerio — Customer.io platform help — uses Mailgun-like APIs for transactional/sales-do — Not sure which skill to use? The router matches any sales objective to the right skill. Install: npx skills add sales-skills/sales --skill sales-doUser says: "I need to send password reset and order confirmation emails from my Node.js app using Mailgun." Skill does:
include:mailgun.org), and DKIM DNS recordsmailgun.js SDK: initialize with API key and domain, then call mg.messages.create() with from, to, subject, html/text{{reset_url}}, {{expiry_minutes}}) and one for order confirmation ({{order_number}}, {{items}}, {{total}})delivered, permanent_fail, and complained events to monitor delivery health and trigger alerts
Result: User has production-ready transactional email with templates, scoped API keys, proper DNS authentication, and delivery monitoringUser says: "We want to receive customer reply emails at [email protected] and forward them to our ticketing webhook." Skill does:
ourdomain.com pointing to Mailgun's inbound serversmatch_recipient("[email protected]") with action forward("https://app.ourdomain.com/api/tickets/inbound")catch_all() to store unmatched inbound email for 3 days (store(notify="https://app.ourdomain.com/api/catchall")) so nothing is silently droppedUser says: "Our Mailgun emails are landing in spam at Gmail. How do we diagnose and fix this?" Skill does:
complained webhook events to identify content or recipients generating spam complaints
Result: User identifies the root cause of spam placement (e.g., missing DMARC, blocklisted IP, high bounce rate) and has a concrete remediation plan with ongoing monitoringSymptom: API calls return 401 Unauthorized for endpoints like GET /v3/domains or POST /v3/routes, but sending email works fine
Cause: Domain Sending Keys are restricted to /messages endpoints only. They cannot be used to manage domains, routes, webhooks, mailing lists, or any other Mailgun resource. This is by design for security isolation.
Solution: Use your main API key (found in the Mailgun dashboard under API Security) for non-sending operations. Reserve Domain Sending Keys for production sending code only. If you need to manage resources programmatically, store the main API key securely in environment variables and use it for admin operations in a separate service or deployment pipeline.
Symptom: You configured webhooks in Mailgun but your endpoint is not receiving any events — no requests appear in your server logs Cause: Common causes include: (1) the webhook URL is not publicly accessible (localhost or behind a firewall), (2) the endpoint is returning non-2xx status codes causing Mailgun to back off after retries, (3) the webhook was configured for the wrong domain, or (4) the events are not being generated (e.g., open/click tracking is not enabled). Solution: Verify your endpoint is publicly accessible — use a tool like ngrok for local development. Check the Mailgun dashboard under Sending > Webhooks for delivery status and recent attempts. Ensure your endpoint returns a 200 status code quickly (within a few seconds). Confirm the webhook is configured for the correct domain. For open/click events, verify tracking is enabled in domain settings. Test with a simple endpoint (e.g., webhook.site) to isolate whether the issue is with Mailgun's delivery or your endpoint's handling.
Symptom: API calls return 404 or authentication errors when trying to send email, even though the domain is verified and the API key is correct
Cause: The domain was created in one region (US or EU) but the API calls are being made to the other region's base URL. US domains must use https://api.mailgun.net/v3/, EU domains must use https://api.eu.mailgun.net/v3/. Domains cannot be moved between regions after creation.
Solution: Check which region your domain is in via the Mailgun dashboard (look for the region indicator on the domain page). Update your API base URL to match the domain's region. If you need to switch regions (e.g., for GDPR compliance), you must delete the domain and recreate it in the correct region — then re-verify DNS records. Update all application configuration, environment variables, and SDK initialization to use the correct regional URL.
tools
UpViral platform help — viral referral marketing and list-building platform (by Emarky) for viral sweepstakes, giveaway/reward campaigns, pre-launch waiting lists, and milestone referral programs, with REST API (app.upviral.com/api/v1/), callback-URL webhooks, PHP SDK, fraud detection (IP-based suspicious-referral flagging), A/B testing, smart leaderboards, unlockable incentives, and 30+ native ESP/CRM integrations (Mailchimp, ActiveCampaign, ConvertKit, AWeber, HubSpot, Klaviyo, Intercom) plus Zapier/Make/Pipedream/Integrately/Pabbly. Use when UpViral campaigns aren't tracking referral points correctly, deciding between Starter $79/mo annual (10K leads, 1 brand, NO API) vs Business $119/mo (25K, 2 brands, API + webhooks unlocked) vs Premium $319/mo (100K, 5 brands, dedicated account manager), the API returns errors because you're on the Starter tier where API/webhooks are gated, building an UpViral→CRM or UpViral→data-warehouse pipeline with add_contact / get_leads / get_leads_points / add_points / get_custom_fields / lists methods (uvapikey + uvmethod form-encoded POST), interpreting fraud flags where same-IP referrals get marked suspicious and you must manually activate/delete/blacklist, setting up the Callback URL (webhook) to fire on reward-unlock events, Zapier New Lead / New Reward Unlocked triggers not firing, ClickFunnels/Shopify/funnel-builder integration breaking, the drag-and-drop page builder showing broken widgets or limited customization, the setup feeling long and complicated for your first campaign, or picking UpViral over Viral Loops / KickoffLabs / Vyper / Prefinery / Gleam / KingSumo / ShortStack for a viral campaign. Do NOT use for general newsletter audience growth strategy across all platforms (use /sales-audience-growth), newsletter monetization (use /sales-newsletter), KickoffLabs-specific help (use /sales-kickofflabs), no-code merge-tag newsletter referrals (use /sales-referralkit), SparkLoop paid recommendations (use /sales-sparkloop), or full-stack multi-level Level-1/2/3 referral/affiliate tracking (use /sales-referralhero).
development
ReferralHero platform help — full-stack referral, affiliate, waitlist, contest, and NPS platform with subscriber API, webhooks, Zapier, Mailchimp/Kit/AWeber/Klaviyo/ActiveCampaign/SendLane connectors, coupon codes, multi-level referral tracking (Level 1/2/3), anti-fraud, and 5,000 calls/hour rate limit. Use when ReferralHero campaigns aren't tracking referrals correctly, deciding between PRO $199/mo (10K members, includes API + webhooks) and PREMIUM $399/mo (50K members, adds ReCaptcha + SMS verification), authentication is failing with no_token or X-API-Key header is being ignored, multi-level referral counts (Level 2/3) aren't appearing for downline subscribers, coupon group endpoints return 404 or coupon arrays max out, hitting the 5,000 calls/hour soft limit and getting too_many_calls 429s, the Mailchimp/Kit native integration is double-adding subscribers, webhook payloads aren't firing on confirmation events, importing Stripe customer IDs through transaction tracking, generating reward fulfillment when subscribers cross milestone thresholds (promote/unlock_promoted_reward), comparing ReferralHero against SparkLoop/ReferralKit/Viral Loops/GrowSurf/KickoffLabs for referral marketing, or routing referral data via add_bulk_transactions (500-transaction batch limit). Do NOT use for general newsletter audience growth strategy (use /sales-audience-growth), general newsletter monetization (use /sales-newsletter), no-code newsletter-only referral with merge-tag insertion (use /sales-referralkit), SparkLoop's paid recommendations or partner network (use /sales-sparkloop), or affiliate program strategy across many platforms (use /sales-affiliate-program).
tools
KickoffLabs platform help — viral marketing platform for pre-launch waitlists, bonus-entry giveaways, milestone-reward referral programs, leaderboard giveaways, and email opt-in bribes with REST API v1 + v2, server-side webhooks (in/out), KOL.js JavaScript library, AnyForm script for custom pages, fraud detection (duplicate_ip / bounced / duplidate_email flags), SMS verification add-on, native ESP integrations (Klaviyo, Mailchimp, ActiveCampaign, Brevo), website builders (Webflow, Wix, Squarespace, Weebly), Shopify, Facebook Audiences, Slack, Zapier. Use when KickoffLabs viral campaigns aren't tracking referrals correctly, deciding between Hobby $13/mo annual (500 leads/mo no A/B no reward emails) vs Premium $48/mo (2.5K + A/B + reward emails + tracking pixels) vs Business $99/mo (10K + custom email templates + custom domains + advanced reporting + 3 team) vs Enterprise $202/mo (25K + 5 team + SMS included), API key getting rejected because you embedded it in client-side JavaScript instead of server-side, can't decide whether to use v1 /subscribe vs v2 /tags/:TAG_ID/lead for lead creation, webhook payloads firing with `__fraudulent` flag and you need to interpret the duplicate_ip/bounced/duplidate_email reason codes (yes, duplidate is spelled that way in their docs), AnyForm script not posting to KickoffLabs vs native API endpoint, leaderboard endpoint returning more than 50 leads is not allowed, social_id (kid in share URLs) attribution chain breaking between v1 and v2, contest score vs lead count metrics in the webhook payload are confusing, SMS Verification only available on Premium+ as $50/mo add-on (Enterprise includes), per-month lead cap auto-upgrades at $8 per 1000 overage leads, picking between KickoffLabs and Viral Loops / UpViral / Prefinery / ReferralCandy / Voucherify for viral campaign type fit, or rate limit per tier (10-100 calls/minute) is hitting on bulk imports. Do NOT use for general newsletter audience growth strategy (use /sales-audience-growth), general newsletter monetization (use /sales-newsletter), no-code merge-tag-only newsletter referrals (use /sales-referralkit), SparkLoop paid recommendations + partner network (use /sales-sparkloop), or full-stack referral/affiliate with multi-level Level-1/2/3 tracking (use /sales-referralhero).
development
Routes any sales, marketing, ad, or GTM objective to the right specialized skill and outputs the install command for that skill plus a ready-to-paste prompt packed with the user's context. Asks clarifying questions when the objective is ambiguous, then hands back a copy-paste-runnable next step. Covers prospecting, outbound cadences, deals, proposals, forecasting, deliverability, enrichment, intent, content, coaching, CRO, SEO, launch directories, newsletters, email/SMS/push marketing, chatbots, influencer marketing, social media, employee advocacy, media relations, reviews, data hygiene, B2B advertising, retargeting, affiliate, loyalty, digital products, memberships, webinars, checkout, and platform-specific help. Use when the user has a sales or marketing question and isn't sure which skill to use, or wants a multi-skill sequence with a batch install command. Do NOT use to solve problems directly — this skill only routes.