Skip to content

Add allowlist record

Request

Add an address or domain to the allowlist table

Security
basicAuth
Path
domain_namestringrequired

Domain to add the allowlist entry to

Bodyapplication/form-datarequired
addressstringrequired

Valid email address if you would like to allowlist email address (prior over 'domain' parameter)

domainstring

Valid domain name if you would like allowlist entire domain name

curl -i -X POST \
  -u '<username>:<password>' \
  'https://api.mailgun.net/v3/{domain_name}/whitelists' \
  -H 'Content-Type: application/form-data' \
  -d '{
    "address": "string",
    "domain": "string"
  }'

Responses

A 200 response

Bodyapplication/json
messagestringrequired

Response message

typestringrequired

Type of allowlist

valuestringrequired

Domain or address

Response
{ "message": "Address/Domain has been added to the allowlists table", "type": "domain", "value": "example.com" }