Skip to content

Alerts (0.0.1)

Our alerting solution is centered around two concepts: events and channels. The occurrence of an event can be configured to trigger an alert. A channel describes the delivery method for an alert. Every configured alert consists of an event type / channel pair. This level of granularity allows alerting to be configured to your exact preference.

Download OpenAPI description
Languages
Servers
US Mailgun

https://api.mailgun.net/

EU Mailgun

https://api.eu.mailgun.net/

Operations

Inbox Placement

Inbox Placement testing allows you to see the likely deliverability of your email campaigns.

Operations

Email Preview

This API provides functionality to create and manage email preview tests, as well as create shareable links.

Operations

Request

Gets HTML content of the passed test.

Security
basicAuth
Path
test_idstringrequired

Test to get the content of

contentstring

Content to get: inlinecss or textonly

curl -i -X GET \
  -u <username>:<password> \
  'https://api.mailgun.net/v1/preview/tests/{test_id}/content/{content}'

Responses

A 200 response

Bodyapplication/json
contentstringrequired
Response
application/json
{ "content": "string" }

Request

Returns or generates an account's email preview address.

Security
basicAuth
curl -i -X POST \
  -u <username>:<password> \
  https://api.mailgun.net/v1/preview/address

Responses

A 200 response

Bodyapplication/json
preview_addressstringrequired
Response
application/json
{ "preview_address": "string" }

Request

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.

Security
basicAuth
Query
customer_idstring

Filter tests by the provided customer ID.

fromstring

The starting point of your test date range. Accepts formats like '2025-03-10 17:52:07', Unix timestamp, or 'yesterday'.

tostring

The ending point of your test date range. Accepts formats like '2025-03-10 17:52:07', Unix timestamp, or 'yesterday'.

subjectstring

The "subject" field of returned tests must contain the exact string. This search is case-insensitive.

headersstring

Enterprise users can use this field in a KV array of x-headers submitted with the test. This is an AND match, meaning all headers must be present to return.

resultsinteger

The number of results to return. Must be between 1 and 200. The default value is 50.

pageinteger

The page number. If you submit a number higher than the number of pages in the data, an empty array will be returned. The default value is 1.

curl -i -X GET \
  -u <username>:<password> \
  'https://api.mailgun.net/v2/preview/tests?customer_id=string&from=string&to=string&subject=string&headers=string&results=0&page=0'

Responses

A 200 response

Bodyapplication/jsonArray [
idstring
dateinteger(int32)
typestring
subjectstring
headersobject
]
Response
application/json
[ { "id": "DdbNga1MdL3N7sO19v5MAmpOKIqFrLg9cgpCIgS4othXJ", "date": 1739876826, "type": "email-test", "subject": "subject", "headers": {} }, { "id": "pDdLWjbj3ZbAnHkTbg3QG27mFyoc62OAH1WJXgmb0uNT4", "date": 1739874606, "type": "email-test", "subject": "", "headers": {} } ]

Spam Traps Monitoring

Our spam trap monitoring service surfaces how much of your email is being sent to known spam traps.

Operations
Operations
Operations

Domain Blocklist Monitoring

Blocklist Monitoring enables you to keep an eye on your reputation. Monitor your domains against our curated list of blocklist providers to make sure you aren't being blocked.

Operations

Google Postmaster Tools

This API provides access to Google Postmaster data.

Operations

Microsoft SNDS

This API provides access to Microsoft SNDS data.

Operations
Operations