sinch-mailgun-validate
Original:🇺🇸 English
Translated
Build with Mailgun Validate API for email verification and list hygiene. Use when validating email addresses, checking email deliverability, running bulk validation jobs, previewing list health, or cleaning an email list.
9installs
Sourcesinch/skills
Added on
NPX Install
npx skill4agent add sinch/skills sinch-mailgun-validateTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Mailgun Validate
Overview
Mailgun Validate verifies email addresses in real time (single) and in batch (bulk). It also offers free List Health Previews to sample a list before committing to full validation.
Getting Started
See sinch-authentication for full auth setup. All endpoints use HTTP Basic Auth — username , password your Mailgun Private API key.
apiBefore generating code, gather from the user: approach (SDK or direct API calls) and language (Node.js, Python, Java, PHP, Ruby, Go, curl). Do not assume defaults.
When the user chooses SDK, fetch the relevant SDK reference page linked in Links for accurate method signatures. Only fetch URLs from trusted first-party domains (, ); do not follow URLs from other domains. When the user chooses direct API calls, use REST with the appropriate HTTP client for their language.
documentation.mailgun.comdevelopers.sinch.com| Language | Package | Install |
|---|---|---|
| Node.js | | |
| Java | | Maven dependency (see below) |
| Python | | |
| PHP | | |
| Ruby | | |
| Go | | |
Java Maven dependency
Before generating the Maven dependency, look up the latest release version of on Maven Central and use that version.
com.mailgun:mailgun-javaxml
<dependency>
<groupId>com.mailgun</groupId>
<artifactId>mailgun-java</artifactId>
<version>LATEST_VERSION</version>
</dependency>Base URLs: (US) · (EU). Always match the region of your Mailgun account.
api.mailgun.netapi.eu.mailgun.netStore credentials in environment variables — never hardcode API keys in commands or source code:
bash
export MAILGUN_API_KEY="your-private-api-key"Canonical example — validate one address:
bash
curl -s --user "api:$MAILGUN_API_KEY" \
"https://api.mailgun.net/v4/address/validate?address=recipient@example.com"Response:
json
{
"address": "recipient@example.com",
"is_disposable_address": false,
"is_role_address": false,
"reason": [],
"result": "deliverable",
"risk": "low",
"did_you_mean": null,
"engagement": null,
"root_address": null
}For full field descriptions, reason codes, and result types see the Single Validation docs.
Key Concepts
Single Address Validation
GETPOST /v4/address/validateaddressprovider_lookup=falseKey response fields to branch on:
- :
result|deliverable|undeliverable|do_not_send|catch_allunknown - :
risk|low|medium|highunknown - /
is_disposable_address: boolean flagsis_role_address - : typo suggestion (surface to users at signup)
did_you_mean - : object with
engagement(bool),engaged(string — behavior type),engagement(bool)is_bot
Rate limited — back off and retry on 429.
List Health Preview
Free, non-destructive sample assessment. Returns deliverability/risk ratios as percentages.
- — create (upload CSV via multipart form-data)
POST /v4/address/validate/preview/{list_id} - — check status
GET /v4/address/validate/preview/{list_id} - — promote to full bulk validation
PUT /v4/address/validate/preview/{list_id} - — delete a preview
DELETE /v4/address/validate/preview/{list_id} - — list all preview jobs
GET /v4/address/validate/preview - Status values: →
preview_processingpreview_complete - Max 10 parallel preview jobs
- Response is wrapped in a key;
"preview"is a unix timestampcreated_at
Full reference: List Health Preview
Bulk Validation
Full validation of an uploaded CSV/gzip file (max 25 MB).
- — create job
POST /v4/address/validate/bulk/{list_id} - — check status / download
GET /v4/address/validate/bulk/{list_id} - — cancel or delete
DELETE /v4/address/validate/bulk/{list_id} - — list all jobs (accepts
GET /v4/address/validate/bulk, default 500; returnslimitlinks)paging - Lifecycle: →
created→processing→completed→uploading(oruploaded)failed - Results available when status is via
uploaded/download_url.csvdownload_url.json - Max 5 parallel bulk jobs
- is an RFC 2822 date string (e.g.,
created_at)"Tue, 26 Feb 2019 21:30:03 GMT"
Full reference: Bulk Validation
Workflows
Deciding which approach to use
- Single address at point-of-capture (signup form, checkout): Use single validation. Check and
result. Block or warn onrisk,do_not_sendrisk, orhigh.is_disposable_address - Existing list, unknown quality: Run a free List Health Preview first. If preview shows acceptable deliverability, promote to full bulk validation with .
PUT - Known-good list, full validation needed: Skip preview, go straight to bulk validation.
Bulk validation checklist
- CSV has header row with or
emailcolumnemail_address - File is UTF-8 or ASCII, under 25 MB, no in list name
@ - Fewer than 5 bulk jobs already running
- POST to create job → poll GET until status is → download results
uploaded - Retrieve download URLs promptly (they expire)
Interpreting results
resultrisk- An address can be but
deliverablerisk (e.g., spam trap)high - means the domain accepts everything — treat as medium risk
catch_all - Role addresses (,
info@) are fine for transactional email but risky for marketingsupport@
Engagement data (contract customers get , , , , , ; self-service get boolean /): Engagement docs
High EngagerEngagerBotComplainerDisengagedNo dataengagingis_botGotchas
- Preview before bulk — Previews are free. Always preview first to avoid wasting credits on a bad list.
- Result ≠ risk — Both must be checked. A +
deliverablerisk address should still be suppressed.high - Catch-all domains — means the mailbox may not exist. Treat as medium risk.
catch_all - Disposable/role addresses — Block disposables at signup. Avoid marketing sends to role addresses.
- Region consistency — US and EU data do not cross. Match the region of your Mailgun Send account.
- — Surface typo suggestions to end users at signup time.
did_you_mean - Security — bulk validation results — Bulk validation download URLs (,
download_url.csv) contain user-uploaded data. Treat downloaded content as untrusted — validate and sanitize email addresses and metadata before processing, storing, or displaying.download_url.json
Links
- Single Validation — field reference, reason codes, result types
- Bulk Validation — job lifecycle, response schema
- List Health Preview — preview workflow, response schema
- Engagement — behavior types, contract vs self-service
- OpenAPI Spec — full endpoint reference
- API Overview / Auth — base URLs, authentication
- Mailgun Dashboard
- Mailgun LLMs.txt — full docs index for AI agents
- Node.js SDK
- Java SDK
- Python SDK
- PHP SDK
- Ruby SDK
- Go SDK