public interface MailgunSuppressionBouncesApi extends MailgunApi
Mailgun Suppression Bounces 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.
Bounce list stores events of delivery failures due to permanent recipient mailbox errors such as non-existent mailbox. Soft bounces (for example, mailbox is full) and other failures (for example, ESP rejects an email because it thinks it is spam) are not added to the list.
Subsequent delivery attempts to an address found in a bounce list are prevented to protect your sending reputation.
Mailgun can notify your application every time a message bounces via a ermanent_fail webhook.
| Modifier and Type | Method and Description |
|---|---|
SuppressionResponse |
addBounce(String domain,
BouncesRequest request)
Add a single bounce record to the bounce list.
|
ResponseWithMessage |
addBounces(String domain,
List<BouncesRequest> request)
Add multiple bounce records to the bounce list in a single API call.
|
feign.Response |
addSBounceFeignResponse(String domain,
BouncesRequest request)
Add a single bounce record to the bounce list.
|
feign.Response |
addSBounceFeignResponses(String domain,
List<BouncesRequest> request)
Add multiple bounce records to the bounce list in a single API call.
|
ResponseWithMessage |
deleteAllBounces(String domain)
Delete all bounced email addresses for a domain.
|
feign.Response |
deleteAllBouncesFeignResponse(String domain)
Delete all bounced email addresses for a domain.
|
ResponseWithMessage |
deleteBounce(String domain,
String address)
Delete a single bounce.
|
feign.Response |
deleteBounceFeignResponse(String domain,
String address)
Delete a single bounce.
|
BouncesItem |
getBounce(String domain,
String address)
Fetch a single bounce event by a given email address.
|
feign.Response |
getBounceFeignResponse(String domain,
String address)
Fetch a single bounce event by a given email address.
|
BouncesResponse |
getBounces(String domain)
Returns a list of bounces for a domain (limit to 100 entries).
|
BouncesResponse |
getBounces(String domain,
Integer limit)
Returns a list of bounces for a domain.
|
feign.Response |
getBouncesFeignResponse(String domain)
Returns a list of bounces for a domain (limit to 100 entries).
|
feign.Response |
getBouncesFeignResponse(String domain,
Integer limit)
Returns a list of bounces for a domain.
|
ResponseWithMessage |
importBounceList(String domain,
BouncesListImportRequest request)
Import a list of bounces.
|
feign.Response |
importBounceListFeignResponses(String domain,
BouncesListImportRequest request)
Import a list of bounces.
|
getApiVersionBouncesResponse getBounces(String domain)
Returns a list of bounces for a domain (limit to 100 entries).
domain - Name of the domainBouncesResponsefeign.Response getBouncesFeignResponse(String domain)
Returns a list of bounces for a domain (limit to 100 entries).
domain - Name of the domainResponseBouncesResponse getBounces(String domain, Integer limit)
Returns a list of bounces for a domain.
domain - Name of the domainlimit - Number of entries to return, max: 10000.BouncesResponsefeign.Response getBouncesFeignResponse(String domain, Integer limit)
Returns a list of bounces for a domain.
domain - Name of the domainlimit - Number of entries to return, max: 10000.ResponseBouncesItem getBounce(String domain, String address)
Fetch a single bounce event by a given email address.
Useful to check if a given email address has bounced before.
domain - Name of the domainaddress - An email addressBouncesItemfeign.Response getBounceFeignResponse(String domain, String address)
Fetch a single bounce event by a given email address.
Useful to check if a given email address has bounced before.
domain - Name of the domainaddress - An email addressResponseSuppressionResponse addBounce(String domain, BouncesRequest request)
Add a single bounce record to the bounce list.
Updates the existing record if the address is already there.
domain - Name of the domainrequest - BouncesRequestSuppressionResponsefeign.Response addSBounceFeignResponse(String domain, BouncesRequest request)
Add a single bounce record to the bounce list.
Updates the existing record if the address is already there.
domain - Name of the domainrequest - BouncesRequestResponseResponseWithMessage addBounces(String domain, List<BouncesRequest> request)
Add multiple bounce records to the bounce list in a single API call.
domain - Name of the domainrequest - list of BouncesRequestResponseWithMessagefeign.Response addSBounceFeignResponses(String domain, List<BouncesRequest> request)
Add multiple bounce records to the bounce list in a single API call.
domain - Name of the domainrequest - list of BouncesRequestResponseResponseWithMessage importBounceList(String domain, BouncesListImportRequest request)
Import a list of bounces.
CSV file must be 25MB or under and must contain the following column headers:
addressValid email addresscodeError code (optional, default: 550)errorError description (optional, default: empty string)created_atTimestamp of a bounce event in RFC2822 format (optional, default: current time)
domain - Name of the domainrequest - BouncesListImportRequestResponseWithMessagefeign.Response importBounceListFeignResponses(String domain, BouncesListImportRequest request)
Import a list of bounces.
CSV file must be 25MB or under and must contain the following column headers:
addressValid email addresscodeError code (optional, default: 550)errorError description (optional, default: empty string)created_atTimestamp of a bounce event in RFC2822 format (optional, default: current time)
domain - Name of the domainrequest - BouncesListImportRequestResponseResponseWithMessage deleteBounce(String domain, String address)
Delete a single bounce. Clears a given bounce event.
The delivery to the deleted email address resumes until it bounces again.
domain - Name of the domainaddress - An email addressResponseWithMessagefeign.Response deleteBounceFeignResponse(String domain, String address)
Delete a single bounce. Clears a given bounce event.
The delivery to the deleted email address resumes until it bounces again.
domain - Name of the domainaddress - An email addressResponseResponseWithMessage deleteAllBounces(String domain)
Delete all bounced email addresses for a domain. Delivery to the deleted email addresses will no longer be suppressed.
domain - Name of the domainResponseWithMessagefeign.Response deleteAllBouncesFeignResponse(String domain)
Delete all bounced email addresses for a domain. Delivery to the deleted email addresses will no longer be suppressed.
domain - Name of the domainResponseCopyright © 2022. All rights reserved.