Skip to content

Import allowlist

Request

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.

Security
basicAuth
Path
domain_namestringrequired

Domain to update allowlist for

Headers
Content-Typestringrequired

Content-Type must be multipart/form-data

Bodymultipart/form-datarequired
filestringrequired

CSV file

curl -i -X POST \
  -u '<username>:<password>' \
  'https://api.mailgun.net/v3/{domain_name}/whitelists/import' \
  -H 'Content-Type: multipart/form-data' \
  -F file=string

Responses

A 202 response

Bodyapplication/json
messagestringrequired

Response message

Response
{ "message": "file uploaded successfully for processing. standby..." }