Skip to content

Validations Service (1.0.0)

Mailgun Email Validation service with RESTful JSON HTTP API for performing email validation. This service also manages list and CSV ingestion used in bulk validation processing.

Languages
Servers
US Mailgun

https://api.mailgun.net/

EU Mailgun

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

Validations

This API provides functionality to validate single addresses, and managing thresholds.

Operations

Bulk Validations

This API provides functionality to upload and manage bulk validation lists and previews.

Operations

Create Bulk Job

Request

Validate a full list of addresses.

Security
basicAuth
Path
list_idstringrequired

the name for the bulk job must be unique.

Bodycsv filerequired
objectrequired

a CSV file, with header row, of emails to validate; the "email" column must be present

curl -i -X POST \
  -u <username>:<password> \
  'https://api.mailgun.net/v4/address/validate/bulk/{list_id}' \
  -H 'Content-Type: csv file' \
  -d '[object Object]'

Responses

A 202 response

Bodyapplication/json
idstringrequired
messagestringrequired
Response
application/json
{ "id": "example_list_id", "message": "The validation job was submitted." }

Get Job V4

Request

Gets a selected job by list ID.

Security
basicAuth
Path
list_idstringrequired

The list ID being verified

Headers
X-Mailgun-Account-Idstringrequired

Mailgun Account ID

curl -i -X GET \
  -u <username>:<password> \
  'https://api.mailgun.net/v4/address/validate/bulk/{list_id}' \
  -H 'X-Mailgun-Account-Id: string'

Responses

A 200 response

Bodyapplication/json
is_previewboolean
created_atinteger(int32)required
download_urlobject
idstringrequired
quantityinteger(int32)required
records_processedinteger(int32)required
statusstring
summaryobject
reasonstring
Response
application/json
{ "quantity": 10000, "id": "some-job-name", "summary": { "risk": {}, "result": {} }, "download_url": { "csv": "https://some-aws-or-gcp-host/file.csv.zip", "json": "https://some-aws-or-gcp-host/file.json.zip" }, "status": "uploaded", "created_at": 160000000 }

Delete Job V4

Request

Cancels a selected job by list ID.

Security
basicAuth
Path
list_idstringrequired

The list ID being verified

Headers
X-Mailgun-Account-Idstringrequired

Mailgun Account ID

curl -i -X DELETE \
  -u <username>:<password> \
  'https://api.mailgun.net/v4/address/validate/bulk/{list_id}' \
  -H 'X-Mailgun-Account-Id: string'

Responses

A 200 response

Bodyapplication/json
property name*objectadditional property
Response
application/json
{ "message": "Validation job canceled." }

List Health Preview

Operations