Mailgun API integration with managed OAuth. Transactional email service for sending, receiving, and tracking emails.
Use this skill when users want to send emails, manage domains, routes, templates, mailing lists, or suppressions in Mailgun.
For other third party apps, use the api-gateway skill (https://clawhub.ai/byungkyu/api-gateway).
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Une commande directe contourne le prompt de vérification. Examinez la source avant de l'exécuter.
Mailgun API integration with managed OAuth. Transactional email service for sending, receiving, and tracking emails.
Use this skill when users want to send emails, manage domains, routes, templates, mailing lists, or suppressions in Mailgun.
For other third party apps, use the api-gateway skill (https://clawhub.ai/byungkyu/api-gateway).
Mailgun
Access the Mailgun API with managed OAuth authentication. Send transactional emails, manage domains, routes, templates, mailing lists, suppressions, and webhooks.
Replace {resource} with the actual Mailgun API endpoint path. The gateway proxies requests to api.mailgun.net/v3 (US region) and automatically injects your OAuth token.
Regional Note: Mailgun has US and EU regions. The gateway defaults to US region (api.mailgun.net).
Authentication
All requests require the Maton API key in the Authorization header:
Authorization: Bearer $MATON_API_KEY
Environment Variable: Set your API key as MATON_API_KEY:
If omitted, the gateway uses the default (oldest) active connection.
API Reference
Important: Mailgun API uses application/x-www-form-urlencoded for POST/PUT requests, not JSON.
Domains
List Domains
GET /mailgun/v3/domains
Returns all domains for the account.
Get Domain
GET /mailgun/v3/domains/{domain_name}
Create Domain
POST /mailgun/v3/domains
Content-Type: application/x-www-form-urlencoded
name=example.com&smtp_password=supersecret
Delete Domain
DELETE /mailgun/v3/domains/{domain_name}
Messages
Send Message
POST /mailgun/v3/{domain_name}/messages
Content-Type: application/x-www-form-urlencoded
from=sender@example.com&to=recipient@example.com&subject=Hello&text=Hello World
Parameters:
from (required) - Sender email address
to (required) - Recipient(s), comma-separated
cc - CC recipients
bcc - BCC recipients
subject (required) - Email subject
text - Plain text body
html - HTML body
template - Name of stored template to use
o:tag - Tag for tracking
o:tracking - Enable/disable tracking (yes/no)
o:tracking-clicks - Enable click tracking
o:tracking-opens - Enable open tracking
h:X-Custom-Header - Custom headers (prefix with h:)
v:custom-var - Custom variables for templates (prefix with v:)
Send MIME Message
POST /mailgun/v3/{domain_name}/messages.mime
Content-Type: multipart/form-data
to=recipient@example.com&message=<MIME content>
Events
List Events
GET /mailgun/v3/{domain_name}/events
Query parameters:
begin - Start time (RFC 2822 or Unix timestamp)
end - End time
ascending - Sort order (yes/no)
limit - Results per page (max 300)
event - Filter by event type (accepted, delivered, failed, opened, clicked, unsubscribed, complained, stored)
from - Filter by sender
to - Filter by recipient
tags - Filter by tags
Routes
Routes are defined globally per account, not per domain.
List Routes
GET /mailgun/v3/routes
Query parameters:
skip - Number of records to skip
limit - Number of records to return
Create Route
POST /mailgun/v3/routes
Content-Type: application/x-www-form-urlencoded
priority=0&description=My Route&expression=match_recipient(".*@example.com")&action=forward("https://example.com/webhook")
# List bounces
GET /mailgun/v3/{domain_name}/bounces
# Add bounce
POST /mailgun/v3/{domain_name}/bounces
Content-Type: application/x-www-form-urlencoded
address=bounced@example.com&code=550&error=Mailbox not found
# Get bounce
GET /mailgun/v3/{domain_name}/bounces/{address}
# Delete bounce
DELETE /mailgun/v3/{domain_name}/bounces/{address}
Unsubscribes
# List unsubscribes
GET /mailgun/v3/{domain_name}/unsubscribes
# Add unsubscribe
POST /mailgun/v3/{domain_name}/unsubscribes
Content-Type: application/x-www-form-urlencoded
address=unsubscribed@example.com&tag=*
# Delete unsubscribe
DELETE /mailgun/v3/{domain_name}/unsubscribes/{address}
Complaints
# List complaints
GET /mailgun/v3/{domain_name}/complaints
# Add complaint
POST /mailgun/v3/{domain_name}/complaints
Content-Type: application/x-www-form-urlencoded
address=complainer@example.com
# Delete complaint
DELETE /mailgun/v3/{domain_name}/complaints/{address}
Whitelists
# List whitelists
GET /mailgun/v3/{domain_name}/whitelists
# Add to whitelist
POST /mailgun/v3/{domain_name}/whitelists
Content-Type: application/x-www-form-urlencoded
address=allowed@example.com
# Delete from whitelist
DELETE /mailgun/v3/{domain_name}/whitelists/{address}
Statistics
Get Stats
GET /mailgun/v3/{domain_name}/stats/total?event=delivered&event=opened