Mailgun integrationMailgun logo

Mailgun integration for AI agents.

Mailgun integration for AI agents with secure authentication and server-side credential injection. Open Connector runs the OAuth, seals the token in an encrypted vault, and serves Mailgun tools to your agent over MCP or a typed API — credentials injected server-side, every call audited, nothing leaving your infrastructure. Open source (AGPL-3.0) and self-hostable.

What your agents can do

Real Mailgun actions, managed and audited.

Your user connects Mailgun once; your agent can then send and track email, manage domains, mailing lists, suppressions, routes, webhooks, validation, deliverability, and email inspection with Mailgun — scoped to the OAuth permissions you grant and the tool allowlist you configure. Every action is least-privilege and written to a tamper-evident audit trail.

  1. 1

    Your user grants Mailgun access once (OAuth) — the token lands in the vault.

  2. 2

    Your agent calls a tool over MCP or the typed API; Open Connector injects the credential server-side.

  3. 3

    Every routed call appends a hash-chained audit record — nothing leaves your infra.

Tools & triggers

Supported Mailgun tools.

413 tools are generated from the published Mailgun catalog. Descriptions are plain text; each action remains subject to its configured authentication and tool allowlist.

Showing 413 tools. All published catalog entries are included in this page's server-rendered HTML.

Delete Job V3
Cancels a selected job by list ID.
Bulk Validations
Get Job V3
Gets a selected job by list ID.
Bulk Validations
Create Job V3
Starts a V3 list validation job.
Bulk Validations
Delete Job V4
Cancels a selected job by list ID.
Bulk Validations
Get Job V4
Gets a selected job by list ID.
Bulk Validations
List Bulk and Preview V4 Jobs
Returns all jobs.
openapi-bulkvalidations_other
List Jobs V4
Returns all jobs.
Bulk Validations
Delete a member
Deletes a member from a mailing list
Mailing Lists
Remove Alert
Remove Alert
Alerts
Delete Slack settings
Delete Slack settings and Slack event settings for the Mailgun account. To revoke the Slack access token, use DELETE /v1/alerts/slack/oauth. To completely remove the Slack App from Slack Workspace, go into App Configuration in Slack.
Alerts
Revoke Slack access token
Revoke Slack access token, delete Slack settings and Slack event settings. NOTE: All Mailgun accounts connected to the same Slack workspace share the same token. To completely remove the Slack App from Slack Workspace, go into App Configuration in Slack.
Alerts
Delete account tag
Deletes the tag for an account
Tags New
Delete a domain key
Domain keys are not recoverable after deletion so use with care
Domain Keys
Remove override
Removes any dynamic IP pool override for a domain. The domain's pool assignment will be managed by health checks.
Dynamic IP Pools
Deletes a single domain from an account
Deletes a single domain from an account
Domains
Removes IP from monitoring
Removes IP from monitoring
IP Blocklist Monitoring
Delete Accessibility Test
Delete a specific accessibility test by its unique test ID. This endpoint allows you to remove an accessibility test from the system. If the test ID does not exist, the appropriate error message is returned.
Accessibility
Delete Code Analysis Test
Deletes all versions of a code analysis test by test ID.
Code Analysis
Delete Image Validation Test
Delete a specific image validation test by its unique test ID. This endpoint allows you to remove an image validation test from the system. If the test ID does not exist, the appropriate error message is returned.
Image Validation
Delete Link Validation Test
Delete a specific link validation test by its unique test ID. This endpoint allows you to remove a link validation test from the system. If the test ID does not exist, the appropriate error message is returned.
Link Validation
Delete Spam Test (V1)
Permanently deletes the spam test and its results.
Spam Testing
Delete Mailgun API key
Delete Mailgun API key
Keys
Delete PreviewShare
Delete PreviewShare record by TID.
Email Preview
Delete Emailpreview Test
Deletes the specified test.<br><br>**WARNING:** _This endpoint is deprecated in favor of our [V2 endpoint](https://documentation.mailgun.com/docs/inspect/api-reference/openapi-final/tag/Email-Preview/#tag/Email-Preview/operation/DELETE-v2-preview-tests--test-id-)._
Email Preview
Delete a send alert
Delete a send alert
Send Alerts
Delete a limit threshold for an account
Delete a limit threshold for an account
Limits
Delete account-level webhooks
Delete account-level webhooks for the authenticated account. You can either delete all webhooks by setting all=true, or specify specific webhook IDs to delete via webhook_ids. If both are provided, the specific webhook_ids will be deleted. Note: Webhook changes can take up to 10 minutes to become effective due to caching.
Account Webhooks
Delete account-level webhook by ID
Delete a specific account-level webhook by its webhook ID. This removes the webhook from all associated event types. Note: Webhook changes can take up to 10 minutes to become effective due to caching.
Account Webhooks
Delete Mailgun account IP allowlist entry
Delete Mailgun account IP allowlist entry
IP Allowlist
Delete Emailpreview Test V2
Deletes the specified test and its content checking. Once it is deleted, it cannot be recovered.
Email Preview
Clear all bounces
Clears all email addresses with bounces from the domain. Delivery to the deleted email addresses will longer be suppressed.
Bounces
Remove bounce
Delivery to the deleted email address resumes until it bounces again.
Bounces
Clear all complaints
Clears all email addresses with complaints from the domain. Delivery to the deleted email addresses will longer be suppressed.
Complaints
Remove complaint
Delivery to the deleted email address resumes until there is another complaint.
Complaints
Clear all unsubscribes
Clear all unsubscribe email addresses for the domain. Delivery to the deleted email addresses will no longer be suppressed.
Unsubscribe
Remove unsubscribe
Delivery to the deleted email address resumes until it unsubscribes again.
Unsubscribe
Clear allowlist
Delete an entire allowlist for a domain
Allowlist
Remove entry from allowlist
Remove a single entry from the allowlist
Allowlist
Delete scheduled and undelivered mail
Deletes all scheduled and undelivered mail from the domain queue. This endpoint must be called on the same storage API host as the mail's generated storage URL. e.g. https://storage-us-east4.api.mailgun.net/v3/example.com/envelopes The storage hosts are: `storage-us-east4.api.mailgun.net`, `storage-us-west1.api.mailgun.net`, and `storage-europe-west1.api.mailgun.net`.
Messages
Delete all templates
Delete all templates and their versions for the domain.
Domain Templates
Delete a template
Delete the template specified in the url. NOTE: This method deletes all versions of the specified template.
Domain Templates
Delete a version
Delete a specific template version.
Domain Templates
Delete tag
Delete a tag associated with a domain
Tags
Delete all Mailgun SMTP credentials for a domain
Delete Mailgun SMTP credentials for a given domain
Credentials
Delete Mailgun SMTP credentials
Delete Mailgun SMTP credentials for a given domain and SMTP user
Credentials
Delete domain webhooks by type
Remove all url(s) for a specified webhook type.
Domain Webhooks
Delete a domain
The domain must not be disabled or used as an authority for an other domain. Sandbox domain can't be deleted.
Domains
Remove domain from dynamic IP pools
The behavior of this endpoint depends on the value of the `replacement_ip` and `replacement_pool_id` parameters. One of these parameters (but not both) must be provided. If `replacement_ip` is provided, the IP(s) will be assigned to the domain. `replacement_ip` can include one of the following: * valid IP(s): this IP address or addresses will be added to the domain * string `shared`: if the account is eligible for shared IPs, a suitable shared IP will be chosen and added to the domain The 'replacement_ip' parameter cannot include any IPs that are already assigned to a Dedicated IP Pool or a Dynamic IP Pool. If `replacement_pool_id` is provided, the Dedicated IP Pool will be assigned to the domain.
Dynamic IP Pools
Remove an IP from the domain pool, unlink a DIPP or remove the domain pool
The behavior of the endpoint depends on the value of the `ip` parameter. It can be one of the following: * a valid IP address: this IP address will be removed from the domain pool. * string `all`: the entire domain pool will be removed. As far as the system is concerned, such domain will no longer exist. * string `ip_pool`: the DIPP which is currently linked to the domain will be unlinked. ### Removing An IP Note that it's impossible to alter domain IPs if a DIPP is linked to the domain. If the account is not eligible for shared IPs, additional rules apply: * removing the last IP from the domain is not allowed; * if all of the remaining dedicated IPs are on warmup, an extra IP might be added to the domain pool. ### Unlinking The DIPP The account must have 'DIPPs' feature enabled. Either `ip` or `pool_id` query parameter must be specified, but not both. If the special value `shared` is used for the replacement IP, the account must be eligible for shared IPs. In this case the system will assign a shared IP as the replacement.
IPsIP Pools
Remove an IP from the domain pool, unlink a DIPP or remove the domain pool
The behavior of the endpoint depends on the value of the `ip` parameter. It can be one of the following: * a valid IP address: this IP address will be removed from the domain pool. * string `all`: the entire domain pool will be removed. As far as the system is concerned, such domain will no longer exist. * string `ip_pool`: the DIPP which is currently linked to the domain will be unlinked. ### Removing An IP Note that it's impossible to alter domain IPs if a DIPP is linked to the domain. If the account is not eligible for shared IPs, additional rules apply: * removing the last IP from the domain is not allowed; * if all of the remaining dedicated IPs are on warmup, an extra IP might be added to the domain pool. ### Unlinking The DIPP The account must have 'DIPPs' feature enabled. Either `ip` or `pool_id` query parameter must be specified, but not both. If the special value `shared` is used for the replacement IP, the account must be eligible for shared IPs. In this case the system will assign a shared IP as the replacement.
IPsIP Pools
Remove all dynamic IP pools
Removes all dynamic IP pools from the account. All domains on the account (and subaccounts, if any) must be removed from dynamic IP pools before the pools can be removed. Any standard dedicated IP pools will not be modified.
Dynamic IP Pools
Delete a single forward rule by ID
By default this call is scoped to the entire account. You can scope the request by providing the 'domain.name' query parameter. If the 'domain.name' parameter is provided and the requested rule is not defined for that domain the call will return 404 Not Found
Forwards
Delete the DIPP
The `DIPPs` feature must be enabled for the account. It is not allowed to delete a DIPP inherited from the parent account. If the DIPP is delegated to subaccounts, those will also be updated. If the replacement DIPP is specified, all domains linked to the deleted DIPP will be relinked to the replacement DIPP. The latter must contain at least one IP. If the replacement IP is specified, all domains linked to the deleted DIPP will be unlinked, and the replacement IP will be assigned to them. It is not allowed to delete a DIPP inherited from the parent account and replace it with an IP (subaccounts do not explicitly manage their IPs). The replacement IP must be a dedicated one; it can't belong to another DIPP. If a special value `shared` is used, appropriate shared IPs will be used (the account must be eligible for shared IPs in this case). Omitting both replacement DIPP and replacement IP is allowed only if the DIPP being deleted contains no IPs. The processing of affected domains and subaccounts happens asynchronously after the endpoint returns a response.
IP Pools
Revoke DIPP from Subaccount
Revokes delegation of a dedicated IP pool (DIPP) from a specified subaccount. The DIPP will no longer be available to the subaccount. Unlike legacy endpoints, this supports accounts with multiple delegated DIPPs. Request parameters are encoded as form data.
IP Pools
Remove an IP from a DIPP
The account must have 'DIPPs' feature enabled. It's not allowed to edit a DIPP inherited from the parent account. If the DIPP is linked to domains, the domains will be updated asynchronously (after this endpoint returns response).
IP Pools
Cancels the warmup plan for an IP address
Cancels the warmup plan for an IP address. The IP must be dedicated and owned by the account.
IP Address Warmup
Remove an IP from all account domains
The IP must belong to the account. If the `alternative` parameter is present, it is used to replace the removed ip on all domains.
IPs
Delete a mailing list
Deletes a mailing list
Mailing Lists
Delete a route
Remove the rotue from the account.
Routes
Delete List Health Preview Job
Deletes a single list health previewk job by ID.
List Health Preview
Delete domain webhooks (v4)
Delete webhook URLs from all event types they are associated with. Supports deleting multiple URLs at once by repeating the `url` query parameter.
Domain Webhooks
Delete Result
Delete the result and all associated information.
Inbox Placement
Delete Result
Delete the result and all associated information.
Inbox Placement
Delete a Seed List
Delete a Seed List
Inbox Placement
Delete all account-level templates
Delete all account-level templates and their versions.
Account Templates
Delete an account-level template
Delete the account-level template specified in the url NOTE: This method deletes all versions of the specified template.
Account Templates
Delete an account-level template version
Delete a specific version of an account-level template.
Account Templates
Delete a custom sending limit
Delete a custom sending limit
Custom Message Limit
Delete a subaccount
Delete a subaccount
Subaccounts
Revoke a DIPP delegated to a subaccount
#### Description Initiates the process to revoke a DIPP delegated to a subaccount. All domains linked to the DIPP will be unlinked. This endpoint cannot be used with subaccounts that have multiple inherited DIPPs.
openapi-tower_other
Delete a custom sending limit
Delete a custom sending limit
Subaccounts
Remove an authorized sandbox domain email recipient
Remove an authorized sandbox domain email recipient
Account Management
Get a member
Get details about a specific mailing list member
Mailing Lists
Get members by page
Paginate over list members in a given mailing list in ascending order
Mailing Lists
Get mailing lists members
Lists members in a given mailing list
Mailing Lists
List events
The current list of events that you can chose to receive alerts for.
Alerts
List Alerts
This endpoint returns a list of all configured alert settings for your account.
Alerts
List Slack channels
List Slack channels for the connected Slack workspace.
Alerts
Get Slack channel
Returns Slack channel.
Alerts
Get account tag limit information
Gets the tag limit and current number of unique tags for an account
Tags New
List entities
Deprecated: use POST /v2/bounce-classification/metrics
Bounce Classification
List rules
Deprecated: use GET /v2/bounce-classification/config/groups/{group-id}
Bounce Classification
List domains statistic per account
Deprecated: use POST /v2/bounce-classification/metrics
Bounce Classification
List statistic per domain
Deprecated: use POST /v2/bounce-classification/metrics
Bounce Classification
List statistic per entity
Deprecated: use POST /v2/bounce-classification/metrics
Bounce Classification
List Bounce Logs
Deprecated: use POST /v1/analytics/logs - https://documentation.mailgun.com/docs/mailgun/api-reference/send/mailgun/logs
Bounce Classification
List statistics, ordered by total bounces
Deprecated: use POST /v2/bounce-classification/metrics instead
Bounce Classification
List keys for all domains
List domain keys, and optionally filter by signing domain or selector. Results are paginated - use the 'limit' parameter to control page size (default 10, max 100). Use the 'page' parameter from the paging response URLs to navigate through pages.
Domain Keys
Retrieves the list of domains that have DMARC monitoring.
Retrieves the list of domains that have DMARC monitoring.
DMARC Reports
Retrieve DMARC reporting data for a domain.
Retrieve DMARC reporting data for a domain.
DMARC Reports
Retrieve DMARC reporting data from a specific source.
Retrieve DMARC reporting data from a specific source.
DMARC Reports
Retrieve DMARC reporting data for a hostname.
Retrieve DMARC reporting data for a hostname.
DMARC Reports
Retrieve DMARC reporting data for an IP Address.
Retrieve DMARC reporting data for an IP Address.
DMARC Reports
Retrieves the DMARC DNS records to be used for configuration
Retrieves the DMARC DNS records to be used for configuration
DMARC Reports
Checks if DMARC has been setup for user
Checks if DMARC has been setup for user
DMARC Reports
List all domains assigned to dynamic IP pools
Retrieves all domains enrolled in dynamic IP pools across the parent account and subaccounts.
Dynamic IP Pools
List domain history
Retrieves a domain's history records
Dynamic IP Pools
Preview domain assignment
Runs a health check on a domain and returns which pool it would be placed in. It does NOT enroll the domain or set the band
Dynamic IP Pools
List account history
Retrieve history records for all domains assigned to Dynamic IP Pools across the parent and subaccounts.
Dynamic IP Pools
Returns Domains on Mailgun Optimize services
Will return details on an Mailgun Optimize Domain. If no Domain is provided, then a list of all Mailgun Optimize Domains on an account will be returned.
Domains
Lists monitored IP addresses
Lists monitored IP addresses
IP Blocklist Monitoring
Get the IP address
Get the IP address
IP Blocklist Monitoring
Get Accessibility Tests
Retrieve a paginated list of all accessibility tests that have been submitted. Each test includes details such as its status, the number of checks performed, and, of those checks, how many passes and failures there were. The response is paginated, with a limit of up to 1000 items per page. The total count of records will display in the meta object under the key, 'count'.
Accessibility
Get Accessibility Test
Retrieve the details of a specific accessibility test using the provided test ID. This endpoint returns comprehensive details about the test, including metadata and test results.
Accessibility
List Code Analysis Jobs
Returns a paginated list of all code analysis jobs under the account, showing only the latest version of each test. Uses skip/limit pagination and supports filtering by status.
Code Analysis
Get Code Analysis Dictionary
Returns the lookup dictionary containing variants, clients, platforms, application types, support levels, and categories used in code analysis.
Code Analysis
Get Code Analysis Results
Returns the latest version of code analysis test results for a given test ID.
Code Analysis
Get All Code Analysis Versions
Returns all versions available for a given test ID.
Code Analysis
Get Code Analysis Results by Version
Returns code analysis test results for a specific test ID and version.
Code Analysis
Get Image Validation Tests
Retrieve a paginated list of all image validation tests that have been submitted. The response is paginated, with a limit of up to 1000 items per page. The total count of records will display in the meta object under the key, 'count'.
Image Validation
Get Image Validation Results
Returns the results of an image validation test.
Image Validation
List Link Validations
Retrieve a list of previous link validation tests based on various filters.
Link Validation
Get Link Validation Results
Returns the results of a link validation test.
Link Validation
List Spam Tests (V1)
Returns a paginated list of all spam tests for the account, ordered by created_at desc. Supports filtering by status and region.
Spam Testing
List Supported ESP Providers
Returns the static list of ESPs supported by spam testing, grouped by category (B2C / B2B).
Spam Testing
Get Spam Test (V1)
Returns the current state of a spam test. A Retry-After: 10 header is set when the test is still processing.
Spam Testing
List Mailgun API keys
List Mailgun API keys
Keys
List Email Health score and rates grouped by domains/ips/subaccounts/timestamps
List Email Health score and rates grouped by domains/ips/subaccounts/timestamps
Email Health Score
Get Email Health score and rates for account and subaccounts
Get Email Health score and rates for account and subaccounts
Email Health Score
Get Monitored Domains
Gets all domains that are being monitored for blocklisting
Domain Blocklist Monitoring
Get Lists Domain is Listed in
Get blocklists that the domain is listed in
Domain Blocklist Monitoring
Get Events for Domain
Get events for a specific domain
Domain Blocklist Monitoring
Get All Events
Get all events for all domains monitored
Domain Blocklist Monitoring
Returns PreviewShare record by UUID.
Returns PreviewShare record by UUID.
Email Preview
Get PreviewShare
Returns PreviewShare record by TID.
Email Preview
List Emailpreview Tests
Returns a list of email preview tests.<br><br>**WARNING:** _This endpoint is deprecated in favor of our [V2 endpoint](https://documentation.mailgun.com/docs/inspect/api-reference/openapi-final/tag/Email-Preview/#tag/Email-Preview/operation/GET-v2-preview-tests)._
Email Preview
List Clients
Returns a list of clients that can perform an email preview.
Email Preview
Get Emailpreview Test Info
Returns test info.<br><br>**WARNING:** _This endpoint is deprecated in favor of our [V2 endpoint](https://documentation.mailgun.com/docs/inspect/api-reference/openapi-final/tag/Email-Preview/#tag/Email-Preview/operation/GET-v2-preview-tests--test-id-)._
Email Preview
Get Test Content (empty)
Gets HTML content of the passed test.
Email Preview
Get Test Content
Gets HTML content of the passed test.
Email Preview
Get Test Results
Returns the results for the specified email preview test.
Email Preview
Get GPT Addresses
Returns a list of all address records for an account. Each address record is for a single address on a single day.
Google Postmaster Tools
Get GPT Address
Returns address records for an single address on the account. Each address record is for a single address on a single day.
Google Postmaster Tools
Get all GPT Addresses
Returns a list of all addresses for an account
Google Postmaster Tools
Get GPT Domains
Returns a list of all domain records for an account. Each domain record is for a single domain on a single day.
Google Postmaster Tools
Get GPT Domain
Returns domain records for a single domain on the account. Each domain record is for a single domain on a single day.
Google Postmaster Tools
Get GPT Domain Addresses
Returns a list of all address records for an account belonging to a specific domain. Each address record is for a single address on a single day.
Google Postmaster Tools
Get GPT Domains
Returns a list of all domains for an account
Google Postmaster Tools
Get GPT FBL
Returns the FBL for the account or domain
Google Postmaster Tools
Get GPT FBL
Returns the FBL for the account or domain
Google Postmaster Tools
Get GPT Summary
Returns a list of all summary records for an account. Each record is for a single domain's summary and error summary data.
Google Postmaster Tools
Get GPT Addresses Summary
Returns a list of all address summary records for an account. Each record is for a single address's summary data.
Google Postmaster Tools
Get GPT Domains Summary
Returns a list of all domain summary records for an account. Each record is for a single domain's summary data.
Google Postmaster Tools
Get GPT Domains Error Summary
Returns a list of all domain error summary records for an account. Each record is for a single domain's error summary data.
Google Postmaster Tools
Get SNDS Address Info
Returns a list of all address summary records for an account. Each record is for a single address's summary data.
Microsoft SNDS
Get SNDS Address Info
Returns a list of all address summary records for an account and a single address
Microsoft SNDS
Get Spam Trap Hits
Use this endpoint to understand how much of your mail being sent to known spam traps. This endpoint returns daily spam trap hit counts for a provided timerange, categorized by trap type. Deprecated: Use /v2/spamtraps endpoint.
Spam Traps Monitoring
Get Spam Trap Filters
Get a list of domain, ip, subject, From that hit spamtraps, like spamtraps totals but no counts. Deprecated: Use /v2/spamtraps endpoint.
openapi-spamtraps_other
Get Spam Trap Hits Total
Deprecated: Use /v2/spamtraps endpoint without dimension parameter.
openapi-spamtraps_other
List send alerts
List send alerts
Send Alerts
Get a send alert
Get a send alert
Send Alerts
List account hits
List account hits
Send Alerts
List limit thresholds for an account
List limit thresholds for an account
Limits
Get a limit threshold for an account
Get a limit threshold for an account
Limits
List account-level webhooks
Retrieve all account-level webhooks or filter by specific webhook IDs. Returns webhook details including associated event types.
Account Webhooks
Get account-level webhook by ID
Retrieve a specific account-level webhook by its webhook ID. Returns webhook details including associated event types.
Account Webhooks
List Mailgun account IP allowlist entries
List Mailgun account IP allowlist entries
IP Allowlist
List/Search Tests V2
This call returns a list of Email Tests along with metadata about each test. Email Tests are stored for 90 days. When query parameters are provided, only the tests matching the specified criteria will be returned; otherwise, all available tests are returned. The response structure remains identical in both cases.
Email Preview
Get Emailpreview Test Information V2
Retrieves detailed information about a specific test, including the subject, submission time (in UNIX timestamp format), processing statuses, and any content checking results. The response includes one to three properties containing arrays of clients: completed (clients that have successfully uploaded screenshots), processing (clients that are still being processed by our system), and bounced (clients that were bounced by the destination and cannot be retried). Additionally, the system will automatically requeue screenshots if they remain in processing for more than three minutes.
Email Preview
Retrieve Export Job Details for Email Preview Test Screenshots
Retrieves the status and details of an export job created to collect screenshots for an Email Preview Test. Provide the test ID to fetch the latest export job information.
Email Preview
Retrieve Export Job Details for Email Preview Test Screenshots
Retrieves the status and details of an export job created to collect screenshots for an Email Preview Test. Provide both the test ID and the job ID to fetch the export job information.
Email Preview
Get Test Results by client ID V2
This call returns detailed results for screenshots including their upload locations, send times, completion times, and information about bounces, if any. <test_id> is a test ID returned from test creation or the get test list functions. The <client_id> is required and restricts the returned data exclusively to the specified client. If the client is not present in the test or is invalid, an error will be returned.
Email Preview
List Spam Trap Hits
Use this endpoint to understand how much of your mail being sent to known spam traps. This endpoint returns daily spam trap hit counts for a provided timerange, categorized by trap type.
Spam Traps Monitoring
Tracking Certificate: Get certificate and status
Get x509 TLS certificate and status
Domain Tracking
Parse Addresses
Parses a list of comma separated addresses and optionally perform light weight validation of addresses.
openapi-validations_other
Get Threshold
The validation threshold for this account.
openapi-validations_other
Parse Addresses
Parses a list of comma separated addresses and optionally perform light weight validation of addresses.
openapi-validations_other
Validate Address V3
A single email address to validate.
openapi-validations_other
Get Threshold
The validation threshold for this account.
openapi-validations_other
Validate Address V3
A single email address to validate.
openapi-validations_other
Aggregate counts by country
Gets aggregate counts by country (USA, RUS, etc…)
Stats
Aggregate counts by devices triggering events
Gets aggregate counts on devices that triggered events ('tablet', 'phone', 'pc', etc…)
Stats
Aggregate counts by ESP
Gets aggregate counts by email service provider
Stats
List all bounces
Paginate over a list of bounces for a domain.
Bounces
Lookup bounce record
Fetch a single bounce event by a given email address.
Bounces
List all complaints
Paginate a list of complaints for the domain.
Complaints
Lookup complaint record
Fetch a single complaint records to check if a given address is present in the list of complaints.
Complaints
List all unsubscribes
Paginate over a list of unsubscribes for domain.
Unsubscribe
Lookup unsubscribe record
Fetch a single unsubscribe record to check if a given address is present in a list of unsubscribed users.
Unsubscribe
List allowlist records for domain
Paginate over all allowlist records for a domain.
Allowlist
Lookup allowlist record
Fetch a single allowlist record to check if a given address or domain is present.
Allowlist
Retrieves a paginated list of events
Mailgun tracks every inbound and outbound message event and retains this data for at least 3 days. See [Filter expression](https://documentation.mailgun.com/docs/mailgun/user-manual/events/#filter-expression) for details about filtering expressions
Events
Get templates
Returns a list of templates for the domain.
Domain Templates
Get template
Returns metadata information about the stored template specified in the url. If the active flag is provided, the content of the active version of the template is returned. If the version_name flag is provided, version information will be included as well. By default: the `version` field is not provided. To see available versions other than the active version, use the `/versions` API instead
Domain Templates
Get all template versions
Returns a paginated list of template versions.
Domain Templates
Get a version
Retrieve the information and content of the specified version of a template.
Domain Templates
Totals for entire domain
Gets stat totals for an entire domain
Stats
Get a tag
Get a tag associated with a domain
Tags
Get stats by tag
Retrieve stats by tag
Tags
Get aggregate stat types by tag
Returns a list for a given domain for different event types
Tags
List all tags
List all tags associated with a domain
Tags
Get tag limits
Get tag limits by domain
Tags
List Mailgun SMTP credential metadata for a given domain
List Mailgun SMTP credential metadata for a given domain
Credentials
Retrieve a stored email
Event(s) created from sending an email with Mailgun will contain a `storage.key` to use to retrieve the email.
Messages
Get domain webhooks by type
Get the list of url(s) for a webhook identified by its webhook_name.
Domain Webhooks
List of supported country codes
Gets a list of country codes scout curently supports
openapi-scout_other
List of supported devices
Gets a list of devices scout currently supports
openapi-scout_other
List of supported providers
Gets a list of providers scout currently supports
openapi-scout_other
Get domain webhooks
Returns all webhooks for the domain.
Domain Webhooks
List assignable domains
Lists all domains that are not already enrolled in dynamic IP pools.
Dynamic IP Pools
Get messages queue status
Provides default and scheduled message queue information.
Messages
Get tracking settings
Use to check if open, click and unsubscribe tracking are active/inactive.
Domain Tracking
List all Dynamic IP pools
Returns the list of IPs belonging to each of the account's Dynamic IP Pools.
Dynamic IP Pools
List forward rules
By default this endpoint lists all rules defined on the account. You can scope the list of rules by domain by providing the 'domain.name' query parameter.
Forwards
Get a single forward rule by ID
Retrieve a forward rule by ID
Forwards
List dedicated IP pools of the account
#### Description Lists all dedicated IP pools of the account. For each pool returns its basic properties (name, description, the list of IPs) and indicates whether the pool is linked to any domains and whether it's an inherited one.
IP Pools
Get DIPP details
`is_linked` in the response indicates whether the DIPP is currently linked to any domains. If it's `true`, `linked_domain` lists those domains.
IP Pools
Get domains linked to DIPP
Returns a paginated list of domains that are linked to the specified dedicated IP pool.
IP Pools
Retrieves the list of in-flight IP address warmup statuses.
Retrieves a list of in-flight IP warmup statuses for dedicated IP addresses owned by the account. The response includes pagination URLs for navigating through the results.
IP Address Warmup
Retrieves the status of an in-flight IP warmup
Retrieves the status of an in-flight IP warmup, which must be a dedicated IP owned by the account.
IP Address Warmup
List account IPs
`assignable_to_pool` in response lists which IPs can be assigned to DIPPs; this field is present only if the account has 'DIPPs' feature enabled. `total_count` contains the number of items returned in `items` (this depends on the filters applied).
IPs
Get DIPP spillover settings for an account
This endpoint retrieves the DIPP spillover settings for a specific account.
IPs
List account IPs - detailed view
List IPs belonging to the account and subaccounts. For IPs linked to subaccounts, there will be an additional record returned per subaccount The detailed IP view feature must be enabled for the account.
IPs
Get the dedicated IP pool used for spillover for a domain
This endpoint retrieves the DIPP spillover settings for a specific domain.
IPs
Get details about account IP
Get details about account IP
IPs
Get all domains of an account where a specific IP is assigned
The IP must belong to the account. Matching domains are ordered by increasing id, then the `limit` and `skip` parameters are applied. If the `search` parameter is present, it is used to limit the results to domains whose names match the search query. The search query is split into words by whitespace and punctuation, then the logical OR is applied.
IPs
Return the number of IPs available to the account per its billing plan
This endpoint remains active for backwards compatibility. Do not use it in new code. Field `shared` in the response is deprecated and should not be used.
IPs
Get mailing lists
A mailing list is a group of members (recipients) which itself has an email address. This address becomes an ID for this mailing list.
Mailing Lists
Get a mailing list by address
Returns the matching mailing list for the given address
Mailing Lists
Get mailing lists by page
Paginate over mailing lists
Mailing Lists
Get all routes
Get the list of routes. Note that routes are defined globally, per account, not per domain.
Routes
Get a route
Returns a detailed view of the route
Routes
Match address to route
Checks if an address matches at least one route.
Routes
Filtered/grouped totals for entire account
Gets filtered and group stat totals for an entire account
Stats
Totals for entire account
Gets stat totals for an entire account
Stats
Totals for account domains for a single time resolution
Gets stat totals for domains in an account for a single time resolution
Stats
Validate Address V4
A single email address to validate.
Validations
List List Health Preview Jobs
All list health preview jobs you have started.
List Health Preview
Get List Health Preview Job
A single list health preview job by ID.
List Health Preview
Get domains
Get the list of domains. Can be filtered by state or authority. Sorting is optional. The list is paginated and limited to 1000 items per page.
Domains
List domain keys
List all domain keys for your domain, including active/inactive and valid/invalid ones.
Domain Keys
Get domain details
Fetches json representation of a domain that includes details about the domain's state and settings.
Domains
List Email Providers
List all available email providers.
Inbox Placement
List Results
Get the details for all placement test results.
Inbox Placement
List Available Attributes for Results
The attributes that can have values listed (for autocomplete).
Inbox Placement
Get List of Values for a Result Attribute
For the given attribute list the known values (for autocomplete).
Inbox Placement
List available filters for Results
The filters that can be used when querying for results.
Inbox Placement
Get Result Details
Get the details for a single result.
Inbox Placement
Get Result Details
Get the details for a single result.
Inbox Placement
List Seed Lists
List Seed Lists
Inbox Placement
List Available Attributes for Seed Lists
List Available Attributes for Seed Lists
Inbox Placement
Get List of Values for Seed List Attribute
Get List of Values for Seed List Attribute
Inbox Placement
Get Seed List
Get Seed List
Inbox Placement
Get List of Available Seed List Filters
Get List of Available Seed List Filters
Inbox Placement
Get Result by a Share ID
Get a result by the share ID.
Inbox Placement
Get Result Sharing Status
The sharing status of a result.
Inbox Placement
Get Result Sharing Status
The sharing status of a result.
Inbox Placement
Get account-level templates
Returns a list of account-level templates.
Account Templates
Get an account-level template
Returns metadata information about the stored account-level template. If the active flag is provided, the content of the active version of the template is returned.
Account Templates
Get all account-level template versions
Returns a paginated list of versions for an account-level template.
Account Templates
Get an account-level template version
Retrieve the information and content of the specified version of an account-level template.
Account Templates
Get webhook signing key saved on the account
Get webhook signing key saved on the account
Account Management
Get current custom sending limit
Fetch the details of custom sending limit on the account
Custom Message Limit
List all subaccounts
Fetch all subaccounts
Subaccounts
List DIPPs delegated to subaccounts
#### Description Lists all subaccounts of the parent account to which the parent account has delegated DIPPs.
Delegated DIPPs
Get a single subaccount
Fetch the details of a single subaccount
Subaccounts
Get current custom sending limit
Fetch the details of custom sending limit on the account
Subaccounts
Get authorized email recipients for a sandbox domain
Get webhook signing key saved on the account
Account Management
Get users on an account
Get users on an account
Users
Get one's own user details
Get one's own user details, requires use of an API key with a `user_id` saved on it, typically of 'web' kind
Users
Get a user's details
Get details for a user on the account
Users
Update pool IPs
Adds and/or removes IPs to/from the specified dynamic IP pool. A given pool is required to have at least 1 IP that is not actively warming. Additionally, a single IP cannot be assigned to multiple dynamic pools.
Dynamic IP Pools
Edit DIPP
The account must have 'DIPPs' feature enabled. It's not allowed to edit a DIPP inherited from the parent account. IPs being added to the DIPP must be dedicated ones and belong to the account. If IPs of the DIPP end up modified, and the DIPP is linked to domains, the domains will be updated asynchronously (after this endpoint returns response). Returns an error if the passed parameters won't result in any changes.
IP Pools
Set or Modify the dedicated IP pool used for IP spillover
This endpoint allows you to set or update the DIPP spillover settings for an account . You can specify the ID of the IP pool that spillover IPs are assigned to. The IP pool must contain at least one fully warmed IP address to be valid. To disable DIPP spillover, set the pool_id to an empty string ("").
IPs
Set or modify the dediciated IP pool used for spillover for a domain
This endpoint allows you to set or update the DIPP spillover settings for a specific domain. You can specify the ID of the IP pool that spillover IPs are assigned to. The IP pool must contain at least one fully warmed IP address to be valild. To disable DIPP spillover, set the pool_id to an empty string ("").
IPs
Update subaccount IP assignments
#### Description Links and/or unlinks dedicated IPs to/from one or more subaccounts in a single operation. IPs linked to subaccounts can be linked to subaccount domains and placed in subaccount IP pools. The account must have the centralized IP assignment feature enabled. Either subaccount_id (one or more) or all_subaccounts=true must be specified, but not both. When all_subaccounts=true or over 100 subaccounts are specified, the operation is applied to every subaccount asynchronously and the response will contain 'queued' instead of 'success'. Rules for linking an IP: The IP must be a dedicated IP belonging to the parent account. The IP must not be assigned to a Dynamic IP Pool on the parent account. Rules for unlinking an IP: The IP must not be assigned to any IP pools on the subaccount. The IP must not be assigned to any domains on the subaccount. #### Request Schema Request parameters are encoded as form data. Name | Description | Required | Type --- | --- | --- | --- subaccount_id | Id of a subaccount to update (may be specified multiple times). Required unless all_subaccounts is true. | false | string all_subaccounts | When true, applies the operation to all subaccounts of the parent account asynchronously. Cannot be combined with subaccount_id. | false | string link_ip | Dedicated IP address to link to the subaccount (may be specified multiple times) | false | string unlink_ip | Dedicated IP address to unlink from the subaccount (may be specified multiple times) | false | string
IPs
Bulk upload members to a mailing list (CSV)
Adds multiple members, up to 1000 per call, to a mailing list via CSV file.
Mailing Lists
Bulk upload members to a mailing list (JSON)
Adds multiple members, up to 1000 per call, to a mailing list, using JSON array format. If the request includes more than 100 entries, the mailing list will be updated asynchronously.
Mailing Lists
Create a mailing list member
Adds a new member to the mailing list. For adding many list members, consider bulk upload endpoints "POST /v3/lists/{list_address}/members.json" or "members.csv".
Mailing Lists
Test message
Sends test message to emails with dummy data.
Alerts
Add Alert
Use this endpoint to add new alert settings record. This service facilitates notifications (Webhook, Slack, or Email) for both Mailgun Optimize and Send Alert threshold breaches. ### Webhooks This section covers details around consuming alerts via webhooks. If you are familiar with Mailgun Send webhooks (which provide status updates on individual email deliveries), there is a lot of overlapping similarity, however, there are also a few minor nuances to account for. #### Securing Webhooks HMAC is used to verify the integrity as well as the authenticity of received webhooks. To verify the origin of a webhook: 1. Encode the webhook’s entire POST request body with the HMAC algorithm (using your webhook signing key and SHA256 digest mode) 2. Compare the resulting hexdigest to the signature provided in the POST request’s X-Sign header. NOTE: If you’re consuming Mailgun Send webhooks, please note that your Mailgun Send webhook signing key differs from your Alerts webhook signing key. Your Alerts webhook signing keys, used for both Optimize and Send Alert products, are available within the Mailgun Alerts UI. #### Webhook URL Validation When adding or updating a webhook URL for alerts, we will ensure the endpoint is reachable by sending a GET request to the provided URL. If a 200 response is not returned from your endpoint, the request will be rejected and your alert setting will not be saved. We intentionally chose to send a GET request instead of a POST when validating URLs so that your webhook endpoint does not have to account for test requests. Additionally, when a POST request is sent to your webhook URL, if a 2xx is not returned, we will attempt retries via an exponential backoff strategy for up to ~8 hours. If the max retry count is reached, the alert will be disabled and the related alert settings record’s disabled_at field will be populated.
Alerts
Test message
Sends test message to slack channels with dummy data.
Alerts
Test webhook
Sends test webhook request to specified url with dummy data.
Alerts
List logs
Gets customer event logs for an account
Logs
Query account metrics
Queries filtered metrics for an account
Metrics
Post query to list account tags or search for single tag
Gets the list of all tags, or filtered by tag prefix, for an account
Tags New
Query account usage metrics
Queries filtered usage metrics for an account
Metrics
Create a domain key
Create a domain key. Note that once private keys are created or imported they are never exported. Alternatively, you can import an existing PEM file containing a RSA private key in PKCS #1, ASn.1 DER format. Note, the pem can be passed as a file attachment or as a form-string parameter.
Domain Keys
Rotate Automatic Sender Security DKIM key for a domain
Immediately rotate your DKIM key. This will trigger a rotation even if auto-rotation is disabled on the domain.
DKIM Security
Gets referral link to redsift
Gets referral link to redsift
DMARC Reports
Add a single domain to an account
Add a single domain to an account
Domains
Register an IP address
Register an IP address
IP Blocklist Monitoring
Create Accessibility Test
This endpoint allows users to submit an accessibility test for processing. It accepts a set of HTML content, processes it for accessibility issues, and returns a unique job ID for tracking the status of the test. The status of the job will display in the meta object, with a status of 'Processing'.
Accessibility
Create a Code Analysis Test
Create a code analysis test to analyze HTML content for email client feature compatibility.
Code Analysis
Create New Code Analysis Version
Creates a new version of an existing code analysis test with incremented version number.
Code Analysis
Update Resolved Status
Updates the resolved status of a specific instance within a feature in the latest version of a test.
Code Analysis
Create an Image Validation Test
Create an image validation test.
Image Validation
Create an Image Validation Test by HTML
Create an image validation test with HTML
Image Validation
Optimize Images By Test ID
Optimizes images by test id
Image Validation
Optimize Single Image By Test ID
Optimizes a single image by test id
Image Validation
Reprocess Image Validation Test
Reprocess an image validation test.
Image Validation
Create an Image Validation Test by Image Upload
Create an image validation test by image upload
Image Validation
Create a Link Validation Test
Create a link validation test.
Link Validation
Create a Link Validation Test from an html input
Create a link validation test from an HTML input.
Link Validation
Reprocess Link Validation Test
Reprocess a link validation test.
Link Validation
Validates link test results against the provided spreadsheet file
Compares link validation test results to the spreadsheet provided as a CSV, XLS or XLSX file.
Link Validation
Create Spam Test (V1)
Initiates an inbox placement test with subject and HTML provided directly in the request body. Returns immediately with status=processing; poll GET using the Retry-After interval.
Spam Testing
Create Mailgun API key
Create Mailgun API key
Keys
Regenerate Mailgun Public API key
Regenerate Mailgun Public API key
Keys
Generate Preview Address
Returns or generates an account's email preview address.
Email Preview
Create PreviewShare
Create a shareable link to an email preview test.
Email Preview
Rotate PreviewShare
Re-generates the uuid and share url, and resets the expiration.
Email Preview
Create Emailpreview Test
Creates a new email preview test.<br><br>**WARNING:** _This endpoint is deprecated in favor of our [V2 endpoint](https://documentation.mailgun.com/docs/inspect/api-reference/openapi-final/tag/Email-Preview/#tag/Email-Preview/operation/POST-v2-preview-tests)._
Email Preview
Create a send alert for an account
Create a send alert for an account
Send Alerts
Create a limit threshold for an account
Create a limit threshold for an account
Limits
Create an account-level webhook
Create account-level webhook URLs to receive Mailgun's POST requests containing event information across all domains in your account. Note: Webhook changes can take up to 10 minutes to become effective due to caching.
Account Webhooks
List statistic v2
Items that have no bounces and no delays(classified_failures_count==0) are not returned.
Bounce Classification
Add Mailgun account IP allowlist entry
Add Mailgun account IP allowlist entry
IP Allowlist
Generate Preview Address
Returns or generates an account's email preview address.
Email Preview
Create Email Preview Test V2
This call creates a new email test and submits it to our system for processing.<br>All requests must contain a subject property and one source property (either html or url). All other properties are optional. In the following table, each property and its default value is shown. <br>If content-checking variables (such as those for link validation, image validation, or accessibility) are set in the body of the request, the endpoint will run content-checking on the email content. <br>The response will include an id property that should be used to request the results or trigger further processes on the email content.<br>For enterprise customers, the response will also include the customer_id and reference_id that were submitted with the test.
Email Preview
Create Export Job for Email Preview Test Screenshots
Initiates an export job that collects screenshots for a specified Email Preview Test. Provide the list of client IDs whose screenshots you want to export. The job status can be monitored using the job ID returned in the response.
Email Preview
Tracking Certificate: Generate
Initiates generation of a TLS certificate for the tracking domain in a background task. Once generation is enqueued, you may poll the status endpoint in `location` field to check for success
Domain Tracking
Parse Addresses
Parses a list of comma separated addresses and optionally perform light weight validation of addresses.
openapi-validations_other
Parse Addresses
Parses a list of comma separated addresses and optionally perform light weight validation of addresses.
openapi-validations_other
Validate Address V3
A single email address to validate.
openapi-validations_other
Validate Address V3
A single email address to validate.
openapi-validations_other
Add bounces
Request body is expected to be a valid JSON encoded sting containing up to 1000 bounce records or a single bounce record as application/form-data
Bounces
Import list of bounces
Import a CSV file containing a list of addresses to add to the bounce list. The CSV file must be 25MB or under and must contain the following column headers: address, code, error, created_at. address is a valid email address. code is error code (optional, default: 550). error is error description (optional, default: empty string). created_at is timestamp of bounce event in RFC2822 format (optional, default: current time)
Bounces
Add complaints
Request body is expected to be a valid JSON encoded sting containing up to 1000 complaint records or a single complaint record as application/form-data
Complaints
Import complaint list
Import a CSV file containing a list of addresses to add to the complaint list. The CSV file must be 25MB or under and can contain the following column headers: address, created_at. address is a valid email address (required). created_at is timestamp of complaint event in RFC2822 format (optional, default: current time)
Complaints
Add unsubscribes
Request body is expected to be a valid JSON encoded sting containing up to 1000 unsubscribe records or a single unsubscribe record as application/form-data
Unsubscribe
Import unsubscribe list
Import a CSV file containing a list of addresses to add to the unsubscribe list. The CSV file must be 25MB or under and can contain the following column headers: address, tags, created_at. address is a valid email address (required). tags is tag to unsubscribe from, use * to unsubscribe an address from all domain's correspondence (optional, default: *). created_at is timestamp of unsubscribe event in RFC2822 format (optional, default: current time)
Unsubscribe
Add allowlist record
Add an address or domain to the allowlist table
Allowlist
Import allowlist
Import a CSV file containing a list of addresses and/or domains to add to the allowlist. The CSV file must be 25MB or under and must contain the following column headers: address, domain. For each row provide either an address or a domain, but not both - choose one, keep the other blank.
Allowlist
Send an email
Pass the components of the messages such as To, From, Subject, HTML, text parts, attachments, etc. Mailgun will build a MIME representation of the message and send it. In order to send you must provide one of the following parameters: 'text', 'html', 'amp-html' or 'template'. Important: Send options (parameters starting with o:, h:, v:, or t:) are limited to 16KB total
Messages
Send an email in MIME format
Build a MIME string yourself using a MIME library and submit it to Mailgun. Important: Send options (parameters starting with o:, h:, v:, or t:) are limited to 16KB total
Messages
Create a template
Store a new template, including its name, description and (optionally) the template content. If the template content is provided, a new version is automatically created and becomes the active version.
Domain Templates
Create a template version
Adds a new template version. If the template doesn’t contain any other versions, the first version becomes active. A template can store up to 40 versions.
Domain Templates
Enroll all account domains
Begins an asynchronous background job to assign all domains to Dynamic IP Pools. This can also include domains belonging to subaccounts depending on the provided parameters. The Dynamic IP Pools feature must be enabled for the account and the request must come from a parent account user.
Dynamic IP Pools
Create Mailgun SMTP credentials for a given domain
Create Mailgun SMTP credentials for a given domain
Credentials
Resend an email
Resend an email
Messages
Create a domain webhook
Create a list of webhook URLs you'd like to receive Mailgun's POST requests containing event information.
Domain Webhooks
Enroll domain
Domains enrolled in the Dynamic IP pools feature will be assigned an IP pool based on reputation. The feature must be enabled and configured before enrolling domains.
Dynamic IP Pools
Initialize/set IPs for all pools
Any existing IPs in dynamic IP pools will be replaced. All IPs must be dedicated IPs and belong to the account. Additionally, each dynamic IP pool must contain at least 1 IP that is not currently warming.
Dynamic IP Pools
Add IP to Dynamic IP Pool
Adds a given IP to a Dynamic IP Pool. The IP must be dedicated and belong to the account.
Dynamic IP Pools
Create a forward rule
### Examples You can add multiple email recipients by including the 'forward.recipient' parameter multiple times up to a maximum of 5. ``` $ curl -X POST https://api.mailgun.net/v3/forwards -F match='email@mg.example.com' -F forward.recipient=destination1@gmail.com -F forward.recipient=destination2@gmail.com ``` The `match` parameter can contain a wild card expression ``` $ curl -X POST https://api.mailgun.net/v3/forwards -F match='match*@mg.example.com' -F forward.recipient=catchall@gmail.com ``` Rules only support `*` or literal characters where `*` matches any sequence of characters. So `a.*@example.com` matches email addresses that start with `a.` not email addresses that start with `a` like a regex match would.
Forwards
Add a new DIPP to the account
The account must have 'DIPPs' feature enabled. Returns the id of the newly created DIPP.
IP Pools
Add multiple IPs to the DIPP
The account must have 'DIPPs' feature enabled. It is not allowed to modify a DIPP inherited from the parent account. All IPs must be dedicated ones, belong to the account and not belong to any other DIPP. All domains linked to the DIPP will be updated so that their IPs include the newly added addresses. If the DIPP is delegated to subaccounts, those will also be updated. The processing of affected domains and subaccounts happens asynchronously after the endpoint returns a response.
IP Pools
Creates a warmup plan for an IP Address
Creates a new warmup plan for an IP address. The IP must be dedicated and owned by the account.
IP Address Warmup
Place account IP into a dedicated IP band
The `Dedicated IP Bands` feature must be enabled for the account. The IP must be a dedicated one belonging to the account.
IPs
Assign an IP to all account domains
The IP must belong to the account.
IPs
Add a new dedicated IP to the account
A new IP can be assigned only if billing limits allow that.
IPs
Create a mailing list
Adds a mailing list to the account.
Mailing Lists
Create a route
Adds a new route to the account
Routes
Create Bulk Job
Validate a full list of addresses.
Bulk Validations
Create a List Health Preview Job
Start a list health preview job from a list of addresses. We will sample the list and run validations on a small percentage.
List Health Preview
Create a domain
Creates a domain for sending emails
Domains
Create domain webhooks (v4)
Create webhook URLs for multiple event types in a single operation. This v4 endpoint allows associating one URL with multiple webhook event types.
Domain Webhooks
Generate a New Seed List
Generate a New Seed List
Inbox Placement
Run Inbox Placement Test
Create and run a new inbox placement test. Either 'html' or 'template_name' field should be provided. 'variables' are [Template variables](https://documentation.mailgun.com/docs/mailgun/user-manual/sending-messages/send-templates), which could be used in html or template. You can use next recipient variables inside Template variables, which will be filled for every seed automatically: %recipient.first_name%, %recipient.last_name%.
Inbox Placement
Create an account-level template
Store a new account-level template that is available across all domains for the account. Include the template name, description and (optionally) the template content. If the template content is provided, a new version is automatically created and becomes the active version.
Account Templates
Create an account-level template version
Adds a new version to an account-level template. If the template doesn't contain any other versions, the first version becomes active. A template can store up to 40 versions.
Account Templates
Create or regenerate webhook signing key on an account
Create or regenerate webhook signing key on an account
Account Management
Resend account activation email to the account owner
Resend account activation email to the account owner
Account Management
Create a subaccount
Create a subaccount
Subaccounts
Disable a subaccount
Disable a subaccount
Subaccounts
Enable a subaccount
Enable a subaccount
Subaccounts
Add authorized email recipient for a sandbox domain
Add authorized email recipient for a sandbox domain
Account Management
Update a mailing list member
Updates a mailing list member with the given properties. Existing properties not included in the request will not be changed.
Mailing Lists
Update Alert
Use this endpoint to update an existing alert setting record. NOTE: When updating a webhook alert, we will ensure the endpoint is reachable by sending a GET request to the provided URL. If a 200 response is not returned, a 400 will be returned and the alert setting update will be rejected.
Alerts
Update Slack settings
Update Slack settings
Alerts
Reset Webhook Signing Key
Reset Webhook Signing Key
Alerts
Update account tag
Updates the tag description for an account
Tags New
Update Automatic Sender Security DKIM key rotation for a domain
The minimum allowed interval for rotation is 5 days.
DKIM Security
Override domain assignment
Overrides a domain's dynamic IP pool assignment. A domain's pool will not be updated by health checks while an override is present.
Dynamic IP Pools
Queues a domain to be processed for verification
Queues a domain to be processed for verification
Domains
Update the IP address
Update the IP address
IP Blocklist Monitoring
Update PreviewShare
Updates PreviewShare record enabled field.
Email Preview
Reprocess Emailpreview Test
Reprocesses the test for the passed clients.
Email Preview
Update a send alert
Updates the configuration of an existing send alert. NOTE: This endpoint performs a full replacement (PUT) of the alert resource. To update specific fields like 'alert_channels' without losing existing configuration, you should first fetch the current alert object via a GET request. Use the attributes from the existing alert to populate the request body, modifying only the 'alert_channels' array (or other desired fields) before sending the PUT request. Omitting existing attributes may result in validation errors or the loss of current settings.
Send Alerts
Update a limit threshold for an account
Update a limit threshold for an account
Limits
Update an account-level webhook
Update an existing account-level webhook by replacing its URL, description, and event types. The webhook is identified by webhook_id and completely replaced with the new configuration. Note: Webhook changes can take up to 10 minutes to become effective due to caching.
Account Webhooks
Update individual Mailgun account IP allowlist entry's description
Update individual Mailgun account IP allowlist entry's description
IP Allowlist
Tracking Certificate: Regenerate expired certificate
Initiates regeneration of an expired TLS certificate for the tracking domain in a background task. Once generation is enqueued, you may poll status endpoint in location field to check for success. This will not regenerate an existing certificate that is still valid
Domain Tracking
Update template
Update the description of a template.
Domain Templates
Copy a template
Copies an existing template into new templates with the provided names and account IDs.
Domain Templates
Rename a template
Renames the specified template
Domain Templates
Update a version
Update information or content of the specific template version. Existing fields not included in the request will not be changed
Domain Templates
Copy a version
Copies an existing version into a new version with the provided name.
Domain Templates
Update tag
Update a tag associated with a domain
Tags
Update Mailgun SMTP credentials
Update Mailgun SMTP credentials for a given domain and SMTP user
Credentials
Update domain webhook
Replace the list of urls by the given one with the `url` param. Here is the list of supported webhook: `accepted`, `opened`, `clicked`, `unsubscribed`, `delivered`, `permanent_fail`, `temporary_fail` and `complained`.
Domain Webhooks
Update DKIM authority
You can delegate the domain authority to an other domain. Domain's authority is set to itself by default.
Domain Keys
Update a DKIM selector
Selector is the unique identifier of your key. It has to be different from other keys selector.
Domain Keys
Update click tracking settings
Use to turn on/off the click tracking at the domain level.
Domain Tracking
Update open tracking settings
Use to turn on/off the open tracking at the domain level.
Domain Tracking
Update unsubscribe tracking settings
Use to turn on/off the unsubscribe tracking at the domain level.
Domain Tracking
Update a single forward rule by ID
All parameters are optional, only the provided fields will be updated
Forwards
Delegate DIPP to Subaccount
Delegates a dedicated IP pool (DIPP) from the parent account to a specified subaccount. Unlike legacy endpoints, this supports accounts with multiple delegated DIPPs. Request parameters are encoded as form data.
IP Pools
Add an IP to a DIPP
The account must have 'DIPPs' feature enabled. It is not allowed to modify a DIPP inherited from the parent account. The IP must be a dedicated one, belong to the account and not belong to any other DIPP. All domains linked to the DIPP will be updated so that their IPs include the newly added address. If the DIPP is delegated to subaccounts, those will also be updated. The processing of affected domains and subaccounts happens asynchronously after the endpoint returns a response.
IP Pools
Update a mailing list
Update mailing list properties, such as address, description or name
Mailing Lists
Update a route
Updates a given route. All parameters are optional. This only updates the specified fields, leaving others unchanged.
Routes
Promote List Health Preview Job
A currently running list health preview job can be promoted to a full bulk validations job, which will validate all addresses in the list.
List Health Preview
Activate a domain key
Activate a key to be used to DKIM sign emails with. Note: dns records must be valid for a domain key to be activated
Domain Keys
Deactivate a domain key
Deactivating for a specified authority and/or selector means a key won't be used for signing email anymore, even if they are valid.
Domain Keys
Update domain webhooks (v4)
Update webhook URL to associate it with different event types. This replaces the existing event type associations for the given URL.
Domain Webhooks
Update domain
Update domain configuration like smtp credentials, enable/disable automatic sender security, spam actions, wildcard, or tracking web scheme.
Domains
Verify Domain
Verify the domains DNS records (includes A, CNAME, SPF, DKIM and MX records) to ensure the domain is ready and able to send
Domains
Update Seed List
Update Seed List
Inbox Placement
Update Result Sharing Status
Change the sharing status of a result or create a new share URL
Inbox Placement
Update Result Sharing Status
Change the sharing status of a result or create a new share URL
Inbox Placement
Update an account-level template
Update the description of an account-level template.
Account Templates
Copy a template
Copies an existing template into new templates with the provided names and account IDs.
Account Templates
Rename a template
Renames the specified account level template
Account Templates
Update an account-level template version
Update information or content of the specific version of an account-level template. Existing fields not included in the request will not be changed.
Account Templates
Copy an account-level template version
Copies an existing version of an account-level template into a new version with the provided name.
Account Templates
Update variable account settings
Update variable account settings
Account Management
Update account feature
Update account feature
Account Management
Re-enable account disabled for hitting send limit
Re-enable an account that was disabled for reaching the custom sending limit
Custom Message Limit
Set a custom sending limit
Set a custom sending limit
Custom Message Limit
Update subaccount feature
Update subaccount feature
Subaccounts
Delegate a DIPP to a subaccount
#### Description Initiates the process to delegate a DIPP to a subaccount. If the subaccount already has a DIPP delegated to it, that DIPP will be replaced. The success of this API call only indicates that the process has been started; it can still fail midway for various reasons. This endpoint cannot be used with subaccounts that have multiple inherited DIPPs. #### Request Schema Request parameters are encoded as form data. Name | Description | Required | Type --- | --- | --- | --- pool_id | Id of the DIPP to delegate | true | string
openapi-tower_other
Set a custom sending limit
Set a custom sending limit
Subaccounts
FAQ

Mailgun integration, answered

How do AI agents use Mailgun through Open Connector?
Your user connects Mailgun once with one of its cataloged authentication methods. Open Connector stores the credential in an encrypted vault and exposes Mailgun tools to your agent over MCP or a typed API, with credentials injected server-side on each call.
Is this a Mailgun MCP server?
Yes. Open Connector can serve Mailgun as a named MCP server with a scoped allowlist and a per-user connection URL, so any MCP client can call Mailgun actions with credentials injected server-side.
Where do Mailgun credentials live?
In your own infrastructure. Open Connector keeps credentials in its own vault and injects them at call time, so they never leave your environment.

Give your agents Mailgun — keep the keys.

Open source, self-hostable, with Mailgun credentials that never leave your infrastructure. Run it from source today.