Skip to main content
Mailgun logo

Overview

Add Mailgun to any ModuleX agent or workflow. Transactional email API integration for sending, receiving, and tracking email via the Mailgun REST API (api.mailgun.net).
Categories: Communication · Email · Auth: Mailgun API Key · Actions: 9

Authentication

Mailgun API Key

Authenticate using your Mailgun API key and region
1

Step 1

2

Step 2

Go to Settings > API Security
3

Step 3

Copy your Private API key
4

Step 4

Set MAILGUN_REGION to ‘EU’ if your account is on the EU infrastructure, otherwise leave as ‘US’

Required Credentials

Available Actions

Parameters

string
required
Mailgun domain name to send from
string
required
Sender display name
string
required
Sender email address
array
required
Recipient email address(es) as a list of strings
string
required
Email subject line
string
Plain text message body
string
HTML message body
string
Reply-to email address
boolean
Enable Mailgun test mode (message accepted but not delivered) (Default: true)
boolean
Enable or disable DKIM signatures on the message (Default: true)
boolean
Enable or disable tracking on the message (Default: true)

Response

Parameters

string
required
Email address to verify

Response

Parameters

string
required
Mailing list address (e.g. list@yourdomain.com)
string
required
Email address of the member to add
string
Display name of the member
object
Extra arbitrary member data as a JSON object
string
Subscription status: ‘yes’ (default) or ‘no’ for unsubscribed (Default: yes)
string
If ‘yes’, update existing member; if ‘no’, error on duplicate. Values: yes, no (Default: no)

Response

Parameters

integer
required
Route priority (lower numbers are evaluated first)
string
required
Human-readable description of the route
string
required
Mailgun route filter expression, e.g. match_recipient(’.*@example.com’)
array
required
List of route action strings, e.g. [‘forward(“dest@example.com”)’, ‘stop()‘]

Response

Parameters

string
required
Mailing list address (e.g. list@yourdomain.com)
string
required
Email address of the member to remove

Response

Parameters

string
Filter by domain state: active, unverified, disabled (Default: active)

Response

Parameters

string
required
Mailing list address (e.g. list@yourdomain.com)
string
Filter by subscription: ‘true’ for subscribed only, ‘false’ for unsubscribed only, or omit for all

Response

Parameters

string
required
Mailing list address (e.g. list@yourdomain.com)
string
required
Email address of the member to retrieve

Response

Parameters

string
required
Mailgun domain name
string
required
Email address to suppress
string
required
Suppression list category: bounces, unsubscribes, or complaints
string
Bounce error code (only for ‘bounces’ category) (Default: 550)
string
Bounce error message (only for ‘bounces’ category)
string
Tag to unsubscribe from (only for ‘unsubscribes’ category). Use ’*’ for all. (Default: *)

Response

Limits & Quotas

  • Free tier: 100 emails/day for the first 30 days (sandbox domain).
  • Paid plans: rate limits vary by plan; see https://www.mailgun.com/pricing/.
  • Email validation: billed separately per validation request.
  • Error model: non-2xx responses and timeouts are caught and returned as success=False + error rather than raising.

AgentMail

Gmail

Microsoft Outlook