Skip to main content

Mailgun

@keeb/mailgunv2026.08.26.1· 16d agoMODELS
01README

Mailgun email delivery models

02Release Notes

2026.08.26.1

  • Fixed: removed the API key preflight against GET /v5/users/me. It required account-level scope that none of these models otherwise need, so a domain-scoped key that could read /v4/domains perfectly well was rejected with 403 before its request was ever sent. Endpoints now report their own auth failures, with a hint distinguishing a wrong-region key (401) from an insufficiently scoped one (403).

2026.08.25.3

  • Changed: truncation is no longer silent. Every walk that stops short logs a warning and records it — lookup writes a _walk artifact, list_* methods carry truncated/truncationReason/maxItems in their result — so a partial list can't be presented as a complete one.
  • Added: max_items on the list_* methods, which previously walked uncapped. Every paginated method now has the same ceiling and the same default of 1000.
  • Fixed: a 404 on the first page of a walk now raises an error naming the domain global argument instead of returning an empty list. A mistyped domain was indistinguishable from a domain with no records.
  • Docs: README covers how to size max_items, when to filter instead of raising it, and how to detect a truncated answer.

2026.08.25.2

  • Added: lookup on event, exposing the upstream query parameters (recipient, event, begin, end, ascending, subject, message_id, tags, severity). Searching the event stream for one address no longer means pulling the stream and filtering client-side.
  • Added: max_items on every lookup method, defaulting to 1000 (300 on event). Paginated walks were previously bounded only by the 10,000-record page cap.
  • Fixed: README examples used a --arg flag that does not exist; method arguments are passed with --input, and object values need :json=.
03Models44
@keeb/mailgun/accountv2026.08.25.1account.ts

Global Arguments

ArgumentTypeDescription
regionenumMailgun region the account belongs to. A key from the other region is rejected with 401.
name?stringInstance name for this resource (used as the unique identifier in the factory pattern)
api_key?stringMailgun API key; overrides the MAILGUN_API_KEY environment variable. Wire with a vault.get(...) expression to source it from a vault.
fn update()
Update account attributes
fn create_http_signing_key()
Create or regenerate webhook signing key on an account
fn create_resend_activation_email()
Resend account activation email to the account owner
fn delete_limit_custom_monthly()
Delete a custom sending limit
fn get_http_signing_key()
Get webhook signing key saved on the account
fn get_limit_custom_monthly()
Get current custom sending limit
fn limit_custom_enable()
Re-enable account disabled for hitting send limit
fn update_features(webhooks_redact_pii?: string, ai_insights?: string)
Update account feature
ArgumentTypeDescription
webhooks_redact_pii?stringJSON object encoded as a string
ai_insights?stringJSON object encoded as a string
fn update_limit_custom_monthly()
Set a custom sending limit

Resources

state(infinite)— Account resource state
account_action(ephemeral)— Account action result
@keeb/mailgun/account-templatev2026.08.25.3account_template.ts

Global Arguments

ArgumentTypeDescription
regionenumMailgun region the account belongs to. A key from the other region is rejected with 401.
description?stringDescription of the template being stored
namestringName of the template being stored. Supports utf-8 characters and name will be down cased.
createdBy?stringOptional metadata field api user can indicate who created the template.
template?stringContent of the template.
tag?stringInitial tag of the created version. If the template parameter is provided and the tag is missing, the default value `initial` is used.
comment?stringVersion comment. This is valid only if a new version is being created. (template parameter is provided.)
headers?stringKey value JSON object of headers to be stored with the template. Where key is the header name and value is the header value. The header names `From`, `Subject`, and `Reply-To` are the only ones currently supported.
api_key?stringMailgun API key; overrides the MAILGUN_API_KEY environment variable. Wire with a vault.get(...) expression to source it from a vault.
fn create()
Create a account template
fn get(id: string)
Get a account template
ArgumentTypeDescription
idstringThe name of the account template
fn lookup(max_items?: number)
List every account template and record each as a data artifact (capped at 1000 by default)
ArgumentTypeDescription
max_items?numberStop after this many results (default 1000). Raise deliberately: every 100 results costs another request against Mailgun's rate limit.
fn update()
Update account template attributes
fn delete(id: string)
Delete the account template
ArgumentTypeDescription
idstringThe name of the account template
fn sync()
Sync account template state from Mailgun
fn copy(template_name: string, requests: array, source_versions?: array)
Copy a template
ArgumentTypeDescription
template_namestringPath parameter: template_name
requestsarrayList of copy requests
source_versions?arrayVersions to copy or all versions if empty.
fn rename(template_name: string, new_template_name: string)
Rename a template
ArgumentTypeDescription
template_namestringPath parameter: template_name
new_template_namestringPath parameter: new_template_name

Resources

state(infinite)— Account template resource state
account_template_action(ephemeral)— Account template action result
@keeb/mailgun/account-template-versionv2026.08.25.3account_template_version.ts

Global Arguments

ArgumentTypeDescription
regionenumMailgun region the account belongs to. A key from the other region is rejected with 401.
template_namestringPath scope for the account template version: template_name
namestringInstance name for this resource (used as the unique identifier in the factory pattern)
templatestringContent of the template.
comment?stringComment related to the version that is being created.
active?stringIf this flag is set to yes, this version becomes active
headers?stringKey value JSON object of headers to be stored with the template.
tagstringTag of the version that is being created. Must be unique to the template.
api_key?stringMailgun API key; overrides the MAILGUN_API_KEY environment variable. Wire with a vault.get(...) expression to source it from a vault.
fn create()
Create a account template version
fn get(id: string)
Get a account template version
ArgumentTypeDescription
idstringThe name of the account template version
fn lookup(max_items?: number)
List every account template version and record each as a data artifact (capped at 1000 by default)
ArgumentTypeDescription
max_items?numberStop after this many results (default 1000). Raise deliberately: every 100 results costs another request against Mailgun's rate limit.
fn update()
Update account template version attributes
fn delete(id: string)
Delete the account template version
ArgumentTypeDescription
idstringThe name of the account template version
fn sync()
Sync account template version state from Mailgun
fn copy(version_name: string, new_version_name: string)
Copy an account-level template version
ArgumentTypeDescription
version_namestringPath parameter: version_name
new_version_namestringPath parameter: new_version_name

Resources

state(infinite)— Account template version resource state
account_template_version_action(ephemeral)— Account template version action result
@keeb/mailgun/account-webhookv2026.08.25.3account_webhook.ts

Global Arguments

ArgumentTypeDescription
regionenumMailgun region the account belongs to. A key from the other region is rejected with 401.
namestringInstance name for this resource (used as the unique identifier in the factory pattern)
description?stringDescription for the webhook
event_typesenumEvent types to subscribe to. Use multiple times to specify multiple event types. Maximum of 3 unique URLs per event type.
urlstringURL for webhook to be sent to
api_key?stringMailgun API key; overrides the MAILGUN_API_KEY environment variable. Wire with a vault.get(...) expression to source it from a vault.
fn create()
Create a account webhook
fn get(id: string)
Get a account webhook
ArgumentTypeDescription
idstringThe id of the account webhook
fn lookup(max_items?: number)
List every account webhook and record each as a data artifact (capped at 1000 by default)
ArgumentTypeDescription
max_items?numberStop after this many results (default 1000). Raise deliberately: every 100 results costs another request against Mailgun's rate limit.
fn update()
Update account webhook attributes
fn delete(id: string)
Delete the account webhook
ArgumentTypeDescription
idstringThe id of the account webhook
fn sync()
Sync account webhook state from Mailgun

Resources

state(infinite)— Account webhook resource state
@keeb/mailgun/alertv2026.08.25.3alert.ts

Global Arguments

ArgumentTypeDescription
regionenumMailgun region the account belongs to. A key from the other region is rejected with 401.
name?stringInstance name for this resource (used as the unique identifier in the factory pattern)
api_key?stringMailgun API key; overrides the MAILGUN_API_KEY environment variable. Wire with a vault.get(...) expression to source it from a vault.
fn delete_settings_slack()
Delete Slack settings
fn delete_slack_oauth()
Revoke Slack access token
fn email_test(event_type: string, emails: array)
Test message
ArgumentTypeDescription
event_typestring
emailsarray
fn get_settings()
List Alerts
fn list_events(max_items?: number)
List events
ArgumentTypeDescription
max_items?numberStop after this many results (default 1000). Raise deliberately: every 100 results costs another request against Mailgun's rate limit.
fn slack_test(event_type: string, channel_ids?: array)
Test message
ArgumentTypeDescription
event_typestring
channel_ids?arrayIf omitted would be taken from the event settings
fn update_settings_slack(token: string, team_id?: string, team_name?: string, scope?: string)
Update Slack settings
ArgumentTypeDescription
tokenstring
team_id?string
team_name?string
scope?string
fn update_settings_webhooks_signing_key()
Reset Webhook Signing Key
fn webhooks_test(event_type: string, url: string)
Test webhook
ArgumentTypeDescription
event_typestring
urlstring

Resources

state(infinite)— Alert resource state
alert_action(ephemeral)— Alert action result
@keeb/mailgun/alert-eventv2026.08.25.1alert_event.ts

Global Arguments

ArgumentTypeDescription
regionenumMailgun region the account belongs to. A key from the other region is rejected with 401.
namestringInstance name for this resource (used as the unique identifier in the factory pattern)
event_typestringThe type of event for which you would like to receive alerts.
channelstringThe delivery method for the alert.
settingsobjectThe details pertaining to the specified channel. Please note that the contents of this object differ per channel type.
api_key?stringMailgun API key; overrides the MAILGUN_API_KEY environment variable. Wire with a vault.get(...) expression to source it from a vault.
fn create()
Create a alert event
fn update()
Update alert event attributes
fn delete(id: string)
Delete the alert event
ArgumentTypeDescription
idstringThe id of the alert event

Resources

state(infinite)— Alert event resource state
@keeb/mailgun/allowlistv2026.08.25.3allowlist.ts

Global Arguments

ArgumentTypeDescription
regionenumMailgun region the account belongs to. A key from the other region is rejected with 401.
domainstringThe Mailgun domain this resource belongs to
namestringInstance name for this resource (used as the unique identifier in the factory pattern)
addressstringValid email address if you would like to allowlist email address (prior over 'domain' parameter)
api_key?stringMailgun API key; overrides the MAILGUN_API_KEY environment variable. Wire with a vault.get(...) expression to source it from a vault.
fn create()
Create a allowlist
fn get(id: string)
Get a allowlist
ArgumentTypeDescription
idstringThe value of the allowlist
fn lookup(max_items?: number)
List every allowlist and record each as a data artifact (capped at 1000 by default)
ArgumentTypeDescription
max_items?numberStop after this many results (default 1000). Raise deliberately: every 100 results costs another request against Mailgun's rate limit.
fn delete(id: string)
Delete the allowlist
ArgumentTypeDescription
idstringThe value of the allowlist
fn sync()
Sync allowlist state from Mailgun
fn import(file: string)
Import allowlist
ArgumentTypeDescription
filestringCSV file

Resources

state(infinite)— Allowlist resource state
allowlist_action(ephemeral)— Allowlist action result
@keeb/mailgun/analytics-logv2026.08.25.1analytics_log.ts

Global Arguments

ArgumentTypeDescription
regionenumMailgun region the account belongs to. A key from the other region is rejected with 401.
namestringInstance name for this resource (used as the unique identifier in the factory pattern)
start?stringThe start date (default: 1 day before current time). Must be in RFC 2822 format: https://datatracker.ietf.org/doc/html/rfc2822.html#page-14
end?stringThe end date (default: current time). Must be in RFC 2822 format: https://datatracker.ietf.org/doc/html/rfc2822.html#page-14
durationstringA duration in the format of '1d' '2h'. If duration is provided then it is calculated from the end date and overwrites the start date.
events?arrayThe set of events to include.
metric_events?arrayOptional set of analytics metric events. Will be converted into corresponding events.
filter?objectFilters to apply to the query.
include_subaccounts?booleanInclude logs from all subaccounts.
include_totals?booleanInclude total number of log entries.
pagination?object
api_key?stringMailgun API key; overrides the MAILGUN_API_KEY environment variable. Wire with a vault.get(...) expression to source it from a vault.
fn create()
Create a analytics log

Resources

state(infinite)— Analytics log resource state
@keeb/mailgun/analytics-metricv2026.08.25.1analytics_metric.ts

Global Arguments

ArgumentTypeDescription
regionenumMailgun region the account belongs to. A key from the other region is rejected with 401.
namestringInstance name for this resource (used as the unique identifier in the factory pattern)
start?stringA start date (default: 7 days before current time). Must be in RFC 2822 format: https://datatracker.ietf.org/doc/html/rfc2822.html#page-14
end?stringAn end date (default: current time). Must be in RFC 2822 format: https://datatracker.ietf.org/doc/html/rfc2822.html#page-14
resolution?stringA resolution in the format of 'day' 'hour' 'month'. Default is day.
duration?stringA duration in the format of '1d' '2h' '2m'. If duration is provided then it is calculated from the end date and overwrites the start date.
dimensions?arrayAttributes of the metric data such as 'subaccount'. See [dimensions](https://documentation.mailgun.com/docs/mailgun/user-manual/reporting/dimensions)
metrics?arrayName of the metrics to receive the stats for such as 'processed_count'. See [metrics](https://documentation.mailgun.com/docs/mailgun/user-manual/reporting/metric-definitions)
filter?objectFilters to apply to the query.
include_subaccounts?booleanInclude stats from all subaccounts.
include_aggregates?booleanInclude top-level aggregate metrics.
api_key?stringMailgun API key; overrides the MAILGUN_API_KEY environment variable. Wire with a vault.get(...) expression to source it from a vault.
fn create()
Create a analytics metric

Resources

state(infinite)— Analytics metric resource state
@keeb/mailgun/analytics-tagv2026.08.25.1analytics_tag.ts

Global Arguments

ArgumentTypeDescription
regionenumMailgun region the account belongs to. A key from the other region is rejected with 401.
namestringInstance name for this resource (used as the unique identifier in the factory pattern)
tag?stringThe tag or tag prefix.
description?stringThe updated tag description.
pagination?object
include_subaccounts?booleanBoolean indicating whether or not to include data from all subaccounts. Default false.
include_metrics?booleanBoolean indicating whether or not to include metrics for tags. Default false. When true max limit is 20.
api_key?stringMailgun API key; overrides the MAILGUN_API_KEY environment variable. Wire with a vault.get(...) expression to source it from a vault.
fn create()
Create a analytics tag
fn update()
Update analytics tag attributes
fn delete()
Delete the analytics tag
fn get_limits()
Get account tag limit information

Resources

state(infinite)— Analytics tag resource state
analytics_tag_action(ephemeral)— Analytics tag action result
@keeb/mailgun/analytics-usage-metricv2026.08.25.1analytics_usage_metric.ts

Global Arguments

ArgumentTypeDescription
regionenumMailgun region the account belongs to. A key from the other region is rejected with 401.
namestringInstance name for this resource (used as the unique identifier in the factory pattern)
start?stringA start date (default: 7 days before current time). Must be in RFC 2822 format: https://datatracker.ietf.org/doc/html/rfc2822.html#page-14
end?stringAn end date (default: current time). Must be in RFC 2822 format: https://datatracker.ietf.org/doc/html/rfc2822.html#page-14
resolution?stringA resolution in the format of 'day' 'hour' 'month'. Default is day.
duration?stringA duration in the format of '1d' '2h' '2m'. If duration is provided then it is calculated from the end date and overwrites the start date.
dimensions?arrayAttributes of the metric data such as 'subaccount'. See [dimensions](https://documentation.mailgun.com/docs/mailgun/user-manual/reporting/dimensions)
metrics?arrayName of the metrics to receive the stats for such as 'processed_count'.
filter?objectFilters to apply to the query.
include_subaccounts?booleanInclude stats from all subaccounts.
include_aggregates?booleanInclude top-level aggregate metrics.
api_key?stringMailgun API key; overrides the MAILGUN_API_KEY environment variable. Wire with a vault.get(...) expression to source it from a vault.
fn create()
Create a analytics usage metric

Resources

state(infinite)— Analytics usage metric resource state
@keeb/mailgun/api-keyv2026.08.25.3api_key.ts

Global Arguments

ArgumentTypeDescription
regionenumMailgun region the account belongs to. A key from the other region is rejected with 401.
namestringInstance name for this resource (used as the unique identifier in the factory pattern)
domain_name?stringWeb domain to associate with the key, for keys of 'domain' kind
kind?enumType of API key ('domain', 'user', or 'web'). Defaults to 'user' if not provided. Note: web keys are not subject to IP allowlisting and have a default/maximum validity period of 1 day.
description?stringKey description
expiration?numberKey lifetime in seconds, must be greater than 0 if set
roleenumKey role ('admin', 'basic' [use in place of analyst], 'sending' [use with keys of domain kind], or 'developer')
user_id?stringAPI Key user's string user ID; should be provided for all keys of 'web' kind
user_name?stringAPI Key user's name
email?stringAPI Key user's email address; should be provided for all keys of 'web' kind
api_key?stringMailgun API key; overrides the MAILGUN_API_KEY environment variable. Wire with a vault.get(...) expression to source it from a vault.
fn create()
Create a api key
fn lookup(max_items?: number)
List every api key and record each as a data artifact (capped at 1000 by default)
ArgumentTypeDescription
max_items?numberStop after this many results (default 1000). Raise deliberately: every 100 results costs another request against Mailgun's rate limit.
fn delete(id: string)
Delete the api key
ArgumentTypeDescription
idstringThe id of the api key
fn create_public()
Regenerate Mailgun Public API key

Resources

state(infinite)— Api key resource state
api_key_action(ephemeral)— Api key action result
@keeb/mailgun/bouncev2026.08.25.3bounce.ts

Global Arguments

ArgumentTypeDescription
regionenumMailgun region the account belongs to. A key from the other region is rejected with 401.
domainstringThe Mailgun domain this resource belongs to
namestringInstance name for this resource (used as the unique identifier in the factory pattern)
api_key?stringMailgun API key; overrides the MAILGUN_API_KEY environment variable. Wire with a vault.get(...) expression to source it from a vault.
fn create()
Create a bounce
fn get(id: string)
Get a bounce
ArgumentTypeDescription
idstringThe address of the bounce
fn lookup(max_items?: number)
List every bounce and record each as a data artifact (capped at 1000 by default)
ArgumentTypeDescription
max_items?numberStop after this many results (default 1000). Raise deliberately: every 100 results costs another request against Mailgun's rate limit.
fn delete(id: string)
Delete the bounce
ArgumentTypeDescription
idstringThe address of the bounce
fn sync()
Sync bounce state from Mailgun
fn import(file: string)
Import list of bounces
ArgumentTypeDescription
filestringCSV file

Resources

state(infinite)— Bounce resource state
bounce_action(ephemeral)— Bounce action result
@keeb/mailgun/bounce-classification-metricv2026.08.25.1bounce_classification_metric.ts

Global Arguments

ArgumentTypeDescription
regionenumMailgun region the account belongs to. A key from the other region is rejected with 401.
namestringInstance name for this resource (used as the unique identifier in the factory pattern)
start?recordA start timestamp (default: 7 days before current time). Must be in RFC 2822 format: https://documentation.mailgun.com/docs/mailgun/api-reference/api-overview#date-format
end?recordAn end timestamp (default: current time). Must be in RFC 2822 format: https://documentation.mailgun.com/docs/mailgun/api-reference/api-overview#date-format
resolution?recordResolution of the metrics.
duration?stringA duration in the format of '48h' '60m' '30s'. If duration is provided then it is calculated from the end date and overwrites the start date.
dimensions?arrayDimensions.
metrics?arrayMetrics to return. See example.
filter?objectFilters to apply to the query.
include_subaccounts?booleanInclude stats from all subaccounts.
pagination?objectAttributes used for pagination and sorting.
api_key?stringMailgun API key; overrides the MAILGUN_API_KEY environment variable. Wire with a vault.get(...) expression to source it from a vault.
fn create()
Create a bounce classification metric

Resources

state(infinite)— Bounce classification metric resource state
@keeb/mailgun/complaintv2026.08.25.3complaint.ts

Global Arguments

ArgumentTypeDescription
regionenumMailgun region the account belongs to. A key from the other region is rejected with 401.
domainstringThe Mailgun domain this resource belongs to
namestringInstance name for this resource (used as the unique identifier in the factory pattern)
api_key?stringMailgun API key; overrides the MAILGUN_API_KEY environment variable. Wire with a vault.get(...) expression to source it from a vault.
fn create()
Create a complaint
fn get(id: string)
Get a complaint
ArgumentTypeDescription
idstringThe address of the complaint
fn lookup(max_items?: number)
List every complaint and record each as a data artifact (capped at 1000 by default)
ArgumentTypeDescription
max_items?numberStop after this many results (default 1000). Raise deliberately: every 100 results costs another request against Mailgun's rate limit.
fn delete(id: string)
Delete the complaint
ArgumentTypeDescription
idstringThe address of the complaint
fn sync()
Sync complaint state from Mailgun
fn import(file: string)
Import complaint list
ArgumentTypeDescription
filestringCSV file

Resources

state(infinite)— Complaint resource state
complaint_action(ephemeral)— Complaint action result
@keeb/mailgun/dkim-keyv2026.08.25.1dkim_key.ts

Global Arguments

ArgumentTypeDescription
regionenumMailgun region the account belongs to. A key from the other region is rejected with 401.
namestringInstance name for this resource (used as the unique identifier in the factory pattern)
signing_domainstringSigning domain to be used for the new domain key
selectorstringSelector to be used for the new domain key
bits?numberKey size, can be 1024 or 2048
pem?stringPrivate key PEM file
api_key?stringMailgun API key; overrides the MAILGUN_API_KEY environment variable. Wire with a vault.get(...) expression to source it from a vault.
fn create()
Create a dkim key
fn get()
Get a dkim key
fn delete()
Delete the dkim key
fn sync()
Sync dkim key state from Mailgun

Resources

state(infinite)— Dkim key resource state
@keeb/mailgun/dkim-rotationv2026.08.25.1dkim_rotation.ts

Global Arguments

ArgumentTypeDescription
regionenumMailgun region the account belongs to. A key from the other region is rejected with 401.
name?stringInstance name for this resource (used as the unique identifier in the factory pattern)
api_key?stringMailgun API key; overrides the MAILGUN_API_KEY environment variable. Wire with a vault.get(...) expression to source it from a vault.
fn rotate(name: string)
Rotate Automatic Sender Security DKIM key for a domain
ArgumentTypeDescription
namestringPath parameter: name
fn update_rotation(name: string, rotation_enabled: boolean, rotation_interval?: string)
Update Automatic Sender Security DKIM key rotation for a domain
ArgumentTypeDescription
namestringPath parameter: name
rotation_enabledbooleanIf true, enables DKIM Auto-Rotation. If false, disables it
rotation_interval?stringThe interval at which to rotate keys. Example, '5d' for five days

Resources

state(infinite)— Dkim rotation resource state
dkim_rotation_action(ephemeral)— Dkim rotation action result
@keeb/mailgun/domainv2026.08.25.3domain.ts

Global Arguments

ArgumentTypeDescription
regionenumMailgun region the account belongs to. A key from the other region is rejected with 401.
archive_to?stringIf set to a URL, then each successfully delivered message will be submitted in an HTTP POST request to the URL. The Content-Type of the POST requests is application/mime and the request body is exactly what the recipient SMTP server received.
mailfrom_host?stringThe hostname to update to. Must be in lower case
message_ttl?numberSpecifies the time-to-live (TTL) in seconds for retrieving both incoming and outgoing messages. The maximum TTL value is determined by your subscription plan.
require_tls?booleanIf set to true, this requires messages for the domain only be sent over a TLS connection. If a TLS connection cannot be established, Mailgun will not deliver the message. If set to false, Mailgun will still try and upgrade the connection, but if Mailgun cannot, the message will be delivered over a p
skip_verification?booleanIf set to true, the certificate and hostname will not be verified when trying to establish a TLS connection and Mailgun will accept any certificate during delivery of a message. If set to false, Mailgun will verify the certificate and hostname. If either one can not be verified, a TLS connection wil
smtp_password?stringPassword for SMTP authentication
spam_action?stringDisabled, block or tag. Default to disabled. If disabled, no spam filtering will occur for inbound messages. If block, inbound spam messages will not be delivered. If tag, inbound messages will be tagged with a spam header. See Spam Filter.
use_automatic_sender_security?booleanEnable Automatic Sender Security. This requires setting DNS CNAME entries for DKIM keys instead of a TXT record. Defaults to false.
webhooks_redact_pii?booleanIf set to true, Personally Identifiable Information (PII) will be redacted from the payload of any webhook posted for this domain
web_scheme?stringSets your open, click and unsubscribe URLs to use http or https. Value either `http` or `https`. Defaults to http. In order for https to work, you must have a valid cert created for your domain. See Domain Tracking for TLS cert generation.
web_prefix?stringSets your open, click and unsubscribe URLs domain name prefix. Links rewritten or added by Mailgun in your emails will look like <web_scheme>://<web_prefix>.<domain_name>/... Default to email
wildcard?booleanAllows domain to accept inbound messages received on subdomains that have MX records pointed to Mailgun. Default is false.
dkim_host_name?stringSet the DKIM host name for the domain that is being created. Note, the value must be a valid domain name, and can be the domain name being created or the root domain. This parameter cannot be used in conjunction with force_dkim_authority or force_root_dkim_host.
dkim_key_size?stringThe size of the new domain's DKIM key. Shall be either 1024 or 2048.
dkim_selector?stringExplicitly set the value of the DKIM selector for the domain being created. If the domain key does not already exist, one will be created. The selector must be a valid atom per RFC2822. e.g valid value `foobar`, invalid value `foo.bar` https://datatracker.ietf.org/doc/html/rfc2822#section-3.2.4
encrypt_incoming_message?booleanEnable encrypting incoming messages for the given domain. This cannot be altered via API after being set for security purposes. Reach out to Support to disable if necessary. Default to false
force_dkim_authority?booleanIf set to true, the domain will be the DKIM authority for itself even if the root domain is registered on the same mailgun account. If set to false, the domain will have the same DKIM authority as the root domain registered on the same mailgun account. Default to false.
force_root_dkim_host?booleanIf set to true, the root domain will be the DKIM Host for the domain being created even if the root domain itself is not registered with Mailgun. The domain being created will still need to pass domain verification with valid spf records for the domain and valid DKIM record for the root domain. This
namestringThe name of the new domain
pool_id?stringRequested IP Pool to be assigned to the domain at creation.
ips?stringAn optional, comma-separated list of IP addresses to be assigned to this domain. If not specified, all dedicated IP addresses on the account will be assigned. If the request cannot be fulfilled (e.g. a requested IP is not assigned to the account, etc), a 400 will be returned.
api_key?stringMailgun API key; overrides the MAILGUN_API_KEY environment variable. Wire with a vault.get(...) expression to source it from a vault.
fn create()
Create a domain
fn get(id: string)
Get a domain
ArgumentTypeDescription
idstringThe name of the domain
fn lookup(max_items?: number)
List every domain and record each as a data artifact (capped at 1000 by default)
ArgumentTypeDescription
max_items?numberStop after this many results (default 1000). Raise deliberately: every 100 results costs another request against Mailgun's rate limit.
fn update()
Update domain attributes
fn delete(id: string)
Delete the domain
ArgumentTypeDescription
idstringThe name of the domain
fn sync()
Sync domain state from Mailgun
fn all_dynamic_pools_enroll()
Enroll all account domains
fn create_dynamic_pools(name: string)
Enroll domain
ArgumentTypeDescription
namestringPath parameter: name
fn create_webhooks(domain: string, id: enum, url: string)
Create a domain webhook
ArgumentTypeDescription
domainstringPath parameter: domain
idenumWebhook type to create.
urlstringurl(s) for webhooks to be sent to. Use multiple times to associate more than one url. Maximum of 3 urls for a given webhook type.
fn delete_dynamic_pools(name: string)
Remove domain from dynamic IP pools
ArgumentTypeDescription
namestringPath parameter: name
fn delete_ips(name: string, ip: string)
Remove an IP from the domain pool, unlink a DIPP or remove the domain pool
ArgumentTypeDescription
namestringPath parameter: name
ipstringPath parameter: ip
fn delete_pool(name: string, ip: string)
Remove an IP from the domain pool, unlink a DIPP or remove the domain pool
ArgumentTypeDescription
namestringPath parameter: name
ipstringPath parameter: ip
fn delete_webhooks(domain: string)
Delete domain webhooks (v4)
ArgumentTypeDescription
domainstringPath parameter: domain
fn get_dynamic_pools_assignable()
List assignable domains
fn get_sending_queues(name: string)
Get messages queue status
ArgumentTypeDescription
namestringPath parameter: name
fn get_tracking(name: string)
Get tracking settings
ArgumentTypeDescription
namestringPath parameter: name
fn get_webhooks(domain: string)
Get domain webhooks
ArgumentTypeDescription
domainstringPath parameter: domain
fn keys_activate(domain: string, selector: string)
Activate a domain key
ArgumentTypeDescription
domainstringPath parameter: domain
selectorstringPath parameter: selector
fn keys_deactivate(domain: string, selector: string)
Deactivate a domain key
ArgumentTypeDescription
domainstringPath parameter: domain
selectorstringPath parameter: selector
fn list_keys(domain: string, max_items?: number)
List domain keys
ArgumentTypeDescription
domainstringPath parameter: domain
max_items?numberStop after this many results (default 1000). Raise deliberately: every 100 results costs another request against Mailgun's rate limit.
fn update_dkim_authority(name: string, self?: boolean)
Update DKIM authority
ArgumentTypeDescription
namestringPath parameter: name
self?booleanChange the DKIM authority for a domain. If set to true, the domain will be the DKIM authority for itself even if the root domain is registered on the same mailgun account If set to false, the domain will have the same DKIM authority as the root domain registered on the same mailgun account.
fn update_dkim_selector(name: string, dkim_selector?: string)
Update a DKIM selector
ArgumentTypeDescription
namestringPath parameter: name
dkim_selector?stringUpdate the DKIM selector for a domain. If omitted no change is committed.
fn update_tracking_click(name: string, active?: string)
Update click tracking settings
ArgumentTypeDescription
namestringPath parameter: name
active?stringSet param to `htmlonly`, `true`, or `false`. Omit this param to make no change to the active status. Click tracking is consider as active if it's in the 'htmlonly' or 'true' state
fn update_tracking_open(name: string, active?: boolean, place_at_the_top?: boolean)
Update open tracking settings
ArgumentTypeDescription
namestringPath parameter: name
active?booleanSet this param to true or false to toggle open tracking active status. Omit this param to keep current settings.
place_at_the_top?booleanSetting this param to true will place the open tracking pixel at the top of the HTML body when inserted into the email mime. Omit this param to keep current setting.
fn update_tracking_unsubscribe(name: string, active?: boolean, html_footer?: string, text_footer?: string)
Update unsubscribe tracking settings
ArgumentTypeDescription
namestringPath parameter: name
active?booleanThis param will toggle the active status of unsubscribe tracking on the domain.
html_footer?stringUpdates the html footer for the unsubscribe link inserted into the email html part of the mime.
text_footer?stringUpdates the text footer for the unsubscribe link inserted into the email plain part of the mime.
fn update_webhooks(domain: string, url: string, event_types: enum)
Update domain webhooks (v4)
ArgumentTypeDescription
domainstringPath parameter: domain
urlstringThe webhook URL to update
event_typesenumEvent types to associate with this URL. Use multiple times to specify multiple event types. This replaces the existing associations.
fn verify(name: string)
Verify Domain
ArgumentTypeDescription
namestringPath parameter: name

Resources

state(infinite)— Domain resource state
domain_action(ephemeral)— Domain action result
@keeb/mailgun/domain-credentialv2026.08.25.3domain_credential.ts

Global Arguments

ArgumentTypeDescription
regionenumMailgun region the account belongs to. A key from the other region is rejected with 401.
domainstringThe Mailgun domain this resource belongs to
namestringInstance name for this resource (used as the unique identifier in the factory pattern)
password?stringSupply desired password(s) for the new credentials if preferred over generated ones; accepts multiple values
loginstringEmail address of SMTP credential user; accepts multiple values
mailbox?stringEmail address of SMTP credential user, may be used in place of 'login'; accepts multiple values
system?booleanIdentify if these are system account credentials, defaults to false
api_key?stringMailgun API key; overrides the MAILGUN_API_KEY environment variable. Wire with a vault.get(...) expression to source it from a vault.
fn create()
Create a domain credential
fn lookup(max_items?: number)
List every domain credential and record each as a data artifact (capped at 1000 by default)
ArgumentTypeDescription
max_items?numberStop after this many results (default 1000). Raise deliberately: every 100 results costs another request against Mailgun's rate limit.
fn update()
Update domain credential attributes
fn delete(id: string)
Delete the domain credential
ArgumentTypeDescription
idstringThe login of the domain credential

Resources

state(infinite)— Domain credential resource state
@keeb/mailgun/domain-ip-assignmentv2026.08.25.1domain_ip_assignment.ts

Global Arguments

ArgumentTypeDescription
regionenumMailgun region the account belongs to. A key from the other region is rejected with 401.
name?stringInstance name for this resource (used as the unique identifier in the factory pattern)
extra_dedicated_ipsobjectthe DIPP spillover settings for the account
api_key?stringMailgun API key; overrides the MAILGUN_API_KEY environment variable. Wire with a vault.get(...) expression to source it from a vault.
fn get(id: string)
Get a domain ip assignment
ArgumentTypeDescription
idstringThe name of the domain ip assignment
fn update()
Update domain ip assignment attributes
fn sync()
Sync domain ip assignment state from Mailgun

Resources

state(infinite)— Domain ip assignment resource state
@keeb/mailgun/domain-templatev2026.08.25.3domain_template.ts

Global Arguments

ArgumentTypeDescription
regionenumMailgun region the account belongs to. A key from the other region is rejected with 401.
domainstringThe Mailgun domain this resource belongs to
description?stringDescription of the template being stored
namestringName of the template being stored. Supports utf-8 characters and name will be down cased.
createdBy?stringOptional metadata field api user can indicate who created the template.
template?stringContent of the template.
tag?stringInitial tag of the created version. If the template parameter is provided and the tag is missing, the default value `initial` is used.
comment?stringVersion comment. This is valid only if a new version is being created. (template parameter is provided.)
headers?stringKey value JSON object of headers to be stored with the template. Where key is the header name and value is the header value. The header names `From`, `Subject`, and `Reply-To` are the only ones currently supported. These headers will be inserted into the MIME at the time we attempt delivery. Headers
api_key?stringMailgun API key; overrides the MAILGUN_API_KEY environment variable. Wire with a vault.get(...) expression to source it from a vault.
fn create()
Create a domain template
fn get(id: string)
Get a domain template
ArgumentTypeDescription
idstringThe name of the domain template
fn lookup(max_items?: number)
List every domain template and record each as a data artifact (capped at 1000 by default)
ArgumentTypeDescription
max_items?numberStop after this many results (default 1000). Raise deliberately: every 100 results costs another request against Mailgun's rate limit.
fn update()
Update domain template attributes
fn delete(id: string)
Delete the domain template
ArgumentTypeDescription
idstringThe name of the domain template
fn sync()
Sync domain template state from Mailgun
fn copy(template_name: string, requests: array, source_versions?: array)
Copy a template
ArgumentTypeDescription
template_namestringPath parameter: template_name
requestsarrayList of copy requests
source_versions?arrayVersions to copy or all versions if empty.
fn rename(template_name: string, new_template_name: string)
Rename a template
ArgumentTypeDescription
template_namestringPath parameter: template_name
new_template_namestringPath parameter: new_template_name

Resources

state(infinite)— Domain template resource state
domain_template_action(ephemeral)— Domain template action result
@keeb/mailgun/domain-template-versionv2026.08.25.3domain_template_version.ts

Global Arguments

ArgumentTypeDescription
regionenumMailgun region the account belongs to. A key from the other region is rejected with 401.
domainstringThe Mailgun domain this resource belongs to
template_namestringPath scope for the domain template version: template_name
namestringInstance name for this resource (used as the unique identifier in the factory pattern)
templatestringContent of the template.
comment?stringComment related to the version that is being created.
active?stringIf this flag is set to yes, this version becomes active
headers?stringKey value JSON object of headers to be stored with the template. Where key is the header name and value is the header value. The header names `From`, `Subject`, and `Reply-To` are the only ones currently supported. These headers will be inserted into the MIME at the time we attempt delivery. Headers
tagstringTag of the version that is being created. Must be unique to the template.
api_key?stringMailgun API key; overrides the MAILGUN_API_KEY environment variable. Wire with a vault.get(...) expression to source it from a vault.
fn create()
Create a domain template version
fn get(id: string)
Get a domain template version
ArgumentTypeDescription
idstringThe name of the domain template version
fn lookup(max_items?: number)
List every domain template version and record each as a data artifact (capped at 1000 by default)
ArgumentTypeDescription
max_items?numberStop after this many results (default 1000). Raise deliberately: every 100 results costs another request against Mailgun's rate limit.
fn update()
Update domain template version attributes
fn delete(id: string)
Delete the domain template version
ArgumentTypeDescription
idstringThe name of the domain template version
fn sync()
Sync domain template version state from Mailgun
fn copy(version_name: string, new_version_name: string)
Copy a version
ArgumentTypeDescription
version_namestringPath parameter: version_name
new_version_namestringPath parameter: new_version_name

Resources

state(infinite)— Domain template version resource state
domain_template_version_action(ephemeral)— Domain template version action result
@keeb/mailgun/domain-webhookv2026.08.25.1domain_webhook.ts

Global Arguments

ArgumentTypeDescription
regionenumMailgun region the account belongs to. A key from the other region is rejected with 401.
domainstringThe Mailgun domain this resource belongs to
name?stringInstance name for this resource (used as the unique identifier in the factory pattern)
urlstringNew url(s) to associate to webhook. Use multiple times to associate more than one url. Maximum of 3 urls for a given type.
api_key?stringMailgun API key; overrides the MAILGUN_API_KEY environment variable. Wire with a vault.get(...) expression to source it from a vault.
fn get(id: string)
Get a domain webhook
ArgumentTypeDescription
idstringThe name of the domain webhook
fn update()
Update domain webhook attributes
fn delete(id: string)
Delete the domain webhook
ArgumentTypeDescription
idstringThe name of the domain webhook
fn sync()
Sync domain webhook state from Mailgun

Resources

state(infinite)— Domain webhook resource state
@keeb/mailgun/dynamic-ip-poolv2026.08.25.3dynamic_ip_pool.ts

Global Arguments

ArgumentTypeDescription
regionenumMailgun region the account belongs to. A key from the other region is rejected with 401.
name?stringInstance name for this resource (used as the unique identifier in the factory pattern)
add_ipstringIP(s) to add to the pool
remove_ipstringIP(s) to remove from the pool
api_key?stringMailgun API key; overrides the MAILGUN_API_KEY environment variable. Wire with a vault.get(...) expression to source it from a vault.
fn lookup(max_items?: number)
List every dynamic ip pool and record each as a data artifact (capped at 1000 by default)
ArgumentTypeDescription
max_items?numberStop after this many results (default 1000). Raise deliberately: every 100 results costs another request against Mailgun's rate limit.
fn update()
Update dynamic ip pool attributes
fn add_ip(pool_name: string, ip: string)
Add IP to Dynamic IP Pool
ArgumentTypeDescription
pool_namestringPath parameter: pool_name
ipstringPath parameter: ip
fn create_all(good_reputation: string, poor_reputation: string, new_senders: string)
Initialize/set IPs for all pools
ArgumentTypeDescription
good_reputationstringIP(s) to include in the good_reputation pool
poor_reputationstringIP(s) to include in the poor_reputation pool
new_sendersstringIP(s) to include in the new_senders pool
fn delete_all()
Remove all dynamic IP pools
fn delete_domains_override(name: string)
Remove override
ArgumentTypeDescription
namestringPath parameter: name
fn domains_override(name: string)
Override domain assignment
ArgumentTypeDescription
namestringPath parameter: name
fn get_domains_history(name: string)
List domain history
ArgumentTypeDescription
namestringPath parameter: name
fn get_domains_preview(name: string)
Preview domain assignment
ArgumentTypeDescription
namestringPath parameter: name
fn list_domains(max_items?: number)
List all domains assigned to dynamic IP pools
ArgumentTypeDescription
max_items?numberStop after this many results (default 1000). Raise deliberately: every 100 results costs another request against Mailgun's rate limit.
fn list_history(max_items?: number)
List account history
ArgumentTypeDescription
max_items?numberStop after this many results (default 1000). Raise deliberately: every 100 results costs another request against Mailgun's rate limit.

Resources

state(infinite)— Dynamic ip pool resource state
dynamic_ip_pool_action(ephemeral)— Dynamic ip pool action result
@keeb/mailgun/envelopev2026.08.25.1envelope.ts

Global Arguments

ArgumentTypeDescription
regionenumMailgun region the account belongs to. A key from the other region is rejected with 401.
domainstringThe Mailgun domain this resource belongs to
name?stringInstance name for this resource (used as the unique identifier in the factory pattern)
api_key?stringMailgun API key; overrides the MAILGUN_API_KEY environment variable. Wire with a vault.get(...) expression to source it from a vault.
fn delete()
Delete the envelope

Resources

state(infinite)— Envelope resource state
@keeb/mailgun/eventv2026.08.25.3event.ts

Global Arguments

ArgumentTypeDescription
regionenumMailgun region the account belongs to. A key from the other region is rejected with 401.
domainstringThe Mailgun domain this resource belongs to
name?stringInstance name for this resource (used as the unique identifier in the factory pattern)
api_key?stringMailgun API key; overrides the MAILGUN_API_KEY environment variable. Wire with a vault.get(...) expression to source it from a vault.
fn lookup(recipient?: string, event?: string, begin?: string, end?: string, ascending?: enum, subject?: string, message_id?: string, tags?: string, severity?: enum, max_items?: number)
Search the event stream and record each event as a data artifact (newest first, capped at 300 by default)
ArgumentTypeDescription
recipient?stringOnly events for this recipient address, e.g. fan@example.com.
event?stringEvent type filter. A single type (`delivered`, `failed`, `opened`, `complained`, `unsubscribed`, `rejected`, `accepted`, `stored`) or a filter expression such as `failed OR rejected`.
begin?stringLower time bound, RFC 2822 (`Fri, 3 May 2013 09:00:00 -0000`) or a Unix timestamp. Mailgun walks backwards from `end` unless `ascending=yes`.
end?stringUpper time bound, RFC 2822 or a Unix timestamp.
ascending?enumWalk the window oldest-first (`yes`) instead of newest-first.
subject?stringOnly events whose message had this subject.
message_id?stringOnly events for this message id, for tracing a single send end to end.
tags?stringOnly events carrying this tag.
severity?enumFor failure events, whether the failure was a soft or hard bounce.
max_items?numberStop after this many events (default 300). Raise deliberately: the event stream is effectively unbounded on a busy domain.
fn get()
Fetch a single unfiltered, unpaginated page of the event stream. Prefer 'lookup', which filters by recipient and pages properly.
fn sync()
Sync event state from Mailgun

Resources

state(infinite)— Event resource state
@keeb/mailgun/forwardv2026.08.25.3forward.ts

Global Arguments

ArgumentTypeDescription
regionenumMailgun region the account belongs to. A key from the other region is rejected with 401.
namestringInstance name for this resource (used as the unique identifier in the factory pattern)
api_key?stringMailgun API key; overrides the MAILGUN_API_KEY environment variable. Wire with a vault.get(...) expression to source it from a vault.
fn create()
Create a forward
fn get(id: string)
Get a forward
ArgumentTypeDescription
idstringThe id of the forward
fn lookup(max_items?: number)
List every forward and record each as a data artifact (capped at 1000 by default)
ArgumentTypeDescription
max_items?numberStop after this many results (default 1000). Raise deliberately: every 100 results costs another request against Mailgun's rate limit.
fn update()
Update forward attributes
fn delete(id: string)
Delete the forward
ArgumentTypeDescription
idstringThe id of the forward
fn sync()
Sync forward state from Mailgun

Resources

state(infinite)— Forward resource state
@keeb/mailgun/ipv2026.08.25.3ip.ts

Global Arguments

ArgumentTypeDescription
regionenumMailgun region the account belongs to. A key from the other region is rejected with 401.
name?stringInstance name for this resource (used as the unique identifier in the factory pattern)
api_key?stringMailgun API key; overrides the MAILGUN_API_KEY environment variable. Wire with a vault.get(...) expression to source it from a vault.
fn get(id: string)
Get a ip
ArgumentTypeDescription
idstringThe ip of the ip
fn lookup(max_items?: number)
List every ip and record each as a data artifact (capped at 1000 by default)
ArgumentTypeDescription
max_items?numberStop after this many results (default 1000). Raise deliberately: every 100 results costs another request against Mailgun's rate limit.
fn sync()
Sync ip state from Mailgun
fn create_domains(ip: string)
Assign an IP to all account domains
ArgumentTypeDescription
ipstringPath parameter: ip
fn create_ip_band(addr: string, ip_band: string)
Place account IP into a dedicated IP band
ArgumentTypeDescription
addrstringPath parameter: addr
ip_bandstringDedicated IP band to place the IP address into
fn create_request_new()
Add a new dedicated IP to the account
fn delete_domains(ip: string)
Remove an IP from all account domains
ArgumentTypeDescription
ipstringPath parameter: ip
fn get_account_settings()
Get DIPP spillover settings for an account
fn get_request_new()
Return the number of IPs available to the account per its billing plan
fn list_details_all(max_items?: number)
List account IPs - detailed view
ArgumentTypeDescription
max_items?numberStop after this many results (default 1000). Raise deliberately: every 100 results costs another request against Mailgun's rate limit.
fn list_domains(ip: string, max_items?: number)
Get all domains of an account where a specific IP is assigned
ArgumentTypeDescription
ipstringPath parameter: ip
max_items?numberStop after this many results (default 1000). Raise deliberately: every 100 results costs another request against Mailgun's rate limit.
fn update_account_settings(extra_dedicated_ips: object)
Set or Modify the dedicated IP pool used for IP spillover
ArgumentTypeDescription
extra_dedicated_ipsobjectthe DIPP spillover settings for the account. This value will apply to all domains under the account
fn update_subaccounts()
Update subaccount IP assignments

Resources

state(infinite)— Ip resource state
ip_action(ephemeral)— Ip action result
@keeb/mailgun/ip-poolv2026.08.25.3ip_pool.ts

Global Arguments

ArgumentTypeDescription
regionenumMailgun region the account belongs to. A key from the other region is rejected with 401.
add_ip?stringThe IP to add to the DIPP (may be specified multiple times)
descriptionstringDescription of the DIPP
link_domain?stringThe ID of the domain link to the DIPP (may be specified multiple times)
namestringShort name of the DIPP
remove_ip?stringThe IP to remove from the DIPP (may be specified multiple times)
unlink_domain?stringThe ID of the domain to unlink from the DIPP (may be specified multiple times)
ip?stringIP address to add to the DIPP (may be specified multiple times)
api_key?stringMailgun API key; overrides the MAILGUN_API_KEY environment variable. Wire with a vault.get(...) expression to source it from a vault.
fn create()
Create a ip pool
fn get(id: string)
Get a ip pool
ArgumentTypeDescription
idstringThe pool_id of the ip pool
fn lookup(max_items?: number)
List every ip pool and record each as a data artifact (capped at 1000 by default)
ArgumentTypeDescription
max_items?numberStop after this many results (default 1000). Raise deliberately: every 100 results costs another request against Mailgun's rate limit.
fn update()
Update ip pool attributes
fn delete(id: string)
Delete the ip pool
ArgumentTypeDescription
idstringThe pool_id of the ip pool
fn sync()
Sync ip pool state from Mailgun
fn delegate(pool_id: string, subaccount_id: string)
Delegate DIPP to Subaccount
ArgumentTypeDescription
pool_idstringPath parameter: pool_id
subaccount_idstringThe ID of the subaccount to delegate the pool to
fn delete_delegate(pool_id: string, subaccount_id: string)
Revoke DIPP from Subaccount
ArgumentTypeDescription
pool_idstringPath parameter: pool_id
subaccount_idstringThe ID of the subaccount to revoke the pool from
fn delete_ips(pool_id: string, ip: string)
Remove an IP from a DIPP
ArgumentTypeDescription
pool_idstringPath parameter: pool_id
ipstringPath parameter: ip
fn get_domains(pool_id: string)
Get domains linked to DIPP
ArgumentTypeDescription
pool_idstringPath parameter: pool_id
fn replace_ips(pool_id: string, ips: array)
Add multiple IPs to the DIPP
ArgumentTypeDescription
pool_idstringPath parameter: pool_id
ipsarrayIPs to add to the DIPP
fn update_ips(pool_id: string, ip: string)
Add an IP to a DIPP
ArgumentTypeDescription
pool_idstringPath parameter: pool_id
ipstringPath parameter: ip

Resources

state(infinite)— Ip pool resource state
ip_pool_action(ephemeral)— Ip pool action result
@keeb/mailgun/ip-warmupv2026.08.25.3ip_warmup.ts

Global Arguments

ArgumentTypeDescription
regionenumMailgun region the account belongs to. A key from the other region is rejected with 401.
namestringInstance name for this resource (used as the unique identifier in the factory pattern)
api_key?stringMailgun API key; overrides the MAILGUN_API_KEY environment variable. Wire with a vault.get(...) expression to source it from a vault.
fn create()
Create a ip warmup
fn get(id: string)
Get a ip warmup
ArgumentTypeDescription
idstringThe ip of the ip warmup
fn lookup(max_items?: number)
List every ip warmup and record each as a data artifact (capped at 1000 by default)
ArgumentTypeDescription
max_items?numberStop after this many results (default 1000). Raise deliberately: every 100 results costs another request against Mailgun's rate limit.
fn delete(id: string)
Delete the ip warmup
ArgumentTypeDescription
idstringThe ip of the ip warmup
fn sync()
Sync ip warmup state from Mailgun

Resources

state(infinite)— Ip warmup resource state
@keeb/mailgun/ip-whitelistv2026.08.25.1ip_whitelist.ts

Global Arguments

ArgumentTypeDescription
regionenumMailgun region the account belongs to. A key from the other region is rejected with 401.
namestringInstance name for this resource (used as the unique identifier in the factory pattern)
addressstringAddress to be added to the allowlist
description?stringDescription of the address to be added to the allowlist, defaults to empty string
api_key?stringMailgun API key; overrides the MAILGUN_API_KEY environment variable. Wire with a vault.get(...) expression to source it from a vault.
fn create()
Create a ip whitelist
fn get()
Get a ip whitelist
fn update()
Update ip whitelist attributes
fn delete()
Delete the ip whitelist
fn sync()
Sync ip whitelist state from Mailgun

Resources

state(infinite)— Ip whitelist resource state
@keeb/mailgun/mailing-listv2026.08.25.3mailing_list.ts

Global Arguments

ArgumentTypeDescription
regionenumMailgun region the account belongs to. A key from the other region is rejected with 401.
addressstringA valid email address for the mailing list, e.g. developers@mailgun.net, or Developers <devs@mg.net>
description?stringA description
name?stringMailing list name, e.g. Developers
access_level?stringList access level, one of: readonly, members, everyone. Defaults to readonly
reply_reference?stringSet where replies should go. Can be list or sender. Defaults to list.
reply_preference?stringSet where replies should go: list or sender. Defaults to list
api_key?stringMailgun API key; overrides the MAILGUN_API_KEY environment variable. Wire with a vault.get(...) expression to source it from a vault.
fn create()
Create a mailing list
fn get(id: string)
Get a mailing list
ArgumentTypeDescription
idstringThe address of the mailing list
fn lookup(max_items?: number)
List every mailing list and record each as a data artifact (capped at 1000 by default)
ArgumentTypeDescription
max_items?numberStop after this many results (default 1000). Raise deliberately: every 100 results costs another request against Mailgun's rate limit.
fn update()
Update mailing list attributes
fn delete(id: string)
Delete the mailing list
ArgumentTypeDescription
idstringThe address of the mailing list
fn sync()
Sync mailing list state from Mailgun
fn list_pages(max_items?: number)
Get mailing lists by page
ArgumentTypeDescription
max_items?numberStop after this many results (default 1000). Raise deliberately: every 100 results costs another request against Mailgun's rate limit.

Resources

state(infinite)— Mailing list resource state
mailing_list_action(ephemeral)— Mailing list action result
@keeb/mailgun/mailing-list-memberv2026.08.25.3mailing_list_member.ts

Global Arguments

ArgumentTypeDescription
regionenumMailgun region the account belongs to. A key from the other region is rejected with 401.
list_addressstringPath scope for the mailing list member: list_address
address?stringValid email address specification.
name?stringAn optional member name.
vars?recordJSON-encoded dictionary string with arbitrary parameters.
subscribed?booleanSet the member as subscribed or not. Defaults to true.
upsert?booleanSet to True to update member if present, False to raise error in case of a duplicate member. Defaults to false.
api_key?stringMailgun API key; overrides the MAILGUN_API_KEY environment variable. Wire with a vault.get(...) expression to source it from a vault.
fn create()
Create a mailing list member
fn get(id: string)
Get a mailing list member
ArgumentTypeDescription
idstringThe address of the mailing list member
fn lookup(max_items?: number)
List every mailing list member and record each as a data artifact (capped at 1000 by default)
ArgumentTypeDescription
max_items?numberStop after this many results (default 1000). Raise deliberately: every 100 results costs another request against Mailgun's rate limit.
fn update()
Update mailing list member attributes
fn delete(id: string)
Delete the mailing list member
ArgumentTypeDescription
idstringThe address of the mailing list member
fn sync()
Sync mailing list member state from Mailgun
fn import_csv(subscribed?: boolean, upsert?: boolean, members?: string)
Bulk upload members to a mailing list (CSV)
ArgumentTypeDescription
subscribed?boolean
upsert?boolean
members?stringAbsolute path to the CSV file
fn import_json()
Bulk upload members to a mailing list (JSON)
fn list_pages(max_items?: number)
Get members by page
ArgumentTypeDescription
max_items?numberStop after this many results (default 1000). Raise deliberately: every 100 results costs another request against Mailgun's rate limit.

Resources

state(infinite)— Mailing list member resource state
mailing_list_member_action(ephemeral)— Mailing list member action result
@keeb/mailgun/routev2026.08.25.3route.ts

Global Arguments

ArgumentTypeDescription
regionenumMailgun region the account belongs to. A key from the other region is rejected with 401.
namestringInstance name for this resource (used as the unique identifier in the factory pattern)
id?stringUnique identifier of the route
priority?numberSmaller number indicates higher priority. Higher priority routes are handled first. Defaults to 0.
description?stringAn arbitrary string.
expressionstringThe filtering rule.
action?arrayThis action is executed when the expression evaluates to True. You can pass multiple parameters.
api_key?stringMailgun API key; overrides the MAILGUN_API_KEY environment variable. Wire with a vault.get(...) expression to source it from a vault.
fn create()
Create a route
fn get(id: string)
Get a route
ArgumentTypeDescription
idstringThe id of the route
fn lookup(max_items?: number)
List every route and record each as a data artifact (capped at 1000 by default)
ArgumentTypeDescription
max_items?numberStop after this many results (default 1000). Raise deliberately: every 100 results costs another request against Mailgun's rate limit.
fn update()
Update route attributes
fn delete(id: string)
Delete the route
ArgumentTypeDescription
idstringThe id of the route
fn sync()
Sync route state from Mailgun
fn get_match()
Match address to route

Resources

state(infinite)— Route resource state
route_action(ephemeral)— Route action result
@keeb/mailgun/sandbox-recipientv2026.08.25.3sandbox_recipient.ts

Global Arguments

ArgumentTypeDescription
regionenumMailgun region the account belongs to. A key from the other region is rejected with 401.
namestringInstance name for this resource (used as the unique identifier in the factory pattern)
api_key?stringMailgun API key; overrides the MAILGUN_API_KEY environment variable. Wire with a vault.get(...) expression to source it from a vault.
fn create()
Create a sandbox recipient
fn lookup(max_items?: number)
List every sandbox recipient and record each as a data artifact (capped at 1000 by default)
ArgumentTypeDescription
max_items?numberStop after this many results (default 1000). Raise deliberately: every 100 results costs another request against Mailgun's rate limit.
fn delete(id: string)
Delete the sandbox recipient
ArgumentTypeDescription
idstringThe address of the sandbox recipient

Resources

state(infinite)— Sandbox recipient resource state
@keeb/mailgun/send-alertv2026.08.25.3send_alert.ts

Global Arguments

ArgumentTypeDescription
regionenumMailgun region the account belongs to. A key from the other region is rejected with 401.
namestringA user-friendly name for the alert.
metricstringThe metric being monitored.
comparatorstringThe comparison operator.
limitstringThe threshold limit for the alert.
dimensionstringThe dimension to apply to the metric.
alert_channels?arrayA list of alert channels to notify.
filters?arrayA list of filters to apply to the alert.
period?stringThe time period for the metric aggregation in the format of '1h' '1d'.
description?stringA description of what the alert does.
api_key?stringMailgun API key; overrides the MAILGUN_API_KEY environment variable. Wire with a vault.get(...) expression to source it from a vault.
fn create()
Create a send alert
fn get(id: string)
Get a send alert
ArgumentTypeDescription
idstringThe name of the send alert
fn lookup(max_items?: number)
List every send alert and record each as a data artifact (capped at 1000 by default)
ArgumentTypeDescription
max_items?numberStop after this many results (default 1000). Raise deliberately: every 100 results costs another request against Mailgun's rate limit.
fn update()
Update send alert attributes
fn delete(id: string)
Delete the send alert
ArgumentTypeDescription
idstringThe name of the send alert
fn sync()
Sync send alert state from Mailgun

Resources

state(infinite)— Send alert resource state
@keeb/mailgun/sending-limitv2026.08.25.3sending_limit.ts

Global Arguments

ArgumentTypeDescription
regionenumMailgun region the account belongs to. A key from the other region is rejected with 401.
namestringA user-friendly name for the limit.
metricstringThe metric being monitored.
comparatorstringThe comparison operator.
limitstringThe threshold limit.
dimensionstringThe dimension to apply to the metric.
filters?arrayA list of filters to apply to the limit.
period?stringThe time period for the metric aggregation in the format of '1h' '1d'.
description?stringA description of what the limit does.
api_key?stringMailgun API key; overrides the MAILGUN_API_KEY environment variable. Wire with a vault.get(...) expression to source it from a vault.
fn create()
Create a sending limit
fn get(id: string)
Get a sending limit
ArgumentTypeDescription
idstringThe name of the sending limit
fn lookup(max_items?: number)
List every sending limit and record each as a data artifact (capped at 1000 by default)
ArgumentTypeDescription
max_items?numberStop after this many results (default 1000). Raise deliberately: every 100 results costs another request against Mailgun's rate limit.
fn update()
Update sending limit attributes
fn delete(id: string)
Delete the sending limit
ArgumentTypeDescription
idstringThe name of the sending limit
fn sync()
Sync sending limit state from Mailgun

Resources

state(infinite)— Sending limit resource state
@keeb/mailgun/slack-channelv2026.08.25.3slack_channel.ts

Global Arguments

ArgumentTypeDescription
regionenumMailgun region the account belongs to. A key from the other region is rejected with 401.
name?stringInstance name for this resource (used as the unique identifier in the factory pattern)
api_key?stringMailgun API key; overrides the MAILGUN_API_KEY environment variable. Wire with a vault.get(...) expression to source it from a vault.
fn get(id: string)
Get a slack channel
ArgumentTypeDescription
idstringThe id of the slack channel
fn lookup(max_items?: number)
List every slack channel and record each as a data artifact (capped at 1000 by default)
ArgumentTypeDescription
max_items?numberStop after this many results (default 1000). Raise deliberately: every 100 results costs another request against Mailgun's rate limit.
fn sync()
Sync slack channel state from Mailgun

Resources

state(infinite)— Slack channel resource state
@keeb/mailgun/stored-messagev2026.08.25.1stored_message.ts

Global Arguments

ArgumentTypeDescription
regionenumMailgun region the account belongs to. A key from the other region is rejected with 401.
domainstringThe Mailgun domain this resource belongs to
namestringInstance name for this resource (used as the unique identifier in the factory pattern)
tostringEmail address of the recipient(s). Supports friendly name format. Example: `"Bob <bob@host.com>"`. Use commas to separate multiple recipients. Duplicate addresses are automatically ignored.
api_key?stringMailgun API key; overrides the MAILGUN_API_KEY environment variable. Wire with a vault.get(...) expression to source it from a vault.
fn create()
Create a stored message
fn get(id: string)
Get a stored message
ArgumentTypeDescription
idstringThe storage_key of the stored message
fn sync()
Sync stored message state from Mailgun

Resources

state(infinite)— Stored message resource state
@keeb/mailgun/subaccountv2026.08.25.3subaccount.ts

Global Arguments

ArgumentTypeDescription
regionenumMailgun region the account belongs to. A key from the other region is rejected with 401.
namestringInstance name for this resource (used as the unique identifier in the factory pattern)
api_key?stringMailgun API key; overrides the MAILGUN_API_KEY environment variable. Wire with a vault.get(...) expression to source it from a vault.
fn create()
Create a subaccount
fn get(id: string)
Get a subaccount
ArgumentTypeDescription
idstringThe id of the subaccount
fn lookup(max_items?: number)
List every subaccount and record each as a data artifact (capped at 1000 by default)
ArgumentTypeDescription
max_items?numberStop after this many results (default 1000). Raise deliberately: every 100 results costs another request against Mailgun's rate limit.
fn delete()
Delete the subaccount
fn sync()
Sync subaccount state from Mailgun
fn delete_limit_custom_monthly(subaccount_id: string)
Delete a custom sending limit
ArgumentTypeDescription
subaccount_idstringPath parameter: subaccount_id
fn disable(subaccount_id: string)
Disable a subaccount
ArgumentTypeDescription
subaccount_idstringPath parameter: subaccount_id
fn enable(subaccount_id: string)
Enable a subaccount
ArgumentTypeDescription
subaccount_idstringPath parameter: subaccount_id
fn get_limit_custom_monthly(subaccount_id: string)
Get current custom sending limit
ArgumentTypeDescription
subaccount_idstringPath parameter: subaccount_id
fn list_ip_pools_all(max_items?: number)
List DIPPs delegated to subaccounts
ArgumentTypeDescription
max_items?numberStop after this many results (default 1000). Raise deliberately: every 100 results costs another request against Mailgun's rate limit.
fn update_features(subaccount_id: string, email_preview?: string, inbox_placement?: string, sending?: string, validations?: string, validations_bulk?: string)
Update subaccount feature
ArgumentTypeDescription
subaccount_idstringPath parameter: subaccount_id
email_preview?stringJSON object encoded as a string
inbox_placement?stringJSON object encoded as a string
sending?stringJSON object encoded as a string
validations?stringJSON object encoded as a string
validations_bulk?stringJSON object encoded as a string
fn update_limit_custom_monthly(subaccount_id: string)
Set a custom sending limit
ArgumentTypeDescription
subaccount_idstringPath parameter: subaccount_id

Resources

state(infinite)— Subaccount resource state
subaccount_action(ephemeral)— Subaccount action result
@keeb/mailgun/thresholdv2026.08.25.3threshold.ts

Global Arguments

ArgumentTypeDescription
regionenumMailgun region the account belongs to. A key from the other region is rejected with 401.
name?stringInstance name for this resource (used as the unique identifier in the factory pattern)
api_key?stringMailgun API key; overrides the MAILGUN_API_KEY environment variable. Wire with a vault.get(...) expression to source it from a vault.
fn list_hits(max_items?: number)
List account hits
ArgumentTypeDescription
max_items?numberStop after this many results (default 1000). Raise deliberately: every 100 results costs another request against Mailgun's rate limit.

Resources

state(infinite)— Threshold resource state
threshold_action(ephemeral)— Threshold action result
@keeb/mailgun/tracking-certificatev2026.08.25.1tracking_certificate.ts

Global Arguments

ArgumentTypeDescription
regionenumMailgun region the account belongs to. A key from the other region is rejected with 401.
namestringInstance name for this resource (used as the unique identifier in the factory pattern)
api_key?stringMailgun API key; overrides the MAILGUN_API_KEY environment variable. Wire with a vault.get(...) expression to source it from a vault.
fn create()
Create a tracking certificate
fn update()
Update tracking certificate attributes
fn get_status(domain: string)
Tracking Certificate: Get certificate and status
ArgumentTypeDescription
domainstringPath parameter: domain

Resources

state(infinite)— Tracking certificate resource state
tracking_certificate_action(ephemeral)— Tracking certificate action result
@keeb/mailgun/unsubscribev2026.08.25.3unsubscribe.ts

Global Arguments

ArgumentTypeDescription
regionenumMailgun region the account belongs to. A key from the other region is rejected with 401.
domainstringThe Mailgun domain this resource belongs to
namestringInstance name for this resource (used as the unique identifier in the factory pattern)
api_key?stringMailgun API key; overrides the MAILGUN_API_KEY environment variable. Wire with a vault.get(...) expression to source it from a vault.
fn create()
Create a unsubscribe
fn get(id: string)
Get a unsubscribe
ArgumentTypeDescription
idstringThe address of the unsubscribe
fn lookup(max_items?: number)
List every unsubscribe and record each as a data artifact (capped at 1000 by default)
ArgumentTypeDescription
max_items?numberStop after this many results (default 1000). Raise deliberately: every 100 results costs another request against Mailgun's rate limit.
fn delete(id: string)
Delete the unsubscribe
ArgumentTypeDescription
idstringThe address of the unsubscribe
fn sync()
Sync unsubscribe state from Mailgun
fn import(file: string)
Import unsubscribe list
ArgumentTypeDescription
filestringCSV file

Resources

state(infinite)— Unsubscribe resource state
unsubscribe_action(ephemeral)— Unsubscribe action result
@keeb/mailgun/userv2026.08.25.3user.ts

Global Arguments

ArgumentTypeDescription
regionenumMailgun region the account belongs to. A key from the other region is rejected with 401.
name?stringInstance name for this resource (used as the unique identifier in the factory pattern)
api_key?stringMailgun API key; overrides the MAILGUN_API_KEY environment variable. Wire with a vault.get(...) expression to source it from a vault.
fn get(id: string)
Get a user
ArgumentTypeDescription
idstringThe id of the user
fn lookup(max_items?: number)
List every user and record each as a data artifact (capped at 1000 by default)
ArgumentTypeDescription
max_items?numberStop after this many results (default 1000). Raise deliberately: every 100 results costs another request against Mailgun's rate limit.
fn sync()
Sync user state from Mailgun
fn get_me()
Get one's own user details

Resources

state(infinite)— User resource state
user_action(ephemeral)— User action result
04Previous Versions3
2026.08.25.3

2026.08.25.3

  • Changed: truncation is no longer silent. Every walk that stops short logs a warning and records it — lookup writes a _walk artifact, list_* methods carry truncated/truncationReason/maxItems in their result — so a partial list can't be presented as a complete one.
  • Added: max_items on the list_* methods, which previously walked uncapped. Every paginated method now has the same ceiling and the same default of 1000.
  • Fixed: a 404 on the first page of a walk now raises an error naming the domain global argument instead of returning an empty list. A mistyped domain was indistinguishable from a domain with no records.
  • Docs: README covers how to size max_items, when to filter instead of raising it, and how to detect a truncated answer.

2026.08.25.2

  • Added: lookup on event, exposing the upstream query parameters (recipient, event, begin, end, ascending, subject, message_id, tags, severity). Searching the event stream for one address no longer means pulling the stream and filtering client-side.
  • Added: max_items on every lookup method, defaulting to 1000 (300 on event). Paginated walks were previously bounded only by the 10,000-record page cap.
  • Fixed: README examples used a --arg flag that does not exist; method arguments are passed with --input, and object values need :json=.
2026.08.25.2
  • Added: lookup on event, exposing the upstream query parameters (recipient, event, begin, end, ascending, subject, message_id, tags, severity). Searching the event stream for one address no longer means pulling the stream and filtering client-side.
  • Added: max_items on every lookup method, defaulting to 1000 (300 on event). Paginated walks were previously bounded only by the 10,000-record page cap.
  • Fixed: README examples used a --arg flag that does not exist; method arguments are passed with --input, and object values need :json=.

Modified 1 models

2026.08.25.1
  • Added: account_template_version, account_template, account_webhook, account, alert_event, alert, allowlist, analytics_log, analytics_metric, analytics_tag, analytics_usage_metric, api_key, bounce_classification_metric, bounce, complaint, dkim_key, dkim_rotation, domain_credential, domain_ip_assignment, domain_template_version, domain_template, domain_webhook, domain, dynamic_ip_pool, envelope, event, forward, ip_pool, ip_warmup, ip_whitelist, ip, mailing_list_member, mailing_list, message, route, sandbox_recipient, send_alert, sending_limit, slack_channel, stored_message, subaccount, threshold, tracking_certificate, unsubscribe, user
05Stats
B
85 / 100
Downloads
4
Archive size
160.7 KB
  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive1/1earned
  • Most symbols documented1/1earned
  • No slow types (deprecated)1/1earned
  • Dependencies pass trust audit2/2earned
  • Has description1/1earned
  • Platform support declared (or universal)2/2earned
  • License declared1/1earned
  • Verified public repository0/2missing
06Platforms
07Labels