public interface MailgunSuppressionUnsubscribeApi extends MailgunApi
Mailgun Suppression Unsubscribe 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.
Unsubscribe list stores email addresses of recipients who unsubscribed from your mailings by clicking a Mailgun generated unsubscribe link.
Mailgun allows you to quickly add “Unsubscribe me” feature to your outgoing emails without any programming on your end. You can enable this in your Control Panel under your domain settings
Mailgun can notify your application every time a user unsubscribes via an unsubscribed webhook
.| Modifier and Type | Method and Description |
|---|---|
ResponseWithMessage |
addAddressesToUnsubscribeTable(String domain,
List<UnsubscribeItem> request)
Add multiple unsubscribe records to the unsubscribe list in a single API call(up to 1000 unsubscribe records).
|
feign.Response |
addAddressesToUnsubscribeTableFeignResponse(String domain,
List<UnsubscribeItem> request)
Add multiple unsubscribe records to the unsubscribe list in a single API call(up to 1000 unsubscribe records).
|
SuppressionResponse |
addAddressToUnsubscribeTable(String domain,
UnsubscribeSingleItemRequest request)
Add an address to the unsubscribe table.
|
feign.Response |
addAddressToUnsubscribeTableFeignResponse(String domain,
UnsubscribeSingleItemRequest request)
Add an address to the unsubscribe table.
|
UnsubscribeItemResponse |
getAllUnsubscribe(String domain)
Returns a list of unsubscribes for a domain (limit to 100 entries).
|
UnsubscribeItemResponse |
getAllUnsubscribe(String domain,
Integer limit)
Returns a list of unsubscribes for a domain.
|
feign.Response |
getAllUnsubscribeFeignResponse(String domain)
Returns a list of unsubscribes for a domain (limit to 100 entries).
|
feign.Response |
getAllUnsubscribeFeignResponse(String domain,
Integer limit)
Returns a list of unsubscribes for a domain.
|
UnsubscribeItem |
getSingleUnsubscribe(String domain,
String address)
Fetch a single unsubscribe record.
|
feign.Response |
getSingleUnsubscribeFeignResponse(String domain,
String address)
Fetch a single unsubscribe record.
|
ResponseWithMessage |
importAddressesToUnsubscribeTable(String domain,
UnsubscribesListImportRequest request)
Import a CSV file containing a list of addresses to add to the unsubscribe list.
|
feign.Response |
importAddressesToUnsubscribeTableFeignResponse(String domain,
UnsubscribesListImportRequest request)
Import a CSV file containing a list of addresses to add to the unsubscribe list.
|
SuppressionResponse |
removeAddressFromUnsubscribeList(String domain,
String address)
Completely remove an address from the unsubscribes list.
|
feign.Response |
removeAddressFromUnsubscribeListFeignResponse(String domain,
String address)
Completely remove an address from the unsubscribes list.
|
SuppressionResponse |
removeAddressFromUnsubscribeTag(String domain,
String address,
String tag)
Remove an address from the unsubscribes list.
|
feign.Response |
removeAddressFromUnsubscribeTagFeignResponse(String domain,
String address,
String tag)
Remove an address from the unsubscribes list.
|
getApiVersionUnsubscribeItemResponse getAllUnsubscribe(String domain)
Returns a list of unsubscribes for a domain (limit to 100 entries).
Note: Via this API method unsubscribes are returned in the alphabetical order.
If you wish to poll for the recently occurred unsubscribes, please consider using the MailgunEventsApi.
domain - Name of the domainUnsubscribeItemResponsefeign.Response getAllUnsubscribeFeignResponse(String domain)
Returns a list of unsubscribes for a domain (limit to 100 entries).
Note: Via this API method unsubscribes are returned in the alphabetical order.
If you wish to poll for the recently occurred unsubscribes, please consider using the MailgunEventsApi.
domain - Name of the domainResponseUnsubscribeItemResponse getAllUnsubscribe(String domain, Integer limit)
Returns a list of unsubscribes for a domain.
Note: Via this API method unsubscribes are returned in the alphabetical order.
If you wish to poll for the recently occurred unsubscribes, please consider using the MailgunEventsApi.
domain - Name of the domainlimit - Number of entries to return, max: 10000.UnsubscribeItemResponsefeign.Response getAllUnsubscribeFeignResponse(String domain, Integer limit)
Returns a list of unsubscribes for a domain.
Note: Via this API method unsubscribes are returned in the alphabetical order.
If you wish to poll for the recently occurred unsubscribes, please consider using the MailgunEventsApi.
domain - Name of the domainlimit - Number of entries to return, max: 10000.ResponseUnsubscribeItem getSingleUnsubscribe(String domain, String address)
Fetch a single unsubscribe record. Can be used to check if a given address is present in the list of unsubscribed users.
domain - Name of the domainaddress - An email addressUnsubscribeItemfeign.Response getSingleUnsubscribeFeignResponse(String domain, String address)
Fetch a single unsubscribe record. Can be used to check if a given address is present in the list of unsubscribed users.
domain - Name of the domainaddress - An email addressResponseSuppressionResponse addAddressToUnsubscribeTable(String domain, UnsubscribeSingleItemRequest request)
Add an address to the unsubscribe table.
domain - Name of the domainrequest - UnsubscribeSingleItemRequestSuppressionResponsefeign.Response addAddressToUnsubscribeTableFeignResponse(String domain, UnsubscribeSingleItemRequest request)
Add an address to the unsubscribe table.
domain - Name of the domainrequest - UnsubscribeSingleItemRequestResponseResponseWithMessage addAddressesToUnsubscribeTable(String domain, List<UnsubscribeItem> request)
Add multiple unsubscribe records to the unsubscribe list in a single API call(up to 1000 unsubscribe records).
domain - Name of the domainrequest - list of UnsubscribeItemResponseWithMessagefeign.Response addAddressesToUnsubscribeTableFeignResponse(String domain, List<UnsubscribeItem> request)
Add multiple unsubscribe records to the unsubscribe list in a single API call(up to 1000 unsubscribe records).
domain - Name of the domainrequest - list of UnsubscribeItemResponseResponseWithMessage importAddressesToUnsubscribeTable(String domain, UnsubscribesListImportRequest request)
Import a CSV file containing a list of addresses to add to the unsubscribe list.
CSV file must be 25MB or under and must contain the following column headers:
addressValid email addresstagsTag to unsubscribe from, use * to unsubscribe an address from all domain’s correspondence (optional, default: *)created_atTimestamp of a bounce event in RFC2822 format (optional, default: current time)
domain - Name of the domainrequest - list of UnsubscribesListImportRequestResponseWithMessagefeign.Response importAddressesToUnsubscribeTableFeignResponse(String domain, UnsubscribesListImportRequest request)
Import a CSV file containing a list of addresses to add to the unsubscribe list.
CSV file must be 25MB or under and must contain the following column headers:
addressValid email addresstagsTag to unsubscribe from, use * to unsubscribe an address from all domain’s correspondence (optional, default: *)created_atTimestamp of a bounce event in RFC2822 format (optional, default: current time)
domain - Name of the domainrequest - list of UnsubscribesListImportRequestResponseSuppressionResponse removeAddressFromUnsubscribeTag(String domain, String address, String tag)
Remove an address from the unsubscribes list.
domain - Name of the domainaddress - An email addresstag - Specific tag to remove (optional)SuppressionResponsefeign.Response removeAddressFromUnsubscribeTagFeignResponse(String domain, String address, String tag)
Remove an address from the unsubscribes list.
domain - Name of the domainaddress - An email addresstag - Specific tag to removeResponseSuppressionResponse removeAddressFromUnsubscribeList(String domain, String address)
Completely remove an address from the unsubscribes list.
domain - Name of the domainaddress - An email addressSuppressionResponseCopyright © 2022. All rights reserved.