Overview
The Mailgun Inspect API is part of the Sinch family. Mailgun Inspect is an email pre-send quality control tool that ensures your emails are optimized for delivery, readability, and accessibility. By integrating Mailgun Inspect into your workflow, you can catch potential issues before they reach your recipients, saving time and improving your email campaigns' effectiveness.
Postman
Visit out Postman collection for Inspect
Base URLs
Mailgun supports both US and EU regions. Use the appropriate base URL depending on where your domain is hosted:
Service | US Endpoint | EU Endpoint |
---|---|---|
REST API | api.mailgun.net | api.eu.mailgun.net |
Authentication
Authentication is handled via HTTP Basic Auth. Here's how it works:
Username: api
Password: Your API Key
How to Obtain an API Key
Log in to your Mailgun Dashboard.
Navigate to Account Settings > API Keys.
Copy your Private API Key. Keep it secure, as it won’t be displayed again.
Example: Authentication with cURL
curl --user 'api:YOUR_API_KEY'
Example: Submitting an Accessibility Test**
Send a POST request with the HTML content of your email for accessibility analysis.
curl --user 'api:YOUR_API_KEY' \
-X POST https://api.mailgun.net/v1/inspect/accessibility \
-H "Content-Type: application/json" \
-d '{
"html": "<html>Your email HTML content here</html>",
"encoded": false
}'