Pipory
Node reference

Mailgun

Mailgun node reference - all 83 operations, the credential it needs, and a worked example.

Mailgun API (Email marketing), 83 operations: send email (attachments, templates, tags, scheduling, tracking, batch recipient variables) and raw MIME, stored-message retrieval and resend, sending queues; templates and template versions; bounce, unsubscribe, complaint and allowlist suppressions; mailing lists and members including bulk add and list validation; inbound routes; domain and account webhooks; logs, events, metrics and tags; domains; and email validation. US and EU regions.

Credential: Mailgun private API key - see Credentials.

API key types

Each operation below lists the API key type it needs. API key types are decided when the key is created in the Mailgun dashboard. Mailgun has no OAuth, no consent screen and no per-endpoint scopes - but it is not scope-free either, because it issues two kinds of key with very different reach. The primary account API key (Account Settings > API Keys > Private API key) can call every endpoint below for every sending domain. A Domain Sending Key (Sending > Domains > your domain > Domain Settings > Sending API keys) can call exactly two of them - POST /messages and POST /messages.mime, and only for the domain it was created under - so a sending key pasted into this node works for Send email and 401s on all 81 other operations. That is the single most common Mailgun credential mistake. A second axis fails identically without being a permission at all: keys are per-REGION, so a US key used against api.eu.mailgun.net (or the reverse) is indistinguishable from a wrong key - check the node's Region field before rotating anything. If a run fails with a permission error, the node names the missing API key type in the error - grant it and re-run; you do not need to rebuild the workflow.

Operations (83)

Messages

OperationWhat it doesAPI key type
sendMessageSend emailDomain Sending Key for this domain, or the primary account API key. This is one of only two endpoints a sending key can call.
sendMimeMessageSend email (raw MIME)Domain Sending Key for this domain, or the primary account API key. This is one of only two endpoints a sending key can call.
getStoredMessageGet a stored messagePrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.
resendStoredMessageResend a stored messagePrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.
getSendingQueuesGet sending queue statusPrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.

Templates

OperationWhat it doesAPI key type
listTemplatesList templatesPrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.
getTemplateGet templatePrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.
createTemplateCreate templatePrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.
updateTemplateUpdate template descriptionPrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.
deleteTemplateDelete templatePrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.
copyTemplateCopy template to another accountPrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.
renameTemplateRename templatePrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.
listTemplateVersionsList template versionsPrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.
getTemplateVersionGet template versionPrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.
createTemplateVersionCreate template versionPrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.
updateTemplateVersionUpdate template versionPrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.
deleteTemplateVersionDelete template versionPrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.
copyTemplateVersionCopy template versionPrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.

Suppressions: bounces

OperationWhat it doesAPI key type
listBouncesList bouncesPrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.
getBounceGet bouncePrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.
addBouncesAdd bounce(s)Primary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.
deleteBounceDelete bouncePrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.

Suppressions: unsubscribes

OperationWhat it doesAPI key type
listUnsubscribesList unsubscribesPrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.
getUnsubscribeGet unsubscribePrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.
addUnsubscribesAdd unsubscribe(s)Primary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.
deleteUnsubscribeDelete unsubscribePrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.

Suppressions: complaints

OperationWhat it doesAPI key type
listComplaintsList complaintsPrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.
getComplaintGet complaintPrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.
addComplaintsAdd complaint(s)Primary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.
deleteComplaintDelete complaintPrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.

Suppressions: allowlist

OperationWhat it doesAPI key type
listAllowlistList allowlist entriesPrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.
getAllowlistEntryGet allowlist entryPrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.
addAllowlistEntryAdd allowlist entryPrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.
deleteAllowlistEntryDelete allowlist entryPrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.

Mailing lists

OperationWhat it doesAPI key type
listMailingListsList mailing listsPrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.
getMailingListGet mailing listPrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.
createMailingListCreate mailing listPrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.
updateMailingListUpdate mailing listPrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.
deleteMailingListDelete mailing listPrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.
listMailingListMembersList membersPrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.
getMailingListMemberGet memberPrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.
addMailingListMemberAdd memberPrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.
addMailingListMembersAdd members in bulk (JSON)Primary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.
updateMailingListMemberUpdate memberPrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.
deleteMailingListMemberDelete memberPrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.
startListValidationStart list validationPrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.
getListValidationGet list validation statusPrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.
cancelListValidationCancel list validationPrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.

Routes (inbound email)

OperationWhat it doesAPI key type
listRoutesList routesPrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.
getRouteGet routePrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.
createRouteCreate routePrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.
updateRouteUpdate routePrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.
deleteRouteDelete routePrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.
matchRouteMatch an address against the routesPrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.

Domain webhooks

OperationWhat it doesAPI key type
listDomainWebhooksList domain webhooksPrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.
getDomainWebhookGet domain webhook by event typePrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.
createDomainWebhookCreate domain webhook (one event type)Primary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.
updateDomainWebhookUpdate domain webhook URLsPrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.
deleteDomainWebhookDelete domain webhook by event typePrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.
createDomainWebhookV4Create domain webhook (many event types)Primary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.
updateDomainWebhookV4Re-map a webhook URL to event typesPrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.
deleteDomainWebhookV4Delete a webhook URL from all event typesPrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.

Account webhooks

OperationWhat it doesAPI key type
listAccountWebhooksList account webhooksPrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.
getAccountWebhookGet account webhookPrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.
createAccountWebhookCreate account webhookPrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.
updateAccountWebhookUpdate account webhookPrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.
deleteAccountWebhookDelete account webhookPrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.
getWebhookSigningKeyGet the webhook signing keyPrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.

Logs, metrics & tags

OperationWhat it doesAPI key type
queryLogsQuery logsPrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.
getEventsGet events (legacy)Primary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.
queryMetricsQuery metricsPrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.
queryUsageMetricsQuery usage metricsPrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.
listTagsList / search tagsPrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.
updateTagUpdate tag descriptionPrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.
deleteTagDelete tagPrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.
getTagLimitsGet tag limitsPrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.

Domains

OperationWhat it doesAPI key type
listDomainsList domainsPrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.
getDomainGet domainPrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.
verifyDomainRe-check domain DNS recordsPrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.

Email validation

OperationWhat it doesAPI key type
validateEmailValidate an email addressPrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.
listBulkValidationJobsList bulk validation jobsPrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.
getBulkValidationJobGet bulk validation jobPrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.
cancelBulkValidationJobCancel bulk validation jobPrimary account API key (Account Settings → API Keys → Private API key). A Domain Sending Key cannot call this endpoint.

Example

Send from an EU-region Mailgun account

Mailgun runs two independent regions with separate hosts, separate accounts and separate API keys. The node hardcoded the US host until SW21-era work, which meant an EU customer's every call 401'd with nothing explaining why. region is a node field rather than a credential field so existing credentials did not need migrating; it defaults to us, so saved workflows keep hitting the host they always did.

Set Operation to sendMessage, then fill in:

FieldValueNotes
regioneuus (default) or eu — must match the region the account and key were created in
domainmg.acme.euThe sending domain, as configured in Mailgun
fromEmailnoreply@mg.acme.eu
toEmail{{ myTrigger.email }}
subjectWelcome to Acme
html<p>Hi {{ myTrigger.firstName }}, your account is ready.</p>HTML body; text is the plain-text alternative

Sets {{mail.id}} (Mailgun's queued message id) and {{mail.message}}.