Skip to content

mailslurp_client.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.

FilterBouncedRecipientsResult filter_bounced_recipient(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

  • Api Key Authentication (API_KEY):
from __future__ import print_function
import time
import mailslurp_client
from mailslurp_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.mailslurp.com
# See configuration.py for a list of all supported configuration parameters.
configuration = mailslurp_client.Configuration(
    host = "https://api.mailslurp.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: API_KEY
configuration = mailslurp_client.Configuration(
    host = "https://api.mailslurp.com",
    api_key = {
        'x-api-key': 'YOUR_API_KEY'
    }
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x-api-key'] = 'Bearer'

# Enter a context with an instance of the API client
with mailslurp_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = mailslurp_client.BounceControllerApi(api_client)
    filter_bounced_recipients_options = mailslurp_client.FilterBouncedRecipientsOptions() # FilterBouncedRecipientsOptions | 

    try:
        # Filter a list of email recipients and remove those who have bounced
        api_response = api_instance.filter_bounced_recipient(filter_bounced_recipients_options)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling BounceControllerApi->filter_bounced_recipient: %sn" % e)

Parameters

Name Type Description Notes
filter_bounced_recipients_options FilterBouncedRecipientsOptions

Return type

FilterBouncedRecipientsResult

Authorization

API_KEY

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 OK -

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

BouncedEmailDto get_bounced_email(id)

Get a bounced email.

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

Example

  • Api Key Authentication (API_KEY):
from __future__ import print_function
import time
import mailslurp_client
from mailslurp_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.mailslurp.com
# See configuration.py for a list of all supported configuration parameters.
configuration = mailslurp_client.Configuration(
    host = "https://api.mailslurp.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: API_KEY
configuration = mailslurp_client.Configuration(
    host = "https://api.mailslurp.com",
    api_key = {
        'x-api-key': 'YOUR_API_KEY'
    }
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x-api-key'] = 'Bearer'

# Enter a context with an instance of the API client
with mailslurp_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = mailslurp_client.BounceControllerApi(api_client)
    id = 'id_example' # str | ID of the bounced email to fetch

    try:
        # Get a bounced email.
        api_response = api_instance.get_bounced_email(id)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling BounceControllerApi->get_bounced_email: %sn" % e)

Parameters

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

Return type

BouncedEmailDto

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status code Description Response headers
200 OK -

[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

  • Api Key Authentication (API_KEY):
from __future__ import print_function
import time
import mailslurp_client
from mailslurp_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.mailslurp.com
# See configuration.py for a list of all supported configuration parameters.
configuration = mailslurp_client.Configuration(
    host = "https://api.mailslurp.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: API_KEY
configuration = mailslurp_client.Configuration(
    host = "https://api.mailslurp.com",
    api_key = {
        'x-api-key': 'YOUR_API_KEY'
    }
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x-api-key'] = 'Bearer'

# Enter a context with an instance of the API client
with mailslurp_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = mailslurp_client.BounceControllerApi(api_client)
    page = 0 # int | Optional page  (optional) (default to 0)
size = 20 # int | Optional page size  (optional) (default to 20)
sort = 'ASC' # str | Optional createdAt sort direction ASC or DESC (optional) (default to 'ASC')
since = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at after the given timestamp (optional)
before = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at before the given timestamp (optional)

    try:
        # Get paginated list of bounced emails.
        api_response = api_instance.get_bounced_emails(page=page, size=size, sort=sort, since=since, before=before)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling BounceControllerApi->get_bounced_emails: %sn" % e)

Parameters

Name Type Description Notes
page int Optional page [optional] [default to 0]
size int Optional page size [optional] [default to 20]
sort str 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: /

HTTP response details

Status code Description Response headers
200 OK -

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

BouncedRecipientDto get_bounced_recipient(id)

Get a bounced email.

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

Example

  • Api Key Authentication (API_KEY):
from __future__ import print_function
import time
import mailslurp_client
from mailslurp_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.mailslurp.com
# See configuration.py for a list of all supported configuration parameters.
configuration = mailslurp_client.Configuration(
    host = "https://api.mailslurp.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: API_KEY
configuration = mailslurp_client.Configuration(
    host = "https://api.mailslurp.com",
    api_key = {
        'x-api-key': 'YOUR_API_KEY'
    }
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x-api-key'] = 'Bearer'

# Enter a context with an instance of the API client
with mailslurp_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = mailslurp_client.BounceControllerApi(api_client)
    id = 'id_example' # str | ID of the bounced recipient

    try:
        # Get a bounced email.
        api_response = api_instance.get_bounced_recipient(id)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling BounceControllerApi->get_bounced_recipient: %sn" % e)

Parameters

Name Type Description Notes
id str ID of the bounced recipient

Return type

BouncedRecipientDto

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status code Description Response headers
200 OK -

[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

  • Api Key Authentication (API_KEY):
from __future__ import print_function
import time
import mailslurp_client
from mailslurp_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.mailslurp.com
# See configuration.py for a list of all supported configuration parameters.
configuration = mailslurp_client.Configuration(
    host = "https://api.mailslurp.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: API_KEY
configuration = mailslurp_client.Configuration(
    host = "https://api.mailslurp.com",
    api_key = {
        'x-api-key': 'YOUR_API_KEY'
    }
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x-api-key'] = 'Bearer'

# Enter a context with an instance of the API client
with mailslurp_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = mailslurp_client.BounceControllerApi(api_client)
    page = 0 # int | Optional page   (optional) (default to 0)
size = 20 # int | Optional page size  (optional) (default to 20)
sort = 'ASC' # str | Optional createdAt sort direction ASC or DESC (optional) (default to 'ASC')
since = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at after the given timestamp (optional)
before = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at before the given timestamp (optional)

    try:
        # Get paginated list of bounced recipients.
        api_response = api_instance.get_bounced_recipients(page=page, size=size, sort=sort, since=since, before=before)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling BounceControllerApi->get_bounced_recipients: %sn" % e)

Parameters

Name Type Description Notes
page int Optional page [optional] [default to 0]
size int Optional page size [optional] [default to 20]
sort str 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: /

HTTP response details

Status code Description Response headers
200 OK -

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