mailslurp_client.CommonActionsControllerApi

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

MethodHTTP requestDescription
create_new_email_addressPOST /createInboxCreate new random inbox
create_new_email_address1POST /newEmailAddressCreate new random inbox
empty_inboxDELETE /emptyInboxDelete all emails in an inbox
send_email_simplePOST /sendEmailSend an email

create_new_email_address

Inbox create_new_email_address(allow_team_access=allow_team_access, expires_at=expires_at, expires_in=expires_in, use_domain_pool=use_domain_pool)

Create new random inbox

Returns an Inbox with an id and an emailAddress

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.CommonActionsControllerApi(api_client)
    allow_team_access = True # bool | allowTeamAccess (optional)
expires_at = '2013-10-20T19:20:30+01:00' # datetime | expiresAt (optional)
expires_in = 56 # int | expiresIn (optional)
use_domain_pool = True # bool | useDomainPool (optional)

    try:
        # Create new random inbox
        api_response = api_instance.create_new_email_address(allow_team_access=allow_team_access, expires_at=expires_at, expires_in=expires_in, use_domain_pool=use_domain_pool)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling CommonActionsControllerApi->create_new_email_address: %sn" % e)

Parameters

NameTypeDescriptionNotes
allow_team_accessboolallowTeamAccess[optional]
expires_atdatetimeexpiresAt[optional]
expires_inintexpiresIn[optional]
use_domain_poolbooluseDomainPool[optional]

Return type

Inbox

Authorization

API_KEY

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
201Created-
401Unauthorized-
403Forbidden-
404Not Found-

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

create_new_email_address1

Inbox create_new_email_address1(allow_team_access=allow_team_access, expires_at=expires_at, expires_in=expires_in, use_domain_pool=use_domain_pool)

Create new random inbox

Returns an Inbox with an id and an emailAddress

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.CommonActionsControllerApi(api_client)
    allow_team_access = True # bool | allowTeamAccess (optional)
expires_at = '2013-10-20T19:20:30+01:00' # datetime | expiresAt (optional)
expires_in = 56 # int | expiresIn (optional)
use_domain_pool = True # bool | useDomainPool (optional)

    try:
        # Create new random inbox
        api_response = api_instance.create_new_email_address1(allow_team_access=allow_team_access, expires_at=expires_at, expires_in=expires_in, use_domain_pool=use_domain_pool)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling CommonActionsControllerApi->create_new_email_address1: %sn" % e)

Parameters

NameTypeDescriptionNotes
allow_team_accessboolallowTeamAccess[optional]
expires_atdatetimeexpiresAt[optional]
expires_inintexpiresIn[optional]
use_domain_poolbooluseDomainPool[optional]

Return type

Inbox

Authorization

API_KEY

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
201Created-
401Unauthorized-
403Forbidden-
404Not Found-

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

empty_inbox

empty_inbox(inbox_id)

Delete all emails in an inbox

Deletes all emails

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.CommonActionsControllerApi(api_client)
    inbox_id = 'inbox_id_example' # str | inboxId

    try:
        # Delete all emails in an inbox
        api_instance.empty_inbox(inbox_id)
    except ApiException as e:
        print("Exception when calling CommonActionsControllerApi->empty_inbox: %sn" % e)

Parameters

NameTypeDescriptionNotes
inbox_idstrinboxId

Return type

void (empty response body)

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status codeDescriptionResponse headers
204No Content-
401Unauthorized-
403Forbidden-

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

send_email_simple

send_email_simple(email_options)

Send an email

If no senderId or inboxId provided a random email address will be used to send from.

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.CommonActionsControllerApi(api_client)
    email_options = mailslurp_client.SimpleSendEmailOptions() # SimpleSendEmailOptions | emailOptions

    try:
        # Send an email
        api_instance.send_email_simple(email_options)
    except ApiException as e:
        print("Exception when calling CommonActionsControllerApi->send_email_simple: %sn" % e)

Parameters

NameTypeDescriptionNotes
email_optionsSimpleSendEmailOptionsemailOptions

Return type

void (empty response body)

Authorization

API_KEY

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
201Created-
401Unauthorized-
403Forbidden-
404Not Found-

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