public interface MailgunSuppressionWhitelistsApi extends MailgunApi
Mailgun Suppression Whitelists Api
Mailgun keeps three lists of addresses it blocks the delivery to: bounces, unsubscribes and complaints. These lists are populated automatically as Mailgun detects undeliverable addresses you try to send to and as recipients unsubscribe from your mailings or mark your emails as a spam (for ESPs that provide FBL). You can also add/remove addresses from any of these lists using the API.
It’s important to note that these suppression lists are unique to a sending domain and are not an account level (global) suppression list. If you want to add/remove the same address(es) from multiple domains, you’ll need to do so for each domain.
The whitelist API provides the ability to whitelist specific addresses from being added to bounce list. You can whitelist by domain name (i.e example.com) or by specific address (i.e. alice@example.com). Mailgun doesn't add an address to the bounce list if the address is whitelisted. This API is very useful if you test against your private services and don’t want to constantly clean up bounce lists.
| Modifier and Type | Method and Description |
|---|---|
ResponseWithMessage |
addSingleWhitelistRecord(String domain,
WhitelistsRequest request)
Add an address or domain to the whitelist table.
|
feign.Response |
addSingleWhitelistRecordFeignResponse(String domain,
WhitelistsRequest request)
Add an address or domain to the whitelist table.
|
WhitelistsItemResponse |
getAllWhitelists(String domain)
Returns a list of whitelists for a domain (limit to 100 entries).
|
WhitelistsItemResponse |
getAllWhitelists(String domain,
Integer limit)
Returns a list of whitelists for a domain.
|
feign.Response |
getAllWhitelistsFeignResponse(String domain)
Returns a list of whitelists for a domain (limit to 100 entries).
|
feign.Response |
getAllWhitelistsFeignResponse(String domain,
Integer limit)
Returns a list of whitelists for a domain.
|
WhitelistsItem |
getSingleWhitelistRecord(String domain,
String addressOrDomain)
Fetch a single whitelist record.
|
feign.Response |
getSingleWhitelistRecordFeignResponse(String domain,
String addressOrDomain)
Fetch a single whitelist record.
|
ResponseWithMessage |
importWhitelistRecords(String domain,
WhitelistsListImportRequest request)
Import a CSV file containing a list of addresses and/or domains to add to the whitelist.
|
feign.Response |
importWhitelistRecordsFeignResponse(String domain,
WhitelistsListImportRequest request)
Import a CSV file containing a list of addresses and/or domains to add to the whitelist.
|
WhitelistsRemoveRecordResponse |
removeRecordFromWhitelists(String domain,
String addressOrDomain)
Delete a single record from whitelist table.
|
feign.Response |
removeRecordFromWhitelistsFeignResponse(String domain,
String addressOrDomain)
Delete a single record from whitelist table.
|
getApiVersionWhitelistsItemResponse getAllWhitelists(String domain)
Returns a list of whitelists for a domain (limit to 100 entries).
domain - Name of the domainWhitelistsItemResponsefeign.Response getAllWhitelistsFeignResponse(String domain)
Returns a list of whitelists for a domain (limit to 100 entries).
domain - Name of the domainResponseWhitelistsItemResponse getAllWhitelists(String domain, Integer limit)
Returns a list of whitelists for a domain.
domain - Name of the domainlimit - Number of entries to return, max: 10000.WhitelistsItemResponsefeign.Response getAllWhitelistsFeignResponse(String domain, Integer limit)
Returns a list of whitelists for a domain.
domain - Name of the domainlimit - Number of entries to return, max: 10000.ResponseWhitelistsItem getSingleWhitelistRecord(String domain, String addressOrDomain)
Fetch a single whitelist record. Can be used to check if a given address or domain is present in the whitelist table.
domain - Name of the domainaddressOrDomain - address or domainWhitelistsItemfeign.Response getSingleWhitelistRecordFeignResponse(String domain, String addressOrDomain)
Fetch a single whitelist record. Can be used to check if a given address or domain is present in the whitelist table.
domain - Name of the domainaddressOrDomain - address or domainResponseResponseWithMessage addSingleWhitelistRecord(String domain, WhitelistsRequest request)
Add an address or domain to the whitelist table.
Note: The single request accepts either one address or domain parameter.
domain - Name of the domainrequest - WhitelistsRequestResponseWithMessagefeign.Response addSingleWhitelistRecordFeignResponse(String domain, WhitelistsRequest request)
Add an address or domain to the whitelist table.
Note: The single request accepts either one address or domain parameter.
domain - Name of the domainrequest - WhitelistsRequestResponseResponseWithMessage importWhitelistRecords(String domain, WhitelistsListImportRequest request)
Import a CSV file containing a list of addresses and/or domains to add to the whitelist.
CSV file must be 25MB or under and must contain the following column headers:
addressValid email address if you would like to whitelist email addressdomainValid domain name if you would like whitelist entire domain name
domain - Name of the domainrequest - WhitelistsListImportRequestResponseWithMessagefeign.Response importWhitelistRecordsFeignResponse(String domain, WhitelistsListImportRequest request)
Import a CSV file containing a list of addresses and/or domains to add to the whitelist.
CSV file must be 25MB or under and must contain the following column headers:
addressValid email address if you would like to whitelist email addressdomainValid domain name if you would like whitelist entire domain name
domain - Name of the domainrequest - WhitelistsListImportRequestResponseWhitelistsRemoveRecordResponse removeRecordFromWhitelists(String domain, String addressOrDomain)
Delete a single record from whitelist table.
domain - Name of the domainaddressOrDomain - address or domainWhitelistsRemoveRecordResponsefeign.Response removeRecordFromWhitelistsFeignResponse(String domain, String addressOrDomain)
Delete a single record from whitelist table.
domain - Name of the domainaddressOrDomain - address or domainWhitelistsRemoveRecordResponseCopyright © 2022. All rights reserved.