Skip to content

MailSlurp::BounceControllerApi

Load the API package

use MailSlurp::Object::BounceControllerApi;

All URIs are relative to https://api.mailslurp.com

Method HTTP request Description
filter_bounced_recipient POST /bounce/filter-recipients Filter a list of email recipients and remove those who have bounced
get_bounced_email GET /bounce/emails/{id} Get a bounced email.
get_bounced_emails GET /bounce/emails Get paginated list of bounced emails.
get_bounced_recipient GET /bounce/recipients/{id} Get a bounced email.
get_bounced_recipients GET /bounce/recipients Get paginated list of bounced recipients.
get_complaints GET /bounce/complaints Get paginated list of complaints.

FilterBouncedRecipientsResult filter_bounced_recipient(filter_bounced_recipients_options => $filter_bounced_recipients_options)

Filter a list of email recipients and remove those who have bounced

Prevent email sending errors by remove recipients who have resulted in past email bounces or complaints

Example

use Data::Dumper;
use MailSlurp::BounceControllerApi;
my $api_instance = MailSlurp::BounceControllerApi->new(

    # Configure API key authorization: API_KEY
    api_key => {'x-api-key' => 'YOUR_API_KEY'},
    # uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    #api_key_prefix => {'x-api-key' => 'Bearer'},
);

my $filter_bounced_recipients_options = MailSlurp::Object::FilterBouncedRecipientsOptions->new(); # FilterBouncedRecipientsOptions | 

eval { 
    my $result = $api_instance->filter_bounced_recipient(filter_bounced_recipients_options => $filter_bounced_recipients_options);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling BounceControllerApi->filter_bounced_recipient: $@n";
}

Parameters

Name Type Description Notes
filter_bounced_recipients_options FilterBouncedRecipientsOptions

Return type

FilterBouncedRecipientsResult

Authorization

API_KEY

HTTP request headers

  • Content-Type: application/json
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to ]

BouncedEmailDto get_bounced_email(id => $id)

Get a bounced email.

Bounced emails are email you have sent that were rejected by a recipient

Example

use Data::Dumper;
use MailSlurp::BounceControllerApi;
my $api_instance = MailSlurp::BounceControllerApi->new(

    # Configure API key authorization: API_KEY
    api_key => {'x-api-key' => 'YOUR_API_KEY'},
    # uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    #api_key_prefix => {'x-api-key' => 'Bearer'},
);

my $id = null; # string | ID of the bounced email to fetch

eval { 
    my $result = $api_instance->get_bounced_email(id => $id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling BounceControllerApi->get_bounced_email: $@n";
}

Parameters

Name Type Description Notes
id string ID of the bounced email to fetch

Return type

BouncedEmailDto

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to ]

PageBouncedEmail get_bounced_emails(page => $page, size => $size, sort => $sort, since => $since, before => $before)

Get paginated list of bounced emails.

Bounced emails are email you have sent that were rejected by a recipient

Example

use Data::Dumper;
use MailSlurp::BounceControllerApi;
my $api_instance = MailSlurp::BounceControllerApi->new(

    # Configure API key authorization: API_KEY
    api_key => {'x-api-key' => 'YOUR_API_KEY'},
    # uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    #api_key_prefix => {'x-api-key' => 'Bearer'},
);

my $page = 0; # int | Optional page 
my $size = 20; # int | Optional page size 
my $sort = 'ASC'; # string | Optional createdAt sort direction ASC or DESC
my $since = DateTime->from_epoch(epoch => str2time('null')); # DateTime | Filter by created at after the given timestamp
my $before = DateTime->from_epoch(epoch => str2time('null')); # DateTime | Filter by created at before the given timestamp

eval { 
    my $result = $api_instance->get_bounced_emails(page => $page, size => $size, sort => $sort, since => $since, before => $before);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling BounceControllerApi->get_bounced_emails: $@n";
}

Parameters

Name Type Description Notes
page int Optional page [optional] [default to 0]
size int Optional page size [optional] [default to 20]
sort string Optional createdAt sort direction ASC or DESC [optional] [default to 'ASC']
since DateTime Filter by created at after the given timestamp [optional]
before DateTime Filter by created at before the given timestamp [optional]

Return type

PageBouncedEmail

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to ]

BouncedRecipientDto get_bounced_recipient(id => $id)

Get a bounced email.

Bounced emails are email you have sent that were rejected by a recipient

Example

use Data::Dumper;
use MailSlurp::BounceControllerApi;
my $api_instance = MailSlurp::BounceControllerApi->new(

    # Configure API key authorization: API_KEY
    api_key => {'x-api-key' => 'YOUR_API_KEY'},
    # uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    #api_key_prefix => {'x-api-key' => 'Bearer'},
);

my $id = null; # string | ID of the bounced recipient

eval { 
    my $result = $api_instance->get_bounced_recipient(id => $id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling BounceControllerApi->get_bounced_recipient: $@n";
}

Parameters

Name Type Description Notes
id string ID of the bounced recipient

Return type

BouncedRecipientDto

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to ]

PageBouncedRecipients get_bounced_recipients(page => $page, size => $size, sort => $sort, since => $since, before => $before)

Get paginated list of bounced recipients.

Bounced recipients are email addresses that you have sent emails to that did not accept the sent email. Once a recipient is bounced you cannot send emails to that address.

Example

use Data::Dumper;
use MailSlurp::BounceControllerApi;
my $api_instance = MailSlurp::BounceControllerApi->new(

    # Configure API key authorization: API_KEY
    api_key => {'x-api-key' => 'YOUR_API_KEY'},
    # uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    #api_key_prefix => {'x-api-key' => 'Bearer'},
);

my $page = 0; # int | Optional page  
my $size = 20; # int | Optional page size 
my $sort = 'ASC'; # string | Optional createdAt sort direction ASC or DESC
my $since = DateTime->from_epoch(epoch => str2time('null')); # DateTime | Filter by created at after the given timestamp
my $before = DateTime->from_epoch(epoch => str2time('null')); # DateTime | Filter by created at before the given timestamp

eval { 
    my $result = $api_instance->get_bounced_recipients(page => $page, size => $size, sort => $sort, since => $since, before => $before);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling BounceControllerApi->get_bounced_recipients: $@n";
}

Parameters

Name Type Description Notes
page int Optional page [optional] [default to 0]
size int Optional page size [optional] [default to 20]
sort string Optional createdAt sort direction ASC or DESC [optional] [default to 'ASC']
since DateTime Filter by created at after the given timestamp [optional]
before DateTime Filter by created at before the given timestamp [optional]

Return type

PageBouncedRecipients

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to ]

PageComplaint get_complaints(page => $page, size => $size, sort => $sort, since => $since, before => $before)

Get paginated list of complaints.

SMTP complaints made against your account

Example

use Data::Dumper;
use MailSlurp::BounceControllerApi;
my $api_instance = MailSlurp::BounceControllerApi->new(

    # Configure API key authorization: API_KEY
    api_key => {'x-api-key' => 'YOUR_API_KEY'},
    # uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    #api_key_prefix => {'x-api-key' => 'Bearer'},
);

my $page = 0; # int | Optional page  
my $size = 20; # int | Optional page size 
my $sort = 'ASC'; # string | Optional createdAt sort direction ASC or DESC
my $since = DateTime->from_epoch(epoch => str2time('null')); # DateTime | Filter by created at after the given timestamp
my $before = DateTime->from_epoch(epoch => str2time('null')); # DateTime | Filter by created at before the given timestamp

eval { 
    my $result = $api_instance->get_complaints(page => $page, size => $size, sort => $sort, since => $since, before => $before);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling BounceControllerApi->get_complaints: $@n";
}

Parameters

Name Type Description Notes
page int Optional page [optional] [default to 0]
size int Optional page size [optional] [default to 20]
sort string Optional createdAt sort direction ASC or DESC [optional] [default to 'ASC']
since DateTime Filter by created at after the given timestamp [optional]
before DateTime Filter by created at before the given timestamp [optional]

Return type

PageComplaint

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to ]