mailslurp_client.AliasControllerApi
All URIs are relative to https://python.api.mailslurp.com
Method | HTTP request | Description |
---|---|---|
create_alias | POST /aliases | Create an email alias. Must be verified by clicking link inside verification email that will be sent to the address. Once verified the alias will be active. |
delete_alias | DELETE /aliases/{aliasId} | Delete an email alias |
get_alias | GET /aliases/{aliasId} | Get an email alias |
get_alias_emails | GET /aliases/{aliasId}/emails | Get emails for an alias |
get_alias_threads | GET /aliases/{aliasId}/threads | Get threads created for an alias |
get_aliases | GET /aliases | Get all email aliases you have created |
reply_to_alias_email | PUT /aliases/{aliasId}/emails/{emailId} | Reply to an email |
send_alias_email | POST /aliases/{aliasId}/emails | Send an email from an alias inbox |
update_alias | PUT /aliases/{aliasId} | Update an email alias |
AliasDto create_alias(create_alias_options)
Create an email alias. Must be verified by clicking link inside verification email that will be sent to the address. Once verified the alias will be active.
Email aliases use a MailSlurp randomly generated email address (or a custom domain inbox that you provide) to mask or proxy a real email address. Emails sent to the alias address will be forwarded to the hidden email address it was created for. If you want to send a reply use the threadId attached
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://python.api.mailslurp.com
# See configuration.py for a list of all supported configuration parameters.
configuration = mailslurp_client.Configuration(
host = "https://python.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://python.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.AliasControllerApi(api_client)
create_alias_options = mailslurp_client.CreateAliasOptions() # CreateAliasOptions |
try:
# Create an email alias. Must be verified by clicking link inside verification email that will be sent to the address. Once verified the alias will be active.
api_response = api_instance.create_alias(create_alias_options)
pprint(api_response)
except ApiException as e:
print("Exception when calling AliasControllerApi->create_alias: %sn" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
create_alias_options | CreateAliasOptions |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: /
HTTP response details
Status code | Description | Response headers |
---|---|---|
201 | Created | - |
[Back to top] [Back to API list] [Back to Model list] [Back to ]
delete_alias(alias_id)
Delete an email alias
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://python.api.mailslurp.com
# See configuration.py for a list of all supported configuration parameters.
configuration = mailslurp_client.Configuration(
host = "https://python.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://python.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.AliasControllerApi(api_client)
alias_id = 'alias_id_example' # str |
try:
# Delete an email alias
api_instance.delete_alias(alias_id)
except ApiException as e:
print("Exception when calling AliasControllerApi->delete_alias: %sn" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
alias_id | str |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
HTTP response details
Status code | Description | Response headers |
---|---|---|
204 | No Content | - |
[Back to top] [Back to API list] [Back to Model list] [Back to ]
AliasDto get_alias(alias_id)
Get an email alias
Get an email alias by ID
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://python.api.mailslurp.com
# See configuration.py for a list of all supported configuration parameters.
configuration = mailslurp_client.Configuration(
host = "https://python.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://python.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.AliasControllerApi(api_client)
alias_id = 'alias_id_example' # str |
try:
# Get an email alias
api_response = api_instance.get_alias(alias_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling AliasControllerApi->get_alias: %sn" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
alias_id | str |
Return type
Authorization
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 ]
PageEmailProjection get_alias_emails(alias_id, page=page, size=size, sort=sort, since=since, before=before)
Get emails for an alias
Get paginated emails for an alias by ID
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://python.api.mailslurp.com
# See configuration.py for a list of all supported configuration parameters.
configuration = mailslurp_client.Configuration(
host = "https://python.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://python.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.AliasControllerApi(api_client)
alias_id = 'alias_id_example' # str |
page = 0 # int | Optional page alias email list pagination (optional) (default to 0)
size = 20 # int | Optional page size alias email list pagination (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 | Optional filter by sent after given date time (optional)
before = '2013-10-20T19:20:30+01:00' # datetime | Optional filter by sent before given date time (optional)
try:
# Get emails for an alias
api_response = api_instance.get_alias_emails(alias_id, page=page, size=size, sort=sort, since=since, before=before)
pprint(api_response)
except ApiException as e:
print("Exception when calling AliasControllerApi->get_alias_emails: %sn" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
alias_id | str | ||
page | int | Optional page alias email list pagination | [optional] [default to 0] |
size | int | Optional page size alias email list pagination | [optional] [default to 20] |
sort | str | Optional createdAt sort direction ASC or DESC | [optional] [default to 'ASC'] |
since | datetime | Optional filter by sent after given date time | [optional] |
before | datetime | Optional filter by sent before given date time | [optional] |
Return type
Authorization
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 ]
PageThreadProjection get_alias_threads(alias_id, page=page, size=size, sort=sort, since=since, before=before)
Get threads created for an alias
Returns threads created for an email alias in paginated form
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://python.api.mailslurp.com
# See configuration.py for a list of all supported configuration parameters.
configuration = mailslurp_client.Configuration(
host = "https://python.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://python.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.AliasControllerApi(api_client)
alias_id = 'alias_id_example' # str |
page = 0 # int | Optional page in thread list pagination (optional) (default to 0)
size = 20 # int | Optional page size in thread list pagination (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 | Optional filter by sent after given date time (optional)
before = '2013-10-20T19:20:30+01:00' # datetime | Optional filter by sent before given date time (optional)
try:
# Get threads created for an alias
api_response = api_instance.get_alias_threads(alias_id, page=page, size=size, sort=sort, since=since, before=before)
pprint(api_response)
except ApiException as e:
print("Exception when calling AliasControllerApi->get_alias_threads: %sn" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
alias_id | str | ||
page | int | Optional page in thread list pagination | [optional] [default to 0] |
size | int | Optional page size in thread list pagination | [optional] [default to 20] |
sort | str | Optional createdAt sort direction ASC or DESC | [optional] [default to 'ASC'] |
since | datetime | Optional filter by sent after given date time | [optional] |
before | datetime | Optional filter by sent before given date time | [optional] |
Return type
Authorization
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 ]
PageAlias get_aliases(page=page, size=size, sort=sort, since=since, before=before)
Get all email aliases you have created
Get all email aliases in paginated form
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://python.api.mailslurp.com
# See configuration.py for a list of all supported configuration parameters.
configuration = mailslurp_client.Configuration(
host = "https://python.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://python.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.AliasControllerApi(api_client)
page = 0 # int | Optional page in alias list pagination (optional) (default to 0)
size = 20 # int | Optional page size in alias list pagination (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 all email aliases you have created
api_response = api_instance.get_aliases(page=page, size=size, sort=sort, since=since, before=before)
pprint(api_response)
except ApiException as e:
print("Exception when calling AliasControllerApi->get_aliases: %sn" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
page | int | Optional page in alias list pagination | [optional] [default to 0] |
size | int | Optional page size in alias list pagination | [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
Authorization
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 ]
SentEmailDto reply_to_alias_email(alias_id, email_id, reply_to_alias_email_options)
Reply to an email
Send the reply to the email sender or reply-to and include same subject cc bcc etc. Reply to an email and the contents will be sent with the existing subject to the emails to
, cc
, and bcc
.
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://python.api.mailslurp.com
# See configuration.py for a list of all supported configuration parameters.
configuration = mailslurp_client.Configuration(
host = "https://python.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://python.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.AliasControllerApi(api_client)
alias_id = 'alias_id_example' # str | ID of the alias that email belongs to
email_id = 'email_id_example' # str | ID of the email that should be replied to
reply_to_alias_email_options = mailslurp_client.ReplyToAliasEmailOptions() # ReplyToAliasEmailOptions |
try:
# Reply to an email
api_response = api_instance.reply_to_alias_email(alias_id, email_id, reply_to_alias_email_options)
pprint(api_response)
except ApiException as e:
print("Exception when calling AliasControllerApi->reply_to_alias_email: %sn" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
alias_id | str | ID of the alias that email belongs to | |
email_id | str | ID of the email that should be replied to | |
reply_to_alias_email_options | ReplyToAliasEmailOptions |
Return type
Authorization
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 ]
SentEmailDto send_alias_email(alias_id, send_email_options)
Send an email from an alias inbox
Send an email from an alias. Replies to the email will be forwarded to the alias masked email 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://python.api.mailslurp.com
# See configuration.py for a list of all supported configuration parameters.
configuration = mailslurp_client.Configuration(
host = "https://python.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://python.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.AliasControllerApi(api_client)
alias_id = 'alias_id_example' # str |
send_email_options = mailslurp_client.SendEmailOptions() # SendEmailOptions |
try:
# Send an email from an alias inbox
api_response = api_instance.send_alias_email(alias_id, send_email_options)
pprint(api_response)
except ApiException as e:
print("Exception when calling AliasControllerApi->send_alias_email: %sn" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
alias_id | str | ||
send_email_options | SendEmailOptions |
Return type
Authorization
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 ]
AliasDto update_alias(alias_id, update_alias_options)
Update an email alias
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://python.api.mailslurp.com
# See configuration.py for a list of all supported configuration parameters.
configuration = mailslurp_client.Configuration(
host = "https://python.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://python.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.AliasControllerApi(api_client)
alias_id = 'alias_id_example' # str |
update_alias_options = mailslurp_client.UpdateAliasOptions() # UpdateAliasOptions |
try:
# Update an email alias
api_response = api_instance.update_alias(alias_id, update_alias_options)
pprint(api_response)
except ApiException as e:
print("Exception when calling AliasControllerApi->update_alias: %sn" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
alias_id | str | ||
update_alias_options | UpdateAliasOptions |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: /
HTTP response details
Status code | Description | Response headers |
---|---|---|
202 | Accepted | - |
[Back to top] [Back to API list] [Back to Model list] [Back to ]