Module mailslurp_client.api.email_controller_api
MailSlurp API
MailSlurp is an API for sending and receiving emails and SMS from dynamically allocated email addresses and phone numbers. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - Homepage - Get an API KEY - Generated SDK Clients - Examples repository # noqa: E501
The version of the OpenAPI document: 6.5.2 Contact: contact@mailslurp.dev Generated by: https://openapi-generator.tech
Classes
class EmailControllerApi (api_client=None)-
NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech
Do not edit the class manually.
Expand source code
class EmailControllerApi(object): """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech Do not edit the class manually. """ def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def apply_imap_flag_operation(self, email_id, imap_flag_operation_options, **kwargs): # noqa: E501 """Set IMAP flags associated with a message. Only supports '\\Seen' flag. # noqa: E501 Applies RFC3501 IMAP flag operations on a message. Current implementation supports read/unread semantics via the `\\\\Seen` flag only. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.apply_imap_flag_operation(email_id, imap_flag_operation_options, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_id: (required) :param ImapFlagOperationOptions imap_flag_operation_options: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: EmailPreview If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.apply_imap_flag_operation_with_http_info(email_id, imap_flag_operation_options, **kwargs) # noqa: E501 def apply_imap_flag_operation_with_http_info(self, email_id, imap_flag_operation_options, **kwargs): # noqa: E501 """Set IMAP flags associated with a message. Only supports '\\Seen' flag. # noqa: E501 Applies RFC3501 IMAP flag operations on a message. Current implementation supports read/unread semantics via the `\\\\Seen` flag only. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.apply_imap_flag_operation_with_http_info(email_id, imap_flag_operation_options, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_id: (required) :param ImapFlagOperationOptions imap_flag_operation_options: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(EmailPreview, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'email_id', 'imap_flag_operation_options' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method apply_imap_flag_operation" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'email_id' is set if self.api_client.client_side_validation and ('email_id' not in local_var_params or # noqa: E501 local_var_params['email_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `email_id` when calling `apply_imap_flag_operation`") # noqa: E501 # verify the required parameter 'imap_flag_operation_options' is set if self.api_client.client_side_validation and ('imap_flag_operation_options' not in local_var_params or # noqa: E501 local_var_params['imap_flag_operation_options'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `imap_flag_operation_options` when calling `apply_imap_flag_operation`") # noqa: E501 collection_formats = {} path_params = {} if 'email_id' in local_var_params: path_params['emailId'] = local_var_params['email_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'imap_flag_operation_options' in local_var_params: body_params = local_var_params['imap_flag_operation_options'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/emails/{emailId}/imap-flag-operation', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='EmailPreview', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def can_send(self, inbox_id, send_email_options, **kwargs): # noqa: E501 """Check whether an email send would be accepted # noqa: E501 Validates sender/inbox context and recipient eligibility before attempting a send. Useful for preflight checks in UI or test workflows. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.can_send(inbox_id, send_email_options, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str inbox_id: ID of the inbox you want to send the email from (required) :param SendEmailOptions send_email_options: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: CanSendEmailResults If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.can_send_with_http_info(inbox_id, send_email_options, **kwargs) # noqa: E501 def can_send_with_http_info(self, inbox_id, send_email_options, **kwargs): # noqa: E501 """Check whether an email send would be accepted # noqa: E501 Validates sender/inbox context and recipient eligibility before attempting a send. Useful for preflight checks in UI or test workflows. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.can_send_with_http_info(inbox_id, send_email_options, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str inbox_id: ID of the inbox you want to send the email from (required) :param SendEmailOptions send_email_options: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(CanSendEmailResults, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'inbox_id', 'send_email_options' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method can_send" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'inbox_id' is set if self.api_client.client_side_validation and ('inbox_id' not in local_var_params or # noqa: E501 local_var_params['inbox_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `inbox_id` when calling `can_send`") # noqa: E501 # verify the required parameter 'send_email_options' is set if self.api_client.client_side_validation and ('send_email_options' not in local_var_params or # noqa: E501 local_var_params['send_email_options'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `send_email_options` when calling `can_send`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] if 'inbox_id' in local_var_params and local_var_params['inbox_id'] is not None: # noqa: E501 query_params.append(('inboxId', local_var_params['inbox_id'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None if 'send_email_options' in local_var_params: body_params = local_var_params['send_email_options'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/emails/can-send', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='CanSendEmailResults', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def check_email_audit1(self, email_id, **kwargs): # noqa: E501 """Run aggregate email audit for a stored email # noqa: E501 Runs the same message-level audit bundle used by the email audit dashboard in one request. Combines content checks, HTML validation, compatibility analysis, and reputation verdict rollup when available. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.check_email_audit1(email_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_id: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: EmailAuditAnalysisResult If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.check_email_audit1_with_http_info(email_id, **kwargs) # noqa: E501 def check_email_audit1_with_http_info(self, email_id, **kwargs): # noqa: E501 """Run aggregate email audit for a stored email # noqa: E501 Runs the same message-level audit bundle used by the email audit dashboard in one request. Combines content checks, HTML validation, compatibility analysis, and reputation verdict rollup when available. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.check_email_audit1_with_http_info(email_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_id: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(EmailAuditAnalysisResult, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'email_id' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method check_email_audit1" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'email_id' is set if self.api_client.client_side_validation and ('email_id' not in local_var_params or # noqa: E501 local_var_params['email_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `email_id` when calling `check_email_audit1`") # noqa: E501 collection_formats = {} path_params = {} if 'email_id' in local_var_params: path_params['emailId'] = local_var_params['email_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/emails/{emailId}/check-email-audit', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='EmailAuditAnalysisResult', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def check_email_body(self, email_id, **kwargs): # noqa: E501 """Check email body for broken links, images, and spelling issues # noqa: E501 Runs content quality checks against hydrated email body content. This endpoint performs outbound HTTP checks for linked resources, so avoid use with sensitive or stateful URLs. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.check_email_body(email_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_id: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: CheckEmailBodyResults If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.check_email_body_with_http_info(email_id, **kwargs) # noqa: E501 def check_email_body_with_http_info(self, email_id, **kwargs): # noqa: E501 """Check email body for broken links, images, and spelling issues # noqa: E501 Runs content quality checks against hydrated email body content. This endpoint performs outbound HTTP checks for linked resources, so avoid use with sensitive or stateful URLs. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.check_email_body_with_http_info(email_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_id: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(CheckEmailBodyResults, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'email_id' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method check_email_body" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'email_id' is set if self.api_client.client_side_validation and ('email_id' not in local_var_params or # noqa: E501 local_var_params['email_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `email_id` when calling `check_email_body`") # noqa: E501 collection_formats = {} path_params = {} if 'email_id' in local_var_params: path_params['emailId'] = local_var_params['email_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/emails/{emailId}/check-email-body', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='CheckEmailBodyResults', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def check_email_body_feature_support(self, email_id, **kwargs): # noqa: E501 """Check client support for features used in a stored email body # noqa: E501 Detects HTML/CSS features in the target email body and reports compatibility across major email clients and devices. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.check_email_body_feature_support(email_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_id: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: CheckEmailBodyFeatureSupportResults If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.check_email_body_feature_support_with_http_info(email_id, **kwargs) # noqa: E501 def check_email_body_feature_support_with_http_info(self, email_id, **kwargs): # noqa: E501 """Check client support for features used in a stored email body # noqa: E501 Detects HTML/CSS features in the target email body and reports compatibility across major email clients and devices. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.check_email_body_feature_support_with_http_info(email_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_id: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(CheckEmailBodyFeatureSupportResults, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'email_id' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method check_email_body_feature_support" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'email_id' is set if self.api_client.client_side_validation and ('email_id' not in local_var_params or # noqa: E501 local_var_params['email_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `email_id` when calling `check_email_body_feature_support`") # noqa: E501 collection_formats = {} path_params = {} if 'email_id' in local_var_params: path_params['emailId'] = local_var_params['email_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/emails/{emailId}/check-email-body-feature-support', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='CheckEmailBodyFeatureSupportResults', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def check_email_client_support(self, check_email_client_support_options, **kwargs): # noqa: E501 """Check email-client support for a provided HTML body # noqa: E501 Evaluates HTML/CSS features in the supplied body and reports support coverage across major email clients and platforms. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.check_email_client_support(check_email_client_support_options, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param CheckEmailClientSupportOptions check_email_client_support_options: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: CheckEmailClientSupportResults If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.check_email_client_support_with_http_info(check_email_client_support_options, **kwargs) # noqa: E501 def check_email_client_support_with_http_info(self, check_email_client_support_options, **kwargs): # noqa: E501 """Check email-client support for a provided HTML body # noqa: E501 Evaluates HTML/CSS features in the supplied body and reports support coverage across major email clients and platforms. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.check_email_client_support_with_http_info(check_email_client_support_options, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param CheckEmailClientSupportOptions check_email_client_support_options: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(CheckEmailClientSupportResults, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'check_email_client_support_options' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method check_email_client_support" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'check_email_client_support_options' is set if self.api_client.client_side_validation and ('check_email_client_support_options' not in local_var_params or # noqa: E501 local_var_params['check_email_client_support_options'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `check_email_client_support_options` when calling `check_email_client_support`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'check_email_client_support_options' in local_var_params: body_params = local_var_params['check_email_client_support_options'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/emails/check-email-client-support', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='CheckEmailClientSupportResults', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def create_email_audit_for_email(self, email_id, **kwargs): # noqa: E501 """Persist aggregate email audit for a stored email # noqa: E501 Runs the aggregate audit bundle for the target email and stores the resulting audit record for later review and history tracking. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_email_audit_for_email(email_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_id: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: EmailAuditDto If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.create_email_audit_for_email_with_http_info(email_id, **kwargs) # noqa: E501 def create_email_audit_for_email_with_http_info(self, email_id, **kwargs): # noqa: E501 """Persist aggregate email audit for a stored email # noqa: E501 Runs the aggregate audit bundle for the target email and stores the resulting audit record for later review and history tracking. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_email_audit_for_email_with_http_info(email_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_id: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(EmailAuditDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'email_id' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method create_email_audit_for_email" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'email_id' is set if self.api_client.client_side_validation and ('email_id' not in local_var_params or # noqa: E501 local_var_params['email_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `email_id` when calling `create_email_audit_for_email`") # noqa: E501 collection_formats = {} path_params = {} if 'email_id' in local_var_params: path_params['emailId'] = local_var_params['email_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/emails/{emailId}/audit', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='EmailAuditDto', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def create_email_draft(self, send_email_options, **kwargs): # noqa: E501 """Create an email draft # noqa: E501 Create a saved email draft using the same SendEmailOptions shape used for sending. Provide an inboxId query parameter or sendOptions.inboxId to choose the inbox the draft will send from. Draft creation does not send email and does not create a new inbox. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_email_draft(send_email_options, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param SendEmailOptions send_email_options: (required) :param str inbox_id: ID of the inbox you want to save the draft against :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: EmailDraftDto If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.create_email_draft_with_http_info(send_email_options, **kwargs) # noqa: E501 def create_email_draft_with_http_info(self, send_email_options, **kwargs): # noqa: E501 """Create an email draft # noqa: E501 Create a saved email draft using the same SendEmailOptions shape used for sending. Provide an inboxId query parameter or sendOptions.inboxId to choose the inbox the draft will send from. Draft creation does not send email and does not create a new inbox. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_email_draft_with_http_info(send_email_options, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param SendEmailOptions send_email_options: (required) :param str inbox_id: ID of the inbox you want to save the draft against :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(EmailDraftDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'send_email_options', 'inbox_id' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method create_email_draft" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'send_email_options' is set if self.api_client.client_side_validation and ('send_email_options' not in local_var_params or # noqa: E501 local_var_params['send_email_options'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `send_email_options` when calling `create_email_draft`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] if 'inbox_id' in local_var_params and local_var_params['inbox_id'] is not None: # noqa: E501 query_params.append(('inboxId', local_var_params['inbox_id'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None if 'send_email_options' in local_var_params: body_params = local_var_params['send_email_options'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/emails/drafts', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='EmailDraftDto', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def delete_all_emails(self, **kwargs): # noqa: E501 """Delete all emails in all inboxes. # noqa: E501 Deletes all emails for the authenticated account context. This operation is destructive and cannot be undone. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_all_emails(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param datetime created_at_since: Optional minimum email created-at timestamp to delete from. :param datetime created_at_before: Optional maximum email created-at timestamp to delete through. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.delete_all_emails_with_http_info(**kwargs) # noqa: E501 def delete_all_emails_with_http_info(self, **kwargs): # noqa: E501 """Delete all emails in all inboxes. # noqa: E501 Deletes all emails for the authenticated account context. This operation is destructive and cannot be undone. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_all_emails_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param datetime created_at_since: Optional minimum email created-at timestamp to delete from. :param datetime created_at_before: Optional maximum email created-at timestamp to delete through. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'created_at_since', 'created_at_before' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method delete_all_emails" % key ) local_var_params[key] = val del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] if 'created_at_since' in local_var_params and local_var_params['created_at_since'] is not None: # noqa: E501 query_params.append(('createdAtSince', local_var_params['created_at_since'])) # noqa: E501 if 'created_at_before' in local_var_params and local_var_params['created_at_before'] is not None: # noqa: E501 query_params.append(('createdAtBefore', local_var_params['created_at_before'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/emails', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def delete_email(self, email_id, **kwargs): # noqa: E501 """Delete an email # noqa: E501 Deletes a single email from account scope. Operation is destructive and not reversible. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_email(email_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_id: ID of email to delete (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.delete_email_with_http_info(email_id, **kwargs) # noqa: E501 def delete_email_with_http_info(self, email_id, **kwargs): # noqa: E501 """Delete an email # noqa: E501 Deletes a single email from account scope. Operation is destructive and not reversible. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_email_with_http_info(email_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_id: ID of email to delete (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'email_id' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method delete_email" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'email_id' is set if self.api_client.client_side_validation and ('email_id' not in local_var_params or # noqa: E501 local_var_params['email_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `email_id` when calling `delete_email`") # noqa: E501 collection_formats = {} path_params = {} if 'email_id' in local_var_params: path_params['emailId'] = local_var_params['email_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/emails/{emailId}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def delete_email_draft(self, draft_id, **kwargs): # noqa: E501 """Delete an email draft # noqa: E501 Delete a saved email draft without sending it. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_email_draft(draft_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str draft_id: ID of draft (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.delete_email_draft_with_http_info(draft_id, **kwargs) # noqa: E501 def delete_email_draft_with_http_info(self, draft_id, **kwargs): # noqa: E501 """Delete an email draft # noqa: E501 Delete a saved email draft without sending it. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_email_draft_with_http_info(draft_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str draft_id: ID of draft (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'draft_id' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method delete_email_draft" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'draft_id' is set if self.api_client.client_side_validation and ('draft_id' not in local_var_params or # noqa: E501 local_var_params['draft_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `draft_id` when calling `delete_email_draft`") # noqa: E501 collection_formats = {} path_params = {} if 'draft_id' in local_var_params: path_params['draftId'] = local_var_params['draft_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/emails/drafts/{draftId}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def download_attachment(self, email_id, attachment_id, **kwargs): # noqa: E501 """Get email attachment bytes. Returned as `octet-stream` with content type header. If you have trouble with byte responses try the `downloadAttachmentBase64` response endpoints and convert the base 64 encoded content to a file or string. # noqa: E501 Returns attachment bytes by attachment ID. Use attachment IDs from email payloads or attachment listing endpoints. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.download_attachment(email_id, attachment_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_id: ID of email (required) :param str attachment_id: ID of attachment (required) :param str api_key: Can pass apiKey in url for this request if you wish to download the file in a browser. Content type will be set to original content type of the attachment file. This is so that browsers can download the file correctly. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: str If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.download_attachment_with_http_info(email_id, attachment_id, **kwargs) # noqa: E501 def download_attachment_with_http_info(self, email_id, attachment_id, **kwargs): # noqa: E501 """Get email attachment bytes. Returned as `octet-stream` with content type header. If you have trouble with byte responses try the `downloadAttachmentBase64` response endpoints and convert the base 64 encoded content to a file or string. # noqa: E501 Returns attachment bytes by attachment ID. Use attachment IDs from email payloads or attachment listing endpoints. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.download_attachment_with_http_info(email_id, attachment_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_id: ID of email (required) :param str attachment_id: ID of attachment (required) :param str api_key: Can pass apiKey in url for this request if you wish to download the file in a browser. Content type will be set to original content type of the attachment file. This is so that browsers can download the file correctly. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'email_id', 'attachment_id', 'api_key' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method download_attachment" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'email_id' is set if self.api_client.client_side_validation and ('email_id' not in local_var_params or # noqa: E501 local_var_params['email_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `email_id` when calling `download_attachment`") # noqa: E501 # verify the required parameter 'attachment_id' is set if self.api_client.client_side_validation and ('attachment_id' not in local_var_params or # noqa: E501 local_var_params['attachment_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `attachment_id` when calling `download_attachment`") # noqa: E501 collection_formats = {} path_params = {} if 'email_id' in local_var_params: path_params['emailId'] = local_var_params['email_id'] # noqa: E501 if 'attachment_id' in local_var_params: path_params['attachmentId'] = local_var_params['attachment_id'] # noqa: E501 query_params = [] if 'api_key' in local_var_params and local_var_params['api_key'] is not None: # noqa: E501 query_params.append(('apiKey', local_var_params['api_key'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/octet-stream']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/emails/{emailId}/attachments/{attachmentId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='str', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def download_attachment_base64(self, email_id, attachment_id, **kwargs): # noqa: E501 """Get email attachment as base64 encoded string as an alternative to binary responses. Decode the `base64FileContents` as a `utf-8` encoded string or array of bytes depending on the `contentType`. # noqa: E501 Returns attachment payload as base64 in JSON. Useful for clients that cannot reliably consume binary streaming responses. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.download_attachment_base64(email_id, attachment_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_id: ID of email (required) :param str attachment_id: ID of attachment (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: DownloadAttachmentDto If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.download_attachment_base64_with_http_info(email_id, attachment_id, **kwargs) # noqa: E501 def download_attachment_base64_with_http_info(self, email_id, attachment_id, **kwargs): # noqa: E501 """Get email attachment as base64 encoded string as an alternative to binary responses. Decode the `base64FileContents` as a `utf-8` encoded string or array of bytes depending on the `contentType`. # noqa: E501 Returns attachment payload as base64 in JSON. Useful for clients that cannot reliably consume binary streaming responses. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.download_attachment_base64_with_http_info(email_id, attachment_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_id: ID of email (required) :param str attachment_id: ID of attachment (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(DownloadAttachmentDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'email_id', 'attachment_id' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method download_attachment_base64" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'email_id' is set if self.api_client.client_side_validation and ('email_id' not in local_var_params or # noqa: E501 local_var_params['email_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `email_id` when calling `download_attachment_base64`") # noqa: E501 # verify the required parameter 'attachment_id' is set if self.api_client.client_side_validation and ('attachment_id' not in local_var_params or # noqa: E501 local_var_params['attachment_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `attachment_id` when calling `download_attachment_base64`") # noqa: E501 collection_formats = {} path_params = {} if 'email_id' in local_var_params: path_params['emailId'] = local_var_params['email_id'] # noqa: E501 if 'attachment_id' in local_var_params: path_params['attachmentId'] = local_var_params['attachment_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/emails/{emailId}/attachments/{attachmentId}/base64', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DownloadAttachmentDto', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def download_body(self, email_id, **kwargs): # noqa: E501 """Get email body as string. Returned as `plain/text` with content type header. # noqa: E501 Returns hydrated email body text as a string with content type aligned to the underlying body format. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.download_body(email_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_id: ID of email (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: str If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.download_body_with_http_info(email_id, **kwargs) # noqa: E501 def download_body_with_http_info(self, email_id, **kwargs): # noqa: E501 """Get email body as string. Returned as `plain/text` with content type header. # noqa: E501 Returns hydrated email body text as a string with content type aligned to the underlying body format. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.download_body_with_http_info(email_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_id: ID of email (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'email_id' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method download_body" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'email_id' is set if self.api_client.client_side_validation and ('email_id' not in local_var_params or # noqa: E501 local_var_params['email_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `email_id` when calling `download_body`") # noqa: E501 collection_formats = {} path_params = {} if 'email_id' in local_var_params: path_params['emailId'] = local_var_params['email_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['text/plain', 'text/html']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/emails/{emailId}/body', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='str', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def download_body_bytes(self, email_id, **kwargs): # noqa: E501 """Get email body in bytes. Returned as `octet-stream` with content type header. # noqa: E501 Streams hydrated email body bytes with content type derived from the message body format. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.download_body_bytes(email_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_id: ID of email (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: str If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.download_body_bytes_with_http_info(email_id, **kwargs) # noqa: E501 def download_body_bytes_with_http_info(self, email_id, **kwargs): # noqa: E501 """Get email body in bytes. Returned as `octet-stream` with content type header. # noqa: E501 Streams hydrated email body bytes with content type derived from the message body format. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.download_body_bytes_with_http_info(email_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_id: ID of email (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'email_id' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method download_body_bytes" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'email_id' is set if self.api_client.client_side_validation and ('email_id' not in local_var_params or # noqa: E501 local_var_params['email_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `email_id` when calling `download_body_bytes`") # noqa: E501 collection_formats = {} path_params = {} if 'email_id' in local_var_params: path_params['emailId'] = local_var_params['email_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/octet-stream']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/emails/{emailId}/body-bytes', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='str', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def forward_email(self, email_id, forward_email_options, **kwargs): # noqa: E501 """Forward email to recipients # noqa: E501 Forwards an existing email to new recipients. Uses the owning inbox context unless overridden by allowed sender options. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.forward_email(email_id, forward_email_options, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_id: ID of email (required) :param ForwardEmailOptions forward_email_options: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: SentEmailDto If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.forward_email_with_http_info(email_id, forward_email_options, **kwargs) # noqa: E501 def forward_email_with_http_info(self, email_id, forward_email_options, **kwargs): # noqa: E501 """Forward email to recipients # noqa: E501 Forwards an existing email to new recipients. Uses the owning inbox context unless overridden by allowed sender options. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.forward_email_with_http_info(email_id, forward_email_options, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_id: ID of email (required) :param ForwardEmailOptions forward_email_options: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(SentEmailDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'email_id', 'forward_email_options' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method forward_email" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'email_id' is set if self.api_client.client_side_validation and ('email_id' not in local_var_params or # noqa: E501 local_var_params['email_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `email_id` when calling `forward_email`") # noqa: E501 # verify the required parameter 'forward_email_options' is set if self.api_client.client_side_validation and ('forward_email_options' not in local_var_params or # noqa: E501 local_var_params['forward_email_options'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `forward_email_options` when calling `forward_email`") # noqa: E501 collection_formats = {} path_params = {} if 'email_id' in local_var_params: path_params['emailId'] = local_var_params['email_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'forward_email_options' in local_var_params: body_params = local_var_params['forward_email_options'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/emails/{emailId}/forward', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='SentEmailDto', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_attachment_meta_data(self, email_id, attachment_id, **kwargs): # noqa: E501 """Get email attachment metadata. This is the `contentType` and `contentLength` of an attachment. To get the individual attachments use the `downloadAttachment` methods. # noqa: E501 Returns metadata for a specific attachment ID (name, content type, and size fields). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_attachment_meta_data(email_id, attachment_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_id: ID of email (required) :param str attachment_id: ID of attachment (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: AttachmentMetaData If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.get_attachment_meta_data_with_http_info(email_id, attachment_id, **kwargs) # noqa: E501 def get_attachment_meta_data_with_http_info(self, email_id, attachment_id, **kwargs): # noqa: E501 """Get email attachment metadata. This is the `contentType` and `contentLength` of an attachment. To get the individual attachments use the `downloadAttachment` methods. # noqa: E501 Returns metadata for a specific attachment ID (name, content type, and size fields). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_attachment_meta_data_with_http_info(email_id, attachment_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_id: ID of email (required) :param str attachment_id: ID of attachment (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(AttachmentMetaData, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'email_id', 'attachment_id' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_attachment_meta_data" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'email_id' is set if self.api_client.client_side_validation and ('email_id' not in local_var_params or # noqa: E501 local_var_params['email_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `email_id` when calling `get_attachment_meta_data`") # noqa: E501 # verify the required parameter 'attachment_id' is set if self.api_client.client_side_validation and ('attachment_id' not in local_var_params or # noqa: E501 local_var_params['attachment_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `attachment_id` when calling `get_attachment_meta_data`") # noqa: E501 collection_formats = {} path_params = {} if 'email_id' in local_var_params: path_params['emailId'] = local_var_params['email_id'] # noqa: E501 if 'attachment_id' in local_var_params: path_params['attachmentId'] = local_var_params['attachment_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/emails/{emailId}/attachments/{attachmentId}/metadata', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='AttachmentMetaData', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_email(self, email_id, **kwargs): # noqa: E501 """Get hydrated email (headers and body) # noqa: E501 Returns parsed email content including headers and body fields. Accessing hydrated content may mark the email as read depending on read-state rules. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_email(email_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_id: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Email If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.get_email_with_http_info(email_id, **kwargs) # noqa: E501 def get_email_with_http_info(self, email_id, **kwargs): # noqa: E501 """Get hydrated email (headers and body) # noqa: E501 Returns parsed email content including headers and body fields. Accessing hydrated content may mark the email as read depending on read-state rules. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_email_with_http_info(email_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_id: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(Email, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'email_id' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_email" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'email_id' is set if self.api_client.client_side_validation and ('email_id' not in local_var_params or # noqa: E501 local_var_params['email_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `email_id` when calling `get_email`") # noqa: E501 collection_formats = {} path_params = {} if 'email_id' in local_var_params: path_params['emailId'] = local_var_params['email_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/emails/{emailId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Email', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_email_attachments(self, email_id, **kwargs): # noqa: E501 """List attachment metadata for an email # noqa: E501 Returns metadata for all attachment IDs associated with the email (name, content type, size, and IDs). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_email_attachments(email_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_id: ID of email (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: list[AttachmentMetaData] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.get_email_attachments_with_http_info(email_id, **kwargs) # noqa: E501 def get_email_attachments_with_http_info(self, email_id, **kwargs): # noqa: E501 """List attachment metadata for an email # noqa: E501 Returns metadata for all attachment IDs associated with the email (name, content type, size, and IDs). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_email_attachments_with_http_info(email_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_id: ID of email (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(list[AttachmentMetaData], status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'email_id' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_email_attachments" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'email_id' is set if self.api_client.client_side_validation and ('email_id' not in local_var_params or # noqa: E501 local_var_params['email_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `email_id` when calling `get_email_attachments`") # noqa: E501 collection_formats = {} path_params = {} if 'email_id' in local_var_params: path_params['emailId'] = local_var_params['email_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/emails/{emailId}/attachments', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[AttachmentMetaData]', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_email_codes(self, email_id, **kwargs): # noqa: E501 """Extract verification codes from an email # noqa: E501 Extracts one-time passcodes and similar tokens from email content using the selected extraction method and fallback options. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_email_codes(email_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_id: ID of email to extract codes from (required) :param ExtractCodesOptions extract_codes_options: :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: ExtractCodesResult If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.get_email_codes_with_http_info(email_id, **kwargs) # noqa: E501 def get_email_codes_with_http_info(self, email_id, **kwargs): # noqa: E501 """Extract verification codes from an email # noqa: E501 Extracts one-time passcodes and similar tokens from email content using the selected extraction method and fallback options. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_email_codes_with_http_info(email_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_id: ID of email to extract codes from (required) :param ExtractCodesOptions extract_codes_options: :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(ExtractCodesResult, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'email_id', 'extract_codes_options' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_email_codes" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'email_id' is set if self.api_client.client_side_validation and ('email_id' not in local_var_params or # noqa: E501 local_var_params['email_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `email_id` when calling `get_email_codes`") # noqa: E501 collection_formats = {} path_params = {} if 'email_id' in local_var_params: path_params['emailId'] = local_var_params['email_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'extract_codes_options' in local_var_params: body_params = local_var_params['extract_codes_options'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/emails/{emailId}/codes', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ExtractCodesResult', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_email_content_match(self, email_id, content_match_options, **kwargs): # noqa: E501 """Run regex against hydrated email body and return matches # noqa: E501 Executes a Java regex pattern over hydrated email body text and returns the full match plus capture groups. Pattern syntax follows Java `Pattern` rules. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_email_content_match(email_id, content_match_options, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_id: ID of email to match against (required) :param ContentMatchOptions content_match_options: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: EmailContentMatchResult If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.get_email_content_match_with_http_info(email_id, content_match_options, **kwargs) # noqa: E501 def get_email_content_match_with_http_info(self, email_id, content_match_options, **kwargs): # noqa: E501 """Run regex against hydrated email body and return matches # noqa: E501 Executes a Java regex pattern over hydrated email body text and returns the full match plus capture groups. Pattern syntax follows Java `Pattern` rules. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_email_content_match_with_http_info(email_id, content_match_options, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_id: ID of email to match against (required) :param ContentMatchOptions content_match_options: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(EmailContentMatchResult, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'email_id', 'content_match_options' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_email_content_match" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'email_id' is set if self.api_client.client_side_validation and ('email_id' not in local_var_params or # noqa: E501 local_var_params['email_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `email_id` when calling `get_email_content_match`") # noqa: E501 # verify the required parameter 'content_match_options' is set if self.api_client.client_side_validation and ('content_match_options' not in local_var_params or # noqa: E501 local_var_params['content_match_options'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `content_match_options` when calling `get_email_content_match`") # noqa: E501 collection_formats = {} path_params = {} if 'email_id' in local_var_params: path_params['emailId'] = local_var_params['email_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'content_match_options' in local_var_params: body_params = local_var_params['content_match_options'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/emails/{emailId}/contentMatch', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='EmailContentMatchResult', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_email_content_part(self, email_id, content_type, **kwargs): # noqa: E501 """Get email content part by content type # noqa: E501 Extracts one MIME body part by `contentType` and optional `index`, returned in a structured DTO with metadata. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_email_content_part(email_id, content_type, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_id: ID of email to match against (required) :param str content_type: Content type (required) :param bool strict: Strict content type match :param int index: Index of content type part if multiple :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: EmailContentPartResult If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.get_email_content_part_with_http_info(email_id, content_type, **kwargs) # noqa: E501 def get_email_content_part_with_http_info(self, email_id, content_type, **kwargs): # noqa: E501 """Get email content part by content type # noqa: E501 Extracts one MIME body part by `contentType` and optional `index`, returned in a structured DTO with metadata. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_email_content_part_with_http_info(email_id, content_type, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_id: ID of email to match against (required) :param str content_type: Content type (required) :param bool strict: Strict content type match :param int index: Index of content type part if multiple :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(EmailContentPartResult, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'email_id', 'content_type', 'strict', 'index' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_email_content_part" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'email_id' is set if self.api_client.client_side_validation and ('email_id' not in local_var_params or # noqa: E501 local_var_params['email_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `email_id` when calling `get_email_content_part`") # noqa: E501 # verify the required parameter 'content_type' is set if self.api_client.client_side_validation and ('content_type' not in local_var_params or # noqa: E501 local_var_params['content_type'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `content_type` when calling `get_email_content_part`") # noqa: E501 collection_formats = {} path_params = {} if 'email_id' in local_var_params: path_params['emailId'] = local_var_params['email_id'] # noqa: E501 query_params = [] if 'content_type' in local_var_params and local_var_params['content_type'] is not None: # noqa: E501 query_params.append(('contentType', local_var_params['content_type'])) # noqa: E501 if 'strict' in local_var_params and local_var_params['strict'] is not None: # noqa: E501 query_params.append(('strict', local_var_params['strict'])) # noqa: E501 if 'index' in local_var_params and local_var_params['index'] is not None: # noqa: E501 query_params.append(('index', local_var_params['index'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=UTF-8', 'application/json; charset=UTF-8']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/emails/{emailId}/contentPart', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='EmailContentPartResult', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_email_content_part_content(self, email_id, content_type, **kwargs): # noqa: E501 """Get multipart content part as raw response # noqa: E501 Extracts one MIME body part by `contentType` and optional `index`, and returns raw content with matching response content type when valid. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_email_content_part_content(email_id, content_type, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_id: ID of email to match against (required) :param str content_type: Content type (required) :param bool strict: Strict content type match :param int index: Index of content type part if multiple. Starts from 0 and applies to the result list after selecting for your content type. Content type parts are sorted by order found in original MIME message. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: str If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.get_email_content_part_content_with_http_info(email_id, content_type, **kwargs) # noqa: E501 def get_email_content_part_content_with_http_info(self, email_id, content_type, **kwargs): # noqa: E501 """Get multipart content part as raw response # noqa: E501 Extracts one MIME body part by `contentType` and optional `index`, and returns raw content with matching response content type when valid. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_email_content_part_content_with_http_info(email_id, content_type, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_id: ID of email to match against (required) :param str content_type: Content type (required) :param bool strict: Strict content type match :param int index: Index of content type part if multiple. Starts from 0 and applies to the result list after selecting for your content type. Content type parts are sorted by order found in original MIME message. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'email_id', 'content_type', 'strict', 'index' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_email_content_part_content" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'email_id' is set if self.api_client.client_side_validation and ('email_id' not in local_var_params or # noqa: E501 local_var_params['email_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `email_id` when calling `get_email_content_part_content`") # noqa: E501 # verify the required parameter 'content_type' is set if self.api_client.client_side_validation and ('content_type' not in local_var_params or # noqa: E501 local_var_params['content_type'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `content_type` when calling `get_email_content_part_content`") # noqa: E501 collection_formats = {} path_params = {} if 'email_id' in local_var_params: path_params['emailId'] = local_var_params['email_id'] # noqa: E501 query_params = [] if 'content_type' in local_var_params and local_var_params['content_type'] is not None: # noqa: E501 query_params.append(('contentType', local_var_params['content_type'])) # noqa: E501 if 'strict' in local_var_params and local_var_params['strict'] is not None: # noqa: E501 query_params.append(('strict', local_var_params['strict'])) # noqa: E501 if 'index' in local_var_params and local_var_params['index'] is not None: # noqa: E501 query_params.append(('index', local_var_params['index'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/emails/{emailId}/contentPart/raw', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='str', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_email_count(self, **kwargs): # noqa: E501 """Get email count # noqa: E501 Returns total email count for the authenticated user, or count scoped to a specific inbox when `inboxId` is provided. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_email_count(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str inbox_id: :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: CountDto If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.get_email_count_with_http_info(**kwargs) # noqa: E501 def get_email_count_with_http_info(self, **kwargs): # noqa: E501 """Get email count # noqa: E501 Returns total email count for the authenticated user, or count scoped to a specific inbox when `inboxId` is provided. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_email_count_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str inbox_id: :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(CountDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'inbox_id' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_email_count" % key ) local_var_params[key] = val del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] if 'inbox_id' in local_var_params and local_var_params['inbox_id'] is not None: # noqa: E501 query_params.append(('inboxId', local_var_params['inbox_id'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/emails/emails/count', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='CountDto', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_email_draft(self, draft_id, **kwargs): # noqa: E501 """Get an email draft # noqa: E501 Get a saved email draft including the full SendEmailOptions payload. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_email_draft(draft_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str draft_id: ID of draft (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: EmailDraftDto If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.get_email_draft_with_http_info(draft_id, **kwargs) # noqa: E501 def get_email_draft_with_http_info(self, draft_id, **kwargs): # noqa: E501 """Get an email draft # noqa: E501 Get a saved email draft including the full SendEmailOptions payload. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_email_draft_with_http_info(draft_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str draft_id: ID of draft (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(EmailDraftDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'draft_id' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_email_draft" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'draft_id' is set if self.api_client.client_side_validation and ('draft_id' not in local_var_params or # noqa: E501 local_var_params['draft_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `draft_id` when calling `get_email_draft`") # noqa: E501 collection_formats = {} path_params = {} if 'draft_id' in local_var_params: path_params['draftId'] = local_var_params['draft_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/emails/drafts/{draftId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='EmailDraftDto', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_email_drafts(self, **kwargs): # noqa: E501 """List email drafts # noqa: E501 List saved email drafts for the authenticated user, optionally filtered by inbox. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_email_drafts(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str inbox_id: Optional inbox filter :param int page: Optional page index in draft pagination :param int size: Optional page size in draft pagination :param str sort: Optional createdAt sort direction ASC or DESC :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PageEmailDraftProjection If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.get_email_drafts_with_http_info(**kwargs) # noqa: E501 def get_email_drafts_with_http_info(self, **kwargs): # noqa: E501 """List email drafts # noqa: E501 List saved email drafts for the authenticated user, optionally filtered by inbox. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_email_drafts_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str inbox_id: Optional inbox filter :param int page: Optional page index in draft pagination :param int size: Optional page size in draft pagination :param str sort: Optional createdAt sort direction ASC or DESC :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PageEmailDraftProjection, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'inbox_id', 'page', 'size', 'sort' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_email_drafts" % key ) local_var_params[key] = val del local_var_params['kwargs'] if self.api_client.client_side_validation and 'size' in local_var_params and local_var_params['size'] > 100: # noqa: E501 raise ApiValueError("Invalid value for parameter `size` when calling `get_email_drafts`, must be a value less than or equal to `100`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] if 'inbox_id' in local_var_params and local_var_params['inbox_id'] is not None: # noqa: E501 query_params.append(('inboxId', local_var_params['inbox_id'])) # noqa: E501 if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 query_params.append(('page', local_var_params['page'])) # noqa: E501 if 'size' in local_var_params and local_var_params['size'] is not None: # noqa: E501 query_params.append(('size', local_var_params['size'])) # noqa: E501 if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501 query_params.append(('sort', local_var_params['sort'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/emails/drafts', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PageEmailDraftProjection', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_email_html(self, email_id, **kwargs): # noqa: E501 """Get hydrated email HTML for browser rendering # noqa: E501 Returns hydrated HTML body directly with `text/html` content type. Supports temporary access/browser usage and optional CID replacement for inline asset rendering. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_email_html(email_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_id: (required) :param bool replace_cid_images: :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: str If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.get_email_html_with_http_info(email_id, **kwargs) # noqa: E501 def get_email_html_with_http_info(self, email_id, **kwargs): # noqa: E501 """Get hydrated email HTML for browser rendering # noqa: E501 Returns hydrated HTML body directly with `text/html` content type. Supports temporary access/browser usage and optional CID replacement for inline asset rendering. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_email_html_with_http_info(email_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_id: (required) :param bool replace_cid_images: :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'email_id', 'replace_cid_images' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_email_html" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'email_id' is set if self.api_client.client_side_validation and ('email_id' not in local_var_params or # noqa: E501 local_var_params['email_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `email_id` when calling `get_email_html`") # noqa: E501 collection_formats = {} path_params = {} if 'email_id' in local_var_params: path_params['emailId'] = local_var_params['email_id'] # noqa: E501 query_params = [] if 'replace_cid_images' in local_var_params and local_var_params['replace_cid_images'] is not None: # noqa: E501 query_params.append(('replaceCidImages', local_var_params['replace_cid_images'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['text/html;charset=utf-8', 'text/html']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/emails/{emailId}/html', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='str', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_email_html_json(self, email_id, **kwargs): # noqa: E501 """Get hydrated email HTML wrapped in JSON # noqa: E501 Returns hydrated HTML body and subject in a JSON DTO. Useful for API clients that need structured response payloads instead of raw HTML responses. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_email_html_json(email_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_id: (required) :param bool replace_cid_images: :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: EmailHtmlDto If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.get_email_html_json_with_http_info(email_id, **kwargs) # noqa: E501 def get_email_html_json_with_http_info(self, email_id, **kwargs): # noqa: E501 """Get hydrated email HTML wrapped in JSON # noqa: E501 Returns hydrated HTML body and subject in a JSON DTO. Useful for API clients that need structured response payloads instead of raw HTML responses. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_email_html_json_with_http_info(email_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_id: (required) :param bool replace_cid_images: :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(EmailHtmlDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'email_id', 'replace_cid_images' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_email_html_json" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'email_id' is set if self.api_client.client_side_validation and ('email_id' not in local_var_params or # noqa: E501 local_var_params['email_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `email_id` when calling `get_email_html_json`") # noqa: E501 collection_formats = {} path_params = {} if 'email_id' in local_var_params: path_params['emailId'] = local_var_params['email_id'] # noqa: E501 query_params = [] if 'replace_cid_images' in local_var_params and local_var_params['replace_cid_images'] is not None: # noqa: E501 query_params.append(('replaceCidImages', local_var_params['replace_cid_images'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/emails/{emailId}/html/json', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='EmailHtmlDto', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_email_html_query(self, email_id, html_selector, **kwargs): # noqa: E501 """Query hydrated HTML body and return matching text lines # noqa: E501 Applies a JSoup/CSS selector to hydrated HTML email body and returns matching text lines. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_email_html_query(email_id, html_selector, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_id: ID of email to perform HTML query on (required) :param str html_selector: HTML selector to search for. Uses JQuery/JSoup/CSS style selector like '.my-div' to match content. See https://jsoup.org/apidocs/org/jsoup/select/Selector.html for more information. (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: EmailTextLinesResult If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.get_email_html_query_with_http_info(email_id, html_selector, **kwargs) # noqa: E501 def get_email_html_query_with_http_info(self, email_id, html_selector, **kwargs): # noqa: E501 """Query hydrated HTML body and return matching text lines # noqa: E501 Applies a JSoup/CSS selector to hydrated HTML email body and returns matching text lines. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_email_html_query_with_http_info(email_id, html_selector, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_id: ID of email to perform HTML query on (required) :param str html_selector: HTML selector to search for. Uses JQuery/JSoup/CSS style selector like '.my-div' to match content. See https://jsoup.org/apidocs/org/jsoup/select/Selector.html for more information. (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(EmailTextLinesResult, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'email_id', 'html_selector' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_email_html_query" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'email_id' is set if self.api_client.client_side_validation and ('email_id' not in local_var_params or # noqa: E501 local_var_params['email_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `email_id` when calling `get_email_html_query`") # noqa: E501 # verify the required parameter 'html_selector' is set if self.api_client.client_side_validation and ('html_selector' not in local_var_params or # noqa: E501 local_var_params['html_selector'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `html_selector` when calling `get_email_html_query`") # noqa: E501 collection_formats = {} path_params = {} if 'email_id' in local_var_params: path_params['emailId'] = local_var_params['email_id'] # noqa: E501 query_params = [] if 'html_selector' in local_var_params and local_var_params['html_selector'] is not None: # noqa: E501 query_params.append(('htmlSelector', local_var_params['html_selector'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/emails/{emailId}/htmlQuery', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='EmailTextLinesResult', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_email_links(self, email_id, **kwargs): # noqa: E501 """Extract links from an email HTML body # noqa: E501 Parses HTML content and extracts link URLs (`href`). For non-HTML emails this endpoint returns a validation error. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_email_links(email_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_id: ID of email to fetch text for (required) :param str selector: Optional HTML query selector for links :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: EmailLinksResult If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.get_email_links_with_http_info(email_id, **kwargs) # noqa: E501 def get_email_links_with_http_info(self, email_id, **kwargs): # noqa: E501 """Extract links from an email HTML body # noqa: E501 Parses HTML content and extracts link URLs (`href`). For non-HTML emails this endpoint returns a validation error. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_email_links_with_http_info(email_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_id: ID of email to fetch text for (required) :param str selector: Optional HTML query selector for links :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(EmailLinksResult, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'email_id', 'selector' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_email_links" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'email_id' is set if self.api_client.client_side_validation and ('email_id' not in local_var_params or # noqa: E501 local_var_params['email_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `email_id` when calling `get_email_links`") # noqa: E501 collection_formats = {} path_params = {} if 'email_id' in local_var_params: path_params['emailId'] = local_var_params['email_id'] # noqa: E501 query_params = [] if 'selector' in local_var_params and local_var_params['selector'] is not None: # noqa: E501 query_params.append(('selector', local_var_params['selector'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/emails/{emailId}/links', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='EmailLinksResult', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_email_preview_html(self, email_id, **kwargs): # noqa: E501 """Get deprecated server-normalized email preview HTML # noqa: E501 Returns a server-normalized preview document with active content removed and restrictive browser metadata. This representation can normalize malformed email layout and is deprecated for fidelity-sensitive rendering. Fetch the original HTML source and apply link hardening inside an opaque-origin browser sandbox instead. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_email_preview_html(email_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_id: (required) :param bool replace_cid_images: :param str link_behavior: :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: EmailPreviewHtmlDto If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.get_email_preview_html_with_http_info(email_id, **kwargs) # noqa: E501 def get_email_preview_html_with_http_info(self, email_id, **kwargs): # noqa: E501 """Get deprecated server-normalized email preview HTML # noqa: E501 Returns a server-normalized preview document with active content removed and restrictive browser metadata. This representation can normalize malformed email layout and is deprecated for fidelity-sensitive rendering. Fetch the original HTML source and apply link hardening inside an opaque-origin browser sandbox instead. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_email_preview_html_with_http_info(email_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_id: (required) :param bool replace_cid_images: :param str link_behavior: :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(EmailPreviewHtmlDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'email_id', 'replace_cid_images', 'link_behavior' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_email_preview_html" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'email_id' is set if self.api_client.client_side_validation and ('email_id' not in local_var_params or # noqa: E501 local_var_params['email_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `email_id` when calling `get_email_preview_html`") # noqa: E501 collection_formats = {} path_params = {} if 'email_id' in local_var_params: path_params['emailId'] = local_var_params['email_id'] # noqa: E501 query_params = [] if 'replace_cid_images' in local_var_params and local_var_params['replace_cid_images'] is not None: # noqa: E501 query_params.append(('replaceCidImages', local_var_params['replace_cid_images'])) # noqa: E501 if 'link_behavior' in local_var_params and local_var_params['link_behavior'] is not None: # noqa: E501 query_params.append(('linkBehavior', local_var_params['link_behavior'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/emails/{emailId}/preview', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='EmailPreviewHtmlDto', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_email_preview_ur_ls(self, email_id, **kwargs): # noqa: E501 """Get email URLs for viewing in browser or downloading # noqa: E501 Returns precomputed URLs for preview and raw message access for the specified email. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_email_preview_ur_ls(email_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_id: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: EmailPreviewUrls If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.get_email_preview_ur_ls_with_http_info(email_id, **kwargs) # noqa: E501 def get_email_preview_ur_ls_with_http_info(self, email_id, **kwargs): # noqa: E501 """Get email URLs for viewing in browser or downloading # noqa: E501 Returns precomputed URLs for preview and raw message access for the specified email. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_email_preview_ur_ls_with_http_info(email_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_id: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(EmailPreviewUrls, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'email_id' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_email_preview_ur_ls" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'email_id' is set if self.api_client.client_side_validation and ('email_id' not in local_var_params or # noqa: E501 local_var_params['email_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `email_id` when calling `get_email_preview_ur_ls`") # noqa: E501 collection_formats = {} path_params = {} if 'email_id' in local_var_params: path_params['emailId'] = local_var_params['email_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/emails/{emailId}/urls', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='EmailPreviewUrls', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_email_screenshot_as_base64(self, email_id, get_email_screenshot_options, **kwargs): # noqa: E501 """Take a screenshot of an email in a browser and return base64 encoded string # noqa: E501 Renders the email in a browser engine and returns PNG data as base64. Useful for APIs and dashboards that cannot easily stream binary responses. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_email_screenshot_as_base64(email_id, get_email_screenshot_options, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_id: (required) :param GetEmailScreenshotOptions get_email_screenshot_options: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: EmailScreenshotResult If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.get_email_screenshot_as_base64_with_http_info(email_id, get_email_screenshot_options, **kwargs) # noqa: E501 def get_email_screenshot_as_base64_with_http_info(self, email_id, get_email_screenshot_options, **kwargs): # noqa: E501 """Take a screenshot of an email in a browser and return base64 encoded string # noqa: E501 Renders the email in a browser engine and returns PNG data as base64. Useful for APIs and dashboards that cannot easily stream binary responses. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_email_screenshot_as_base64_with_http_info(email_id, get_email_screenshot_options, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_id: (required) :param GetEmailScreenshotOptions get_email_screenshot_options: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(EmailScreenshotResult, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'email_id', 'get_email_screenshot_options' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_email_screenshot_as_base64" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'email_id' is set if self.api_client.client_side_validation and ('email_id' not in local_var_params or # noqa: E501 local_var_params['email_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `email_id` when calling `get_email_screenshot_as_base64`") # noqa: E501 # verify the required parameter 'get_email_screenshot_options' is set if self.api_client.client_side_validation and ('get_email_screenshot_options' not in local_var_params or # noqa: E501 local_var_params['get_email_screenshot_options'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `get_email_screenshot_options` when calling `get_email_screenshot_as_base64`") # noqa: E501 collection_formats = {} path_params = {} if 'email_id' in local_var_params: path_params['emailId'] = local_var_params['email_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'get_email_screenshot_options' in local_var_params: body_params = local_var_params['get_email_screenshot_options'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/emails/{emailId}/screenshot/base64', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='EmailScreenshotResult', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_email_screenshot_as_binary(self, email_id, get_email_screenshot_options, **kwargs): # noqa: E501 """Take a screenshot of an email in a browser # noqa: E501 Renders the email in a browser engine and returns PNG bytes. Intended for visual QA and rendering regression checks. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_email_screenshot_as_binary(email_id, get_email_screenshot_options, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_id: (required) :param GetEmailScreenshotOptions get_email_screenshot_options: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.get_email_screenshot_as_binary_with_http_info(email_id, get_email_screenshot_options, **kwargs) # noqa: E501 def get_email_screenshot_as_binary_with_http_info(self, email_id, get_email_screenshot_options, **kwargs): # noqa: E501 """Take a screenshot of an email in a browser # noqa: E501 Renders the email in a browser engine and returns PNG bytes. Intended for visual QA and rendering regression checks. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_email_screenshot_as_binary_with_http_info(email_id, get_email_screenshot_options, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_id: (required) :param GetEmailScreenshotOptions get_email_screenshot_options: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'email_id', 'get_email_screenshot_options' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_email_screenshot_as_binary" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'email_id' is set if self.api_client.client_side_validation and ('email_id' not in local_var_params or # noqa: E501 local_var_params['email_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `email_id` when calling `get_email_screenshot_as_binary`") # noqa: E501 # verify the required parameter 'get_email_screenshot_options' is set if self.api_client.client_side_validation and ('get_email_screenshot_options' not in local_var_params or # noqa: E501 local_var_params['get_email_screenshot_options'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `get_email_screenshot_options` when calling `get_email_screenshot_as_binary`") # noqa: E501 collection_formats = {} path_params = {} if 'email_id' in local_var_params: path_params['emailId'] = local_var_params['email_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'get_email_screenshot_options' in local_var_params: body_params = local_var_params['get_email_screenshot_options'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/emails/{emailId}/screenshot/binary', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_email_signature(self, email_id, **kwargs): # noqa: E501 """Extract signature from an inbound email # noqa: E501 Attempts to parse a sender signature block from an email body. Uses raw MIME content parts when possible and falls back to hydrated body parsing. This is heuristic and may not be accurate for all email clients or formats. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_email_signature(email_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_id: ID of email to extract signature from (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: EmailSignatureParseResult If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.get_email_signature_with_http_info(email_id, **kwargs) # noqa: E501 def get_email_signature_with_http_info(self, email_id, **kwargs): # noqa: E501 """Extract signature from an inbound email # noqa: E501 Attempts to parse a sender signature block from an email body. Uses raw MIME content parts when possible and falls back to hydrated body parsing. This is heuristic and may not be accurate for all email clients or formats. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_email_signature_with_http_info(email_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_id: ID of email to extract signature from (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(EmailSignatureParseResult, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'email_id' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_email_signature" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'email_id' is set if self.api_client.client_side_validation and ('email_id' not in local_var_params or # noqa: E501 local_var_params['email_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `email_id` when calling `get_email_signature`") # noqa: E501 collection_formats = {} path_params = {} if 'email_id' in local_var_params: path_params['emailId'] = local_var_params['email_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/emails/{emailId}/signature', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='EmailSignatureParseResult', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_email_summary(self, email_id, **kwargs): # noqa: E501 """Get email summary (headers/metadata only) # noqa: E501 Returns lightweight metadata and headers for an email. Use `getEmail` for hydrated body content or `getRawEmail` for original SMTP content. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_email_summary(email_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_id: (required) :param bool decode: Deprecated and ignored. Retained for backwards compatibility. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: EmailPreview If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.get_email_summary_with_http_info(email_id, **kwargs) # noqa: E501 def get_email_summary_with_http_info(self, email_id, **kwargs): # noqa: E501 """Get email summary (headers/metadata only) # noqa: E501 Returns lightweight metadata and headers for an email. Use `getEmail` for hydrated body content or `getRawEmail` for original SMTP content. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_email_summary_with_http_info(email_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_id: (required) :param bool decode: Deprecated and ignored. Retained for backwards compatibility. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(EmailPreview, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'email_id', 'decode' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_email_summary" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'email_id' is set if self.api_client.client_side_validation and ('email_id' not in local_var_params or # noqa: E501 local_var_params['email_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `email_id` when calling `get_email_summary`") # noqa: E501 collection_formats = {} path_params = {} if 'email_id' in local_var_params: path_params['emailId'] = local_var_params['email_id'] # noqa: E501 query_params = [] if 'decode' in local_var_params and local_var_params['decode'] is not None: # noqa: E501 query_params.append(('decode', local_var_params['decode'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/emails/{emailId}/summary', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='EmailPreview', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_email_text_lines(self, email_id, **kwargs): # noqa: E501 """Extract normalized text lines from email body # noqa: E501 Converts email body content to line-based plain text with optional HTML entity decoding and custom line separator. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_email_text_lines(email_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_id: ID of email to fetch text for (required) :param bool decode_html_entities: Decode HTML entities :param str line_separator: Line separator character :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: EmailTextLinesResult If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.get_email_text_lines_with_http_info(email_id, **kwargs) # noqa: E501 def get_email_text_lines_with_http_info(self, email_id, **kwargs): # noqa: E501 """Extract normalized text lines from email body # noqa: E501 Converts email body content to line-based plain text with optional HTML entity decoding and custom line separator. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_email_text_lines_with_http_info(email_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_id: ID of email to fetch text for (required) :param bool decode_html_entities: Decode HTML entities :param str line_separator: Line separator character :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(EmailTextLinesResult, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'email_id', 'decode_html_entities', 'line_separator' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_email_text_lines" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'email_id' is set if self.api_client.client_side_validation and ('email_id' not in local_var_params or # noqa: E501 local_var_params['email_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `email_id` when calling `get_email_text_lines`") # noqa: E501 collection_formats = {} path_params = {} if 'email_id' in local_var_params: path_params['emailId'] = local_var_params['email_id'] # noqa: E501 query_params = [] if 'decode_html_entities' in local_var_params and local_var_params['decode_html_entities'] is not None: # noqa: E501 query_params.append(('decodeHtmlEntities', local_var_params['decode_html_entities'])) # noqa: E501 if 'line_separator' in local_var_params and local_var_params['line_separator'] is not None: # noqa: E501 query_params.append(('lineSeparator', local_var_params['line_separator'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/emails/{emailId}/textLines', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='EmailTextLinesResult', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_email_thread(self, thread_id, **kwargs): # noqa: E501 """Get email thread metadata by thread ID # noqa: E501 Returns thread metadata built from RFC 5322 `Message-ID`, `In-Reply-To`, and `References` headers. Use `getEmailThreadItems` to fetch the thread messages. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_email_thread(thread_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str thread_id: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: EmailThreadDto If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.get_email_thread_with_http_info(thread_id, **kwargs) # noqa: E501 def get_email_thread_with_http_info(self, thread_id, **kwargs): # noqa: E501 """Get email thread metadata by thread ID # noqa: E501 Returns thread metadata built from RFC 5322 `Message-ID`, `In-Reply-To`, and `References` headers. Use `getEmailThreadItems` to fetch the thread messages. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_email_thread_with_http_info(thread_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str thread_id: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(EmailThreadDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'thread_id' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_email_thread" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'thread_id' is set if self.api_client.client_side_validation and ('thread_id' not in local_var_params or # noqa: E501 local_var_params['thread_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `thread_id` when calling `get_email_thread`") # noqa: E501 collection_formats = {} path_params = {} if 'thread_id' in local_var_params: path_params['threadId'] = local_var_params['thread_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/emails/threads/{threadId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='EmailThreadDto', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_email_thread_items(self, thread_id, **kwargs): # noqa: E501 """Get messages in a specific email thread # noqa: E501 Returns all messages in a thread ordered by `createdAt` using the requested sort direction. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_email_thread_items(thread_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str thread_id: (required) :param str sort: Optional createdAt sort direction ASC or DESC :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: EmailThreadItemsDto If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.get_email_thread_items_with_http_info(thread_id, **kwargs) # noqa: E501 def get_email_thread_items_with_http_info(self, thread_id, **kwargs): # noqa: E501 """Get messages in a specific email thread # noqa: E501 Returns all messages in a thread ordered by `createdAt` using the requested sort direction. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_email_thread_items_with_http_info(thread_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str thread_id: (required) :param str sort: Optional createdAt sort direction ASC or DESC :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(EmailThreadItemsDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'thread_id', 'sort' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_email_thread_items" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'thread_id' is set if self.api_client.client_side_validation and ('thread_id' not in local_var_params or # noqa: E501 local_var_params['thread_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `thread_id` when calling `get_email_thread_items`") # noqa: E501 collection_formats = {} path_params = {} if 'thread_id' in local_var_params: path_params['threadId'] = local_var_params['thread_id'] # noqa: E501 query_params = [] if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501 query_params.append(('sort', local_var_params['sort'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/emails/threads/{threadId}/items', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='EmailThreadItemsDto', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_email_threads(self, **kwargs): # noqa: E501 """List email threads in paginated form # noqa: E501 Lists conversation threads inferred from `Message-ID`, `In-Reply-To`, and `References`. Supports filtering by inbox, search text, and time range. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_email_threads(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str html_selector: Optional inbox filter. Query parameter name is `htmlSelector` for legacy compatibility. :param str inbox_id: Optional inbox filter. :param int page: Optional page index in email thread pagination :param int size: Optional page size in email thread pagination. Maximum size is 100. Use page index and sort to page through larger results :param str sort: Optional createdAt sort direction ASC or DESC :param str search_filter: Optional search filter search filter for email threads. :param datetime since: Optional filter email threads created since time :param datetime before: Optional filter emails threads created before given date time :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PageEmailThreadProjection If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.get_email_threads_with_http_info(**kwargs) # noqa: E501 def get_email_threads_with_http_info(self, **kwargs): # noqa: E501 """List email threads in paginated form # noqa: E501 Lists conversation threads inferred from `Message-ID`, `In-Reply-To`, and `References`. Supports filtering by inbox, search text, and time range. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_email_threads_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str html_selector: Optional inbox filter. Query parameter name is `htmlSelector` for legacy compatibility. :param str inbox_id: Optional inbox filter. :param int page: Optional page index in email thread pagination :param int size: Optional page size in email thread pagination. Maximum size is 100. Use page index and sort to page through larger results :param str sort: Optional createdAt sort direction ASC or DESC :param str search_filter: Optional search filter search filter for email threads. :param datetime since: Optional filter email threads created since time :param datetime before: Optional filter emails threads created before given date time :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PageEmailThreadProjection, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'html_selector', 'inbox_id', 'page', 'size', 'sort', 'search_filter', 'since', 'before' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_email_threads" % key ) local_var_params[key] = val del local_var_params['kwargs'] if self.api_client.client_side_validation and 'size' in local_var_params and local_var_params['size'] > 100: # noqa: E501 raise ApiValueError("Invalid value for parameter `size` when calling `get_email_threads`, must be a value less than or equal to `100`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] if 'html_selector' in local_var_params and local_var_params['html_selector'] is not None: # noqa: E501 query_params.append(('htmlSelector', local_var_params['html_selector'])) # noqa: E501 if 'inbox_id' in local_var_params and local_var_params['inbox_id'] is not None: # noqa: E501 query_params.append(('inboxId', local_var_params['inbox_id'])) # noqa: E501 if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 query_params.append(('page', local_var_params['page'])) # noqa: E501 if 'size' in local_var_params and local_var_params['size'] is not None: # noqa: E501 query_params.append(('size', local_var_params['size'])) # noqa: E501 if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501 query_params.append(('sort', local_var_params['sort'])) # noqa: E501 if 'search_filter' in local_var_params and local_var_params['search_filter'] is not None: # noqa: E501 query_params.append(('searchFilter', local_var_params['search_filter'])) # noqa: E501 if 'since' in local_var_params and local_var_params['since'] is not None: # noqa: E501 query_params.append(('since', local_var_params['since'])) # noqa: E501 if 'before' in local_var_params and local_var_params['before'] is not None: # noqa: E501 query_params.append(('before', local_var_params['before'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/emails/threads', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PageEmailThreadProjection', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_emails_offset_paginated(self, **kwargs): # noqa: E501 """Get all emails in all inboxes in paginated form. Email API list all. # noqa: E501 Offset-style pagination endpoint for listing emails across inboxes. Supports inbox filters, unread-only, search, date boundaries, favourites, connector sync, plus-address filtering, and explicit include IDs. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_emails_offset_paginated(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param list[str] inbox_id: Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account. :param int page: Optional page index in email list pagination :param int size: Optional page size in email list pagination. Maximum size is 100. Use page index and sort to page through larger results :param str sort: Optional createdAt sort direction ASC or DESC :param bool unread_only: Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly :param str search_filter: Optional search filter. Matches email ID, inbox ID, sender address, subject, receiving inbox email address, receiving plus-address full address, or plus-address suffix. Pasted email address tokens are normalized before matching. :param datetime since: Optional filter emails received after given date time :param datetime before: Optional filter emails received before given date time :param bool favourited: Optional filter emails that are favourited :param bool sync_connectors: Sync connectors :param str plus_address_id: Optional plus address ID filter :param list[str] include: Optional list of IDs to include in result :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PageEmailProjection If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.get_emails_offset_paginated_with_http_info(**kwargs) # noqa: E501 def get_emails_offset_paginated_with_http_info(self, **kwargs): # noqa: E501 """Get all emails in all inboxes in paginated form. Email API list all. # noqa: E501 Offset-style pagination endpoint for listing emails across inboxes. Supports inbox filters, unread-only, search, date boundaries, favourites, connector sync, plus-address filtering, and explicit include IDs. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_emails_offset_paginated_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param list[str] inbox_id: Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account. :param int page: Optional page index in email list pagination :param int size: Optional page size in email list pagination. Maximum size is 100. Use page index and sort to page through larger results :param str sort: Optional createdAt sort direction ASC or DESC :param bool unread_only: Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly :param str search_filter: Optional search filter. Matches email ID, inbox ID, sender address, subject, receiving inbox email address, receiving plus-address full address, or plus-address suffix. Pasted email address tokens are normalized before matching. :param datetime since: Optional filter emails received after given date time :param datetime before: Optional filter emails received before given date time :param bool favourited: Optional filter emails that are favourited :param bool sync_connectors: Sync connectors :param str plus_address_id: Optional plus address ID filter :param list[str] include: Optional list of IDs to include in result :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PageEmailProjection, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'inbox_id', 'page', 'size', 'sort', 'unread_only', 'search_filter', 'since', 'before', 'favourited', 'sync_connectors', 'plus_address_id', 'include' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_emails_offset_paginated" % key ) local_var_params[key] = val del local_var_params['kwargs'] if self.api_client.client_side_validation and 'size' in local_var_params and local_var_params['size'] > 100: # noqa: E501 raise ApiValueError("Invalid value for parameter `size` when calling `get_emails_offset_paginated`, must be a value less than or equal to `100`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] if 'inbox_id' in local_var_params and local_var_params['inbox_id'] is not None: # noqa: E501 query_params.append(('inboxId', local_var_params['inbox_id'])) # noqa: E501 collection_formats['inboxId'] = 'multi' # noqa: E501 if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 query_params.append(('page', local_var_params['page'])) # noqa: E501 if 'size' in local_var_params and local_var_params['size'] is not None: # noqa: E501 query_params.append(('size', local_var_params['size'])) # noqa: E501 if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501 query_params.append(('sort', local_var_params['sort'])) # noqa: E501 if 'unread_only' in local_var_params and local_var_params['unread_only'] is not None: # noqa: E501 query_params.append(('unreadOnly', local_var_params['unread_only'])) # noqa: E501 if 'search_filter' in local_var_params and local_var_params['search_filter'] is not None: # noqa: E501 query_params.append(('searchFilter', local_var_params['search_filter'])) # noqa: E501 if 'since' in local_var_params and local_var_params['since'] is not None: # noqa: E501 query_params.append(('since', local_var_params['since'])) # noqa: E501 if 'before' in local_var_params and local_var_params['before'] is not None: # noqa: E501 query_params.append(('before', local_var_params['before'])) # noqa: E501 if 'favourited' in local_var_params and local_var_params['favourited'] is not None: # noqa: E501 query_params.append(('favourited', local_var_params['favourited'])) # noqa: E501 if 'sync_connectors' in local_var_params and local_var_params['sync_connectors'] is not None: # noqa: E501 query_params.append(('syncConnectors', local_var_params['sync_connectors'])) # noqa: E501 if 'plus_address_id' in local_var_params and local_var_params['plus_address_id'] is not None: # noqa: E501 query_params.append(('plusAddressId', local_var_params['plus_address_id'])) # noqa: E501 if 'include' in local_var_params and local_var_params['include'] is not None: # noqa: E501 query_params.append(('include', local_var_params['include'])) # noqa: E501 collection_formats['include'] = 'multi' # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/emails/offset-paginated', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PageEmailProjection', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_emails_paginated(self, **kwargs): # noqa: E501 """Get all emails in all inboxes in paginated form. Email API list all. # noqa: E501 Primary paginated email listing endpoint. Returns emails across inboxes with support for inbox filters, unread-only, search, date boundaries, favourites, connector sync, and plus-address filtering. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_emails_paginated(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param list[str] inbox_id: Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account. :param int page: Optional page index in email list pagination :param int size: Optional page size in email list pagination. Maximum size is 100. Use page index and sort to page through larger results :param str sort: Optional createdAt sort direction ASC or DESC :param bool unread_only: Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly :param str search_filter: Optional search filter. Matches email ID, inbox ID, sender address, subject, receiving inbox email address, receiving plus-address full address, or plus-address suffix. Pasted email address tokens are normalized before matching. :param datetime since: Optional filter emails received after given date time. If unset will use time 24hours prior to now. :param datetime before: Optional filter emails received before given date time :param bool sync_connectors: Sync connectors :param str plus_address_id: Optional plus address ID filter :param bool favourited: Optional filter emails that are favourited :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PageEmailProjection If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.get_emails_paginated_with_http_info(**kwargs) # noqa: E501 def get_emails_paginated_with_http_info(self, **kwargs): # noqa: E501 """Get all emails in all inboxes in paginated form. Email API list all. # noqa: E501 Primary paginated email listing endpoint. Returns emails across inboxes with support for inbox filters, unread-only, search, date boundaries, favourites, connector sync, and plus-address filtering. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_emails_paginated_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param list[str] inbox_id: Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account. :param int page: Optional page index in email list pagination :param int size: Optional page size in email list pagination. Maximum size is 100. Use page index and sort to page through larger results :param str sort: Optional createdAt sort direction ASC or DESC :param bool unread_only: Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly :param str search_filter: Optional search filter. Matches email ID, inbox ID, sender address, subject, receiving inbox email address, receiving plus-address full address, or plus-address suffix. Pasted email address tokens are normalized before matching. :param datetime since: Optional filter emails received after given date time. If unset will use time 24hours prior to now. :param datetime before: Optional filter emails received before given date time :param bool sync_connectors: Sync connectors :param str plus_address_id: Optional plus address ID filter :param bool favourited: Optional filter emails that are favourited :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PageEmailProjection, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'inbox_id', 'page', 'size', 'sort', 'unread_only', 'search_filter', 'since', 'before', 'sync_connectors', 'plus_address_id', 'favourited' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_emails_paginated" % key ) local_var_params[key] = val del local_var_params['kwargs'] if self.api_client.client_side_validation and 'size' in local_var_params and local_var_params['size'] > 100: # noqa: E501 raise ApiValueError("Invalid value for parameter `size` when calling `get_emails_paginated`, must be a value less than or equal to `100`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] if 'inbox_id' in local_var_params and local_var_params['inbox_id'] is not None: # noqa: E501 query_params.append(('inboxId', local_var_params['inbox_id'])) # noqa: E501 collection_formats['inboxId'] = 'multi' # noqa: E501 if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 query_params.append(('page', local_var_params['page'])) # noqa: E501 if 'size' in local_var_params and local_var_params['size'] is not None: # noqa: E501 query_params.append(('size', local_var_params['size'])) # noqa: E501 if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501 query_params.append(('sort', local_var_params['sort'])) # noqa: E501 if 'unread_only' in local_var_params and local_var_params['unread_only'] is not None: # noqa: E501 query_params.append(('unreadOnly', local_var_params['unread_only'])) # noqa: E501 if 'search_filter' in local_var_params and local_var_params['search_filter'] is not None: # noqa: E501 query_params.append(('searchFilter', local_var_params['search_filter'])) # noqa: E501 if 'since' in local_var_params and local_var_params['since'] is not None: # noqa: E501 query_params.append(('since', local_var_params['since'])) # noqa: E501 if 'before' in local_var_params and local_var_params['before'] is not None: # noqa: E501 query_params.append(('before', local_var_params['before'])) # noqa: E501 if 'sync_connectors' in local_var_params and local_var_params['sync_connectors'] is not None: # noqa: E501 query_params.append(('syncConnectors', local_var_params['sync_connectors'])) # noqa: E501 if 'plus_address_id' in local_var_params and local_var_params['plus_address_id'] is not None: # noqa: E501 query_params.append(('plusAddressId', local_var_params['plus_address_id'])) # noqa: E501 if 'favourited' in local_var_params and local_var_params['favourited'] is not None: # noqa: E501 query_params.append(('favourited', local_var_params['favourited'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/emails', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PageEmailProjection', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_gravatar_url_for_email_address(self, email_address, **kwargs): # noqa: E501 """Get Gravatar URL for an email address # noqa: E501 Builds a Gravatar image URL from the provided email address and optional size. This endpoint does not fetch image bytes; it only returns the computed URL. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_gravatar_url_for_email_address(email_address, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_address: (required) :param str size: :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: GravatarUrl If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.get_gravatar_url_for_email_address_with_http_info(email_address, **kwargs) # noqa: E501 def get_gravatar_url_for_email_address_with_http_info(self, email_address, **kwargs): # noqa: E501 """Get Gravatar URL for an email address # noqa: E501 Builds a Gravatar image URL from the provided email address and optional size. This endpoint does not fetch image bytes; it only returns the computed URL. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_gravatar_url_for_email_address_with_http_info(email_address, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_address: (required) :param str size: :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(GravatarUrl, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'email_address', 'size' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_gravatar_url_for_email_address" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'email_address' is set if self.api_client.client_side_validation and ('email_address' not in local_var_params or # noqa: E501 local_var_params['email_address'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `email_address` when calling `get_gravatar_url_for_email_address`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] if 'email_address' in local_var_params and local_var_params['email_address'] is not None: # noqa: E501 query_params.append(('emailAddress', local_var_params['email_address'])) # noqa: E501 if 'size' in local_var_params and local_var_params['size'] is not None: # noqa: E501 query_params.append(('size', local_var_params['size'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/emails/gravatarFor', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='GravatarUrl', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_latest_email(self, **kwargs): # noqa: E501 """Get latest email in all inboxes. Most recently received. # noqa: E501 Returns the most recently received email across all inboxes or an optional subset of inbox IDs. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_latest_email(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param list[str] inbox_ids: Optional set of inboxes to filter by. Only get the latest email from these inbox IDs. If not provided will search across all inboxes :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Email If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.get_latest_email_with_http_info(**kwargs) # noqa: E501 def get_latest_email_with_http_info(self, **kwargs): # noqa: E501 """Get latest email in all inboxes. Most recently received. # noqa: E501 Returns the most recently received email across all inboxes or an optional subset of inbox IDs. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_latest_email_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param list[str] inbox_ids: Optional set of inboxes to filter by. Only get the latest email from these inbox IDs. If not provided will search across all inboxes :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(Email, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'inbox_ids' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_latest_email" % key ) local_var_params[key] = val del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] if 'inbox_ids' in local_var_params and local_var_params['inbox_ids'] is not None: # noqa: E501 query_params.append(('inboxIds', local_var_params['inbox_ids'])) # noqa: E501 collection_formats['inboxIds'] = 'multi' # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/emails/latest', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Email', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_latest_email_in_inbox1(self, inbox_id, **kwargs): # noqa: E501 """Get latest email in an inbox. Use `WaitForController` to get emails that may not have arrived yet. # noqa: E501 Returns the newest email for the specified inbox ID. For polling/wait semantics use wait endpoints. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_latest_email_in_inbox1(inbox_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str inbox_id: ID of the inbox you want to get the latest email from (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Email If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.get_latest_email_in_inbox1_with_http_info(inbox_id, **kwargs) # noqa: E501 def get_latest_email_in_inbox1_with_http_info(self, inbox_id, **kwargs): # noqa: E501 """Get latest email in an inbox. Use `WaitForController` to get emails that may not have arrived yet. # noqa: E501 Returns the newest email for the specified inbox ID. For polling/wait semantics use wait endpoints. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_latest_email_in_inbox1_with_http_info(inbox_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str inbox_id: ID of the inbox you want to get the latest email from (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(Email, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'inbox_id' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_latest_email_in_inbox1" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'inbox_id' is set if self.api_client.client_side_validation and ('inbox_id' not in local_var_params or # noqa: E501 local_var_params['inbox_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `inbox_id` when calling `get_latest_email_in_inbox1`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] if 'inbox_id' in local_var_params and local_var_params['inbox_id'] is not None: # noqa: E501 query_params.append(('inboxId', local_var_params['inbox_id'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/emails/latestIn', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Email', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_organization_emails_paginated(self, **kwargs): # noqa: E501 """List organization-visible emails # noqa: E501 Returns paginated emails visible through organization/team access. Supports inbox filtering, unread-only filtering, search, favourites, plus-address filtering, and optional connector sync. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_organization_emails_paginated(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param list[str] inbox_id: Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account. :param int page: Optional page index in email list pagination :param int size: Optional page size in email list pagination. Maximum size is 100. Use page index and sort to page through larger results :param str sort: Optional createdAt sort direction ASC or DESC :param bool unread_only: Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly :param str search_filter: Optional search filter. Matches email ID, inbox ID, sender address, subject, receiving inbox email address, receiving plus-address full address, or plus-address suffix. Pasted email address tokens are normalized before matching. :param datetime since: Optional filter emails received after given date time. If unset will use time 24hours prior to now. :param datetime before: Optional filter emails received before given date time :param bool sync_connectors: Sync connectors :param bool favourited: Search only favorited emails :param str plus_address_id: Optional plus address ID filter :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PageEmailProjection If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.get_organization_emails_paginated_with_http_info(**kwargs) # noqa: E501 def get_organization_emails_paginated_with_http_info(self, **kwargs): # noqa: E501 """List organization-visible emails # noqa: E501 Returns paginated emails visible through organization/team access. Supports inbox filtering, unread-only filtering, search, favourites, plus-address filtering, and optional connector sync. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_organization_emails_paginated_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param list[str] inbox_id: Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account. :param int page: Optional page index in email list pagination :param int size: Optional page size in email list pagination. Maximum size is 100. Use page index and sort to page through larger results :param str sort: Optional createdAt sort direction ASC or DESC :param bool unread_only: Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly :param str search_filter: Optional search filter. Matches email ID, inbox ID, sender address, subject, receiving inbox email address, receiving plus-address full address, or plus-address suffix. Pasted email address tokens are normalized before matching. :param datetime since: Optional filter emails received after given date time. If unset will use time 24hours prior to now. :param datetime before: Optional filter emails received before given date time :param bool sync_connectors: Sync connectors :param bool favourited: Search only favorited emails :param str plus_address_id: Optional plus address ID filter :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PageEmailProjection, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'inbox_id', 'page', 'size', 'sort', 'unread_only', 'search_filter', 'since', 'before', 'sync_connectors', 'favourited', 'plus_address_id' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_organization_emails_paginated" % key ) local_var_params[key] = val del local_var_params['kwargs'] if self.api_client.client_side_validation and 'size' in local_var_params and local_var_params['size'] > 100: # noqa: E501 raise ApiValueError("Invalid value for parameter `size` when calling `get_organization_emails_paginated`, must be a value less than or equal to `100`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] if 'inbox_id' in local_var_params and local_var_params['inbox_id'] is not None: # noqa: E501 query_params.append(('inboxId', local_var_params['inbox_id'])) # noqa: E501 collection_formats['inboxId'] = 'multi' # noqa: E501 if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 query_params.append(('page', local_var_params['page'])) # noqa: E501 if 'size' in local_var_params and local_var_params['size'] is not None: # noqa: E501 query_params.append(('size', local_var_params['size'])) # noqa: E501 if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501 query_params.append(('sort', local_var_params['sort'])) # noqa: E501 if 'unread_only' in local_var_params and local_var_params['unread_only'] is not None: # noqa: E501 query_params.append(('unreadOnly', local_var_params['unread_only'])) # noqa: E501 if 'search_filter' in local_var_params and local_var_params['search_filter'] is not None: # noqa: E501 query_params.append(('searchFilter', local_var_params['search_filter'])) # noqa: E501 if 'since' in local_var_params and local_var_params['since'] is not None: # noqa: E501 query_params.append(('since', local_var_params['since'])) # noqa: E501 if 'before' in local_var_params and local_var_params['before'] is not None: # noqa: E501 query_params.append(('before', local_var_params['before'])) # noqa: E501 if 'sync_connectors' in local_var_params and local_var_params['sync_connectors'] is not None: # noqa: E501 query_params.append(('syncConnectors', local_var_params['sync_connectors'])) # noqa: E501 if 'favourited' in local_var_params and local_var_params['favourited'] is not None: # noqa: E501 query_params.append(('favourited', local_var_params['favourited'])) # noqa: E501 if 'plus_address_id' in local_var_params and local_var_params['plus_address_id'] is not None: # noqa: E501 query_params.append(('plusAddressId', local_var_params['plus_address_id'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/emails/organization', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PageEmailProjection', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_raw_email_contents(self, email_id, **kwargs): # noqa: E501 """Get raw email string. Returns unparsed raw SMTP message with headers and body. # noqa: E501 Returns the original unparsed SMTP/MIME message as `text/plain`. Use JSON variant if your client expects JSON transport. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_raw_email_contents(email_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_id: ID of email (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.get_raw_email_contents_with_http_info(email_id, **kwargs) # noqa: E501 def get_raw_email_contents_with_http_info(self, email_id, **kwargs): # noqa: E501 """Get raw email string. Returns unparsed raw SMTP message with headers and body. # noqa: E501 Returns the original unparsed SMTP/MIME message as `text/plain`. Use JSON variant if your client expects JSON transport. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_raw_email_contents_with_http_info(email_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_id: ID of email (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'email_id' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_raw_email_contents" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'email_id' is set if self.api_client.client_side_validation and ('email_id' not in local_var_params or # noqa: E501 local_var_params['email_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `email_id` when calling `get_raw_email_contents`") # noqa: E501 collection_formats = {} path_params = {} if 'email_id' in local_var_params: path_params['emailId'] = local_var_params['email_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/emails/{emailId}/raw', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_raw_email_json(self, email_id, **kwargs): # noqa: E501 """Get raw email in JSON. Unparsed SMTP message in JSON wrapper format. # noqa: E501 Returns the original unparsed SMTP/MIME message wrapped in a JSON DTO for API clients that avoid plain-text stream responses. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_raw_email_json(email_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_id: ID of email (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: RawEmailJson If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.get_raw_email_json_with_http_info(email_id, **kwargs) # noqa: E501 def get_raw_email_json_with_http_info(self, email_id, **kwargs): # noqa: E501 """Get raw email in JSON. Unparsed SMTP message in JSON wrapper format. # noqa: E501 Returns the original unparsed SMTP/MIME message wrapped in a JSON DTO for API clients that avoid plain-text stream responses. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_raw_email_json_with_http_info(email_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_id: ID of email (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(RawEmailJson, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'email_id' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_raw_email_json" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'email_id' is set if self.api_client.client_side_validation and ('email_id' not in local_var_params or # noqa: E501 local_var_params['email_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `email_id` when calling `get_raw_email_json`") # noqa: E501 collection_formats = {} path_params = {} if 'email_id' in local_var_params: path_params['emailId'] = local_var_params['email_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/emails/{emailId}/raw/json', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='RawEmailJson', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_unread_email_count(self, **kwargs): # noqa: E501 """Get unread email count # noqa: E501 Returns unread email count. An email is considered read after dashboard/API retrieval depending on your read workflow. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_unread_email_count(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str inbox_id: Inbox ID filter for unread count scope :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: UnreadCount If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.get_unread_email_count_with_http_info(**kwargs) # noqa: E501 def get_unread_email_count_with_http_info(self, **kwargs): # noqa: E501 """Get unread email count # noqa: E501 Returns unread email count. An email is considered read after dashboard/API retrieval depending on your read workflow. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_unread_email_count_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str inbox_id: Inbox ID filter for unread count scope :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(UnreadCount, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'inbox_id' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_unread_email_count" % key ) local_var_params[key] = val del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] if 'inbox_id' in local_var_params and local_var_params['inbox_id'] is not None: # noqa: E501 query_params.append(('inboxId', local_var_params['inbox_id'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/emails/unreadCount', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='UnreadCount', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def mark_all_as_read(self, **kwargs): # noqa: E501 """Mark all emails as read or unread # noqa: E501 Sets read state for all emails, optionally scoped to one inbox. Use `read=false` to reset unread state in bulk. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.mark_all_as_read(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param bool read: What value to assign to email read property. Default true. :param str inbox_id: Optional inbox ID filter :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.mark_all_as_read_with_http_info(**kwargs) # noqa: E501 def mark_all_as_read_with_http_info(self, **kwargs): # noqa: E501 """Mark all emails as read or unread # noqa: E501 Sets read state for all emails, optionally scoped to one inbox. Use `read=false` to reset unread state in bulk. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.mark_all_as_read_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param bool read: What value to assign to email read property. Default true. :param str inbox_id: Optional inbox ID filter :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'read', 'inbox_id' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method mark_all_as_read" % key ) local_var_params[key] = val del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] if 'read' in local_var_params and local_var_params['read'] is not None: # noqa: E501 query_params.append(('read', local_var_params['read'])) # noqa: E501 if 'inbox_id' in local_var_params and local_var_params['inbox_id'] is not None: # noqa: E501 query_params.append(('inboxId', local_var_params['inbox_id'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/emails/read', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def mark_as_read(self, email_id, **kwargs): # noqa: E501 """Mark an email as read or unread # noqa: E501 Sets read state for one email. Useful when implementing custom mailbox workflows that treat viewed messages as unread. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.mark_as_read(email_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_id: (required) :param bool read: What value to assign to email read property. Default true. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: EmailPreview If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.mark_as_read_with_http_info(email_id, **kwargs) # noqa: E501 def mark_as_read_with_http_info(self, email_id, **kwargs): # noqa: E501 """Mark an email as read or unread # noqa: E501 Sets read state for one email. Useful when implementing custom mailbox workflows that treat viewed messages as unread. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.mark_as_read_with_http_info(email_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_id: (required) :param bool read: What value to assign to email read property. Default true. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(EmailPreview, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'email_id', 'read' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method mark_as_read" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'email_id' is set if self.api_client.client_side_validation and ('email_id' not in local_var_params or # noqa: E501 local_var_params['email_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `email_id` when calling `mark_as_read`") # noqa: E501 collection_formats = {} path_params = {} if 'email_id' in local_var_params: path_params['emailId'] = local_var_params['email_id'] # noqa: E501 query_params = [] if 'read' in local_var_params and local_var_params['read'] is not None: # noqa: E501 query_params.append(('read', local_var_params['read'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/emails/{emailId}/read', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='EmailPreview', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def reply_to_email(self, email_id, reply_to_email_options, **kwargs): # noqa: E501 """Reply to an email # noqa: E501 Sends a reply using the original conversation context (subject/thread headers). Reply target resolution honors sender/reply-to semantics. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.reply_to_email(email_id, reply_to_email_options, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_id: ID of the email that should be replied to (required) :param ReplyToEmailOptions reply_to_email_options: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: SentEmailDto If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.reply_to_email_with_http_info(email_id, reply_to_email_options, **kwargs) # noqa: E501 def reply_to_email_with_http_info(self, email_id, reply_to_email_options, **kwargs): # noqa: E501 """Reply to an email # noqa: E501 Sends a reply using the original conversation context (subject/thread headers). Reply target resolution honors sender/reply-to semantics. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.reply_to_email_with_http_info(email_id, reply_to_email_options, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_id: ID of the email that should be replied to (required) :param ReplyToEmailOptions reply_to_email_options: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(SentEmailDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'email_id', 'reply_to_email_options' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method reply_to_email" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'email_id' is set if self.api_client.client_side_validation and ('email_id' not in local_var_params or # noqa: E501 local_var_params['email_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `email_id` when calling `reply_to_email`") # noqa: E501 # verify the required parameter 'reply_to_email_options' is set if self.api_client.client_side_validation and ('reply_to_email_options' not in local_var_params or # noqa: E501 local_var_params['reply_to_email_options'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `reply_to_email_options` when calling `reply_to_email`") # noqa: E501 collection_formats = {} path_params = {} if 'email_id' in local_var_params: path_params['emailId'] = local_var_params['email_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'reply_to_email_options' in local_var_params: body_params = local_var_params['reply_to_email_options'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/emails/{emailId}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='SentEmailDto', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def search_emails(self, search_emails_options, **kwargs): # noqa: E501 """Get all emails by search criteria. Return in paginated form. # noqa: E501 Searches emails by email ID, inbox ID, sender address, subject, receiving inbox address, or receiving plus-address. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.search_emails(search_emails_options, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param SearchEmailsOptions search_emails_options: (required) :param bool sync_connectors: Sync connectors :param bool favourited: Search only favourited emails :param str plus_address_id: Optional plus address ID filter :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PageEmailProjection If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.search_emails_with_http_info(search_emails_options, **kwargs) # noqa: E501 def search_emails_with_http_info(self, search_emails_options, **kwargs): # noqa: E501 """Get all emails by search criteria. Return in paginated form. # noqa: E501 Searches emails by email ID, inbox ID, sender address, subject, receiving inbox address, or receiving plus-address. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.search_emails_with_http_info(search_emails_options, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param SearchEmailsOptions search_emails_options: (required) :param bool sync_connectors: Sync connectors :param bool favourited: Search only favourited emails :param str plus_address_id: Optional plus address ID filter :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PageEmailProjection, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'search_emails_options', 'sync_connectors', 'favourited', 'plus_address_id' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method search_emails" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'search_emails_options' is set if self.api_client.client_side_validation and ('search_emails_options' not in local_var_params or # noqa: E501 local_var_params['search_emails_options'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `search_emails_options` when calling `search_emails`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] if 'sync_connectors' in local_var_params and local_var_params['sync_connectors'] is not None: # noqa: E501 query_params.append(('syncConnectors', local_var_params['sync_connectors'])) # noqa: E501 if 'favourited' in local_var_params and local_var_params['favourited'] is not None: # noqa: E501 query_params.append(('favourited', local_var_params['favourited'])) # noqa: E501 if 'plus_address_id' in local_var_params and local_var_params['plus_address_id'] is not None: # noqa: E501 query_params.append(('plusAddressId', local_var_params['plus_address_id'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None if 'search_emails_options' in local_var_params: body_params = local_var_params['search_emails_options'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/emails/search', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PageEmailProjection', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def send_email_draft(self, draft_id, **kwargs): # noqa: E501 """Send an email draft # noqa: E501 Send a saved draft using the existing inbox send pipeline. The draft is deleted only after the send succeeds. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.send_email_draft(draft_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str draft_id: ID of draft (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: SentEmailDto If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.send_email_draft_with_http_info(draft_id, **kwargs) # noqa: E501 def send_email_draft_with_http_info(self, draft_id, **kwargs): # noqa: E501 """Send an email draft # noqa: E501 Send a saved draft using the existing inbox send pipeline. The draft is deleted only after the send succeeds. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.send_email_draft_with_http_info(draft_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str draft_id: ID of draft (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(SentEmailDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'draft_id' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method send_email_draft" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'draft_id' is set if self.api_client.client_side_validation and ('draft_id' not in local_var_params or # noqa: E501 local_var_params['draft_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `draft_id` when calling `send_email_draft`") # noqa: E501 collection_formats = {} path_params = {} if 'draft_id' in local_var_params: path_params['draftId'] = local_var_params['draft_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/emails/drafts/{draftId}/send', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='SentEmailDto', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def send_email_source_optional(self, send_email_options, **kwargs): # noqa: E501 """Send email # noqa: E501 Sends an email from an existing inbox, or creates a temporary inbox when `inboxId` is not provided. Supports `useDomainPool` and `virtualSend` inbox creation behavior for convenience sends. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.send_email_source_optional(send_email_options, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param SendEmailOptions send_email_options: (required) :param str inbox_id: ID of the inbox you want to send the email from :param bool use_domain_pool: Use domain pool. Optionally create inbox to send from using the mailslurp domain pool. :param bool virtual_send: Optionally create inbox to send from that is a virtual inbox and won't send to external addresses :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.send_email_source_optional_with_http_info(send_email_options, **kwargs) # noqa: E501 def send_email_source_optional_with_http_info(self, send_email_options, **kwargs): # noqa: E501 """Send email # noqa: E501 Sends an email from an existing inbox, or creates a temporary inbox when `inboxId` is not provided. Supports `useDomainPool` and `virtualSend` inbox creation behavior for convenience sends. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.send_email_source_optional_with_http_info(send_email_options, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param SendEmailOptions send_email_options: (required) :param str inbox_id: ID of the inbox you want to send the email from :param bool use_domain_pool: Use domain pool. Optionally create inbox to send from using the mailslurp domain pool. :param bool virtual_send: Optionally create inbox to send from that is a virtual inbox and won't send to external addresses :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'send_email_options', 'inbox_id', 'use_domain_pool', 'virtual_send' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method send_email_source_optional" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'send_email_options' is set if self.api_client.client_side_validation and ('send_email_options' not in local_var_params or # noqa: E501 local_var_params['send_email_options'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `send_email_options` when calling `send_email_source_optional`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] if 'inbox_id' in local_var_params and local_var_params['inbox_id'] is not None: # noqa: E501 query_params.append(('inboxId', local_var_params['inbox_id'])) # noqa: E501 if 'use_domain_pool' in local_var_params and local_var_params['use_domain_pool'] is not None: # noqa: E501 query_params.append(('useDomainPool', local_var_params['use_domain_pool'])) # noqa: E501 if 'virtual_send' in local_var_params and local_var_params['virtual_send'] is not None: # noqa: E501 query_params.append(('virtualSend', local_var_params['virtual_send'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None if 'send_email_options' in local_var_params: body_params = local_var_params['send_email_options'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/emails', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def set_email_favourited(self, email_id, favourited, **kwargs): # noqa: E501 """Set email favourited state # noqa: E501 Sets favourite state for an email for dashboard/search workflows. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.set_email_favourited(email_id, favourited, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_id: ID of email to set favourite state (required) :param bool favourited: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.set_email_favourited_with_http_info(email_id, favourited, **kwargs) # noqa: E501 def set_email_favourited_with_http_info(self, email_id, favourited, **kwargs): # noqa: E501 """Set email favourited state # noqa: E501 Sets favourite state for an email for dashboard/search workflows. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.set_email_favourited_with_http_info(email_id, favourited, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_id: ID of email to set favourite state (required) :param bool favourited: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'email_id', 'favourited' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method set_email_favourited" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'email_id' is set if self.api_client.client_side_validation and ('email_id' not in local_var_params or # noqa: E501 local_var_params['email_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `email_id` when calling `set_email_favourited`") # noqa: E501 # verify the required parameter 'favourited' is set if self.api_client.client_side_validation and ('favourited' not in local_var_params or # noqa: E501 local_var_params['favourited'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `favourited` when calling `set_email_favourited`") # noqa: E501 collection_formats = {} path_params = {} if 'email_id' in local_var_params: path_params['emailId'] = local_var_params['email_id'] # noqa: E501 query_params = [] if 'favourited' in local_var_params and local_var_params['favourited'] is not None: # noqa: E501 query_params.append(('favourited', local_var_params['favourited'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/emails/{emailId}/favourite', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def update_email_draft(self, draft_id, send_email_options, **kwargs): # noqa: E501 """Update an email draft # noqa: E501 Replace the SendEmailOptions stored for a draft. The draft remains attached to its original inbox; create a new draft to use a different inbox. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_email_draft(draft_id, send_email_options, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str draft_id: ID of draft (required) :param SendEmailOptions send_email_options: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: EmailDraftDto If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.update_email_draft_with_http_info(draft_id, send_email_options, **kwargs) # noqa: E501 def update_email_draft_with_http_info(self, draft_id, send_email_options, **kwargs): # noqa: E501 """Update an email draft # noqa: E501 Replace the SendEmailOptions stored for a draft. The draft remains attached to its original inbox; create a new draft to use a different inbox. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_email_draft_with_http_info(draft_id, send_email_options, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str draft_id: ID of draft (required) :param SendEmailOptions send_email_options: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(EmailDraftDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'draft_id', 'send_email_options' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method update_email_draft" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'draft_id' is set if self.api_client.client_side_validation and ('draft_id' not in local_var_params or # noqa: E501 local_var_params['draft_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `draft_id` when calling `update_email_draft`") # noqa: E501 # verify the required parameter 'send_email_options' is set if self.api_client.client_side_validation and ('send_email_options' not in local_var_params or # noqa: E501 local_var_params['send_email_options'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `send_email_options` when calling `update_email_draft`") # noqa: E501 collection_formats = {} path_params = {} if 'draft_id' in local_var_params: path_params['draftId'] = local_var_params['draft_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'send_email_options' in local_var_params: body_params = local_var_params['send_email_options'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/emails/drafts/{draftId}', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='EmailDraftDto', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def validate_email(self, email_id, **kwargs): # noqa: E501 """Validate email HTML contents # noqa: E501 Runs HTML validation on the email body when HTML is present. Non-HTML emails are treated as valid for this check. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.validate_email(email_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_id: ID of email (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: ValidationDto If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.validate_email_with_http_info(email_id, **kwargs) # noqa: E501 def validate_email_with_http_info(self, email_id, **kwargs): # noqa: E501 """Validate email HTML contents # noqa: E501 Runs HTML validation on the email body when HTML is present. Non-HTML emails are treated as valid for this check. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.validate_email_with_http_info(email_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_id: ID of email (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(ValidationDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'email_id' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method validate_email" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'email_id' is set if self.api_client.client_side_validation and ('email_id' not in local_var_params or # noqa: E501 local_var_params['email_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `email_id` when calling `validate_email`") # noqa: E501 collection_formats = {} path_params = {} if 'email_id' in local_var_params: path_params['emailId'] = local_var_params['email_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/emails/{emailId}/validate', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ValidationDto', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)Methods
def apply_imap_flag_operation(self, email_id, imap_flag_operation_options, **kwargs)-
Set IMAP flags associated with a message. Only supports '\Seen' flag. # noqa: E501
Applies RFC3501 IMAP flag operations on a message. Current implementation supports read/unread semantics via the
\\Seenflag only. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True>>> thread = api.apply_imap_flag_operation(email_id, imap_flag_operation_options, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str email_id: (required) :param ImapFlagOperationOptions imap_flag_operation_options: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: EmailPreview If the method is called asynchronously, returns the request thread.
def apply_imap_flag_operation_with_http_info(self, email_id, imap_flag_operation_options, **kwargs)-
Set IMAP flags associated with a message. Only supports '\Seen' flag. # noqa: E501
Applies RFC3501 IMAP flag operations on a message. Current implementation supports read/unread semantics via the
\\Seenflag only. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True>>> thread = api.apply_imap_flag_operation_with_http_info(email_id, imap_flag_operation_options, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str email_id: (required) :param ImapFlagOperationOptions imap_flag_operation_options: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(EmailPreview, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def can_send(self, inbox_id, send_email_options, **kwargs)-
Check whether an email send would be accepted # noqa: E501
Validates sender/inbox context and recipient eligibility before attempting a send. Useful for preflight checks in UI or test workflows. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.can_send(inbox_id, send_email_options, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str inbox_id: ID of the inbox you want to send the email from (required) :param SendEmailOptions send_email_options: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: CanSendEmailResults If the method is called asynchronously, returns the request thread.
def can_send_with_http_info(self, inbox_id, send_email_options, **kwargs)-
Check whether an email send would be accepted # noqa: E501
Validates sender/inbox context and recipient eligibility before attempting a send. Useful for preflight checks in UI or test workflows. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.can_send_with_http_info(inbox_id, send_email_options, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str inbox_id: ID of the inbox you want to send the email from (required) :param SendEmailOptions send_email_options: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(CanSendEmailResults, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def check_email_audit1(self, email_id, **kwargs)-
Run aggregate email audit for a stored email # noqa: E501
Runs the same message-level audit bundle used by the email audit dashboard in one request. Combines content checks, HTML validation, compatibility analysis, and reputation verdict rollup when available. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.check_email_audit1(email_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str email_id: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: EmailAuditAnalysisResult If the method is called asynchronously, returns the request thread.
def check_email_audit1_with_http_info(self, email_id, **kwargs)-
Run aggregate email audit for a stored email # noqa: E501
Runs the same message-level audit bundle used by the email audit dashboard in one request. Combines content checks, HTML validation, compatibility analysis, and reputation verdict rollup when available. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.check_email_audit1_with_http_info(email_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str email_id: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(EmailAuditAnalysisResult, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def check_email_body(self, email_id, **kwargs)-
Check email body for broken links, images, and spelling issues # noqa: E501
Runs content quality checks against hydrated email body content. This endpoint performs outbound HTTP checks for linked resources, so avoid use with sensitive or stateful URLs. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.check_email_body(email_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str email_id: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: CheckEmailBodyResults If the method is called asynchronously, returns the request thread.
def check_email_body_feature_support(self, email_id, **kwargs)-
Check client support for features used in a stored email body # noqa: E501
Detects HTML/CSS features in the target email body and reports compatibility across major email clients and devices. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.check_email_body_feature_support(email_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str email_id: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: CheckEmailBodyFeatureSupportResults If the method is called asynchronously, returns the request thread.
def check_email_body_feature_support_with_http_info(self, email_id, **kwargs)-
Check client support for features used in a stored email body # noqa: E501
Detects HTML/CSS features in the target email body and reports compatibility across major email clients and devices. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.check_email_body_feature_support_with_http_info(email_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str email_id: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(CheckEmailBodyFeatureSupportResults, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def check_email_body_with_http_info(self, email_id, **kwargs)-
Check email body for broken links, images, and spelling issues # noqa: E501
Runs content quality checks against hydrated email body content. This endpoint performs outbound HTTP checks for linked resources, so avoid use with sensitive or stateful URLs. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.check_email_body_with_http_info(email_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str email_id: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(CheckEmailBodyResults, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def check_email_client_support(self, check_email_client_support_options, **kwargs)-
Check email-client support for a provided HTML body # noqa: E501
Evaluates HTML/CSS features in the supplied body and reports support coverage across major email clients and platforms. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.check_email_client_support(check_email_client_support_options, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param CheckEmailClientSupportOptions check_email_client_support_options: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: CheckEmailClientSupportResults If the method is called asynchronously, returns the request thread.
def check_email_client_support_with_http_info(self, check_email_client_support_options, **kwargs)-
Check email-client support for a provided HTML body # noqa: E501
Evaluates HTML/CSS features in the supplied body and reports support coverage across major email clients and platforms. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.check_email_client_support_with_http_info(check_email_client_support_options, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param CheckEmailClientSupportOptions check_email_client_support_options: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(CheckEmailClientSupportResults, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def create_email_audit_for_email(self, email_id, **kwargs)-
Persist aggregate email audit for a stored email # noqa: E501
Runs the aggregate audit bundle for the target email and stores the resulting audit record for later review and history tracking. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.create_email_audit_for_email(email_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str email_id: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: EmailAuditDto If the method is called asynchronously, returns the request thread.
def create_email_audit_for_email_with_http_info(self, email_id, **kwargs)-
Persist aggregate email audit for a stored email # noqa: E501
Runs the aggregate audit bundle for the target email and stores the resulting audit record for later review and history tracking. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.create_email_audit_for_email_with_http_info(email_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str email_id: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(EmailAuditDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def create_email_draft(self, send_email_options, **kwargs)-
Create an email draft # noqa: E501
Create a saved email draft using the same SendEmailOptions shape used for sending. Provide an inboxId query parameter or sendOptions.inboxId to choose the inbox the draft will send from. Draft creation does not send email and does not create a new inbox. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.create_email_draft(send_email_options, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param SendEmailOptions send_email_options: (required) :param str inbox_id: ID of the inbox you want to save the draft against :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: EmailDraftDto If the method is called asynchronously, returns the request thread.
def create_email_draft_with_http_info(self, send_email_options, **kwargs)-
Create an email draft # noqa: E501
Create a saved email draft using the same SendEmailOptions shape used for sending. Provide an inboxId query parameter or sendOptions.inboxId to choose the inbox the draft will send from. Draft creation does not send email and does not create a new inbox. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.create_email_draft_with_http_info(send_email_options, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param SendEmailOptions send_email_options: (required) :param str inbox_id: ID of the inbox you want to save the draft against :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(EmailDraftDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def delete_all_emails(self, **kwargs)-
Delete all emails in all inboxes. # noqa: E501
Deletes all emails for the authenticated account context. This operation is destructive and cannot be undone. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_all_emails(async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param datetime created_at_since: Optional minimum email created-at timestamp to delete from. :param datetime created_at_before: Optional maximum email created-at timestamp to delete through. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread.
def delete_all_emails_with_http_info(self, **kwargs)-
Delete all emails in all inboxes. # noqa: E501
Deletes all emails for the authenticated account context. This operation is destructive and cannot be undone. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_all_emails_with_http_info(async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param datetime created_at_since: Optional minimum email created-at timestamp to delete from. :param datetime created_at_before: Optional maximum email created-at timestamp to delete through. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread.
def delete_email(self, email_id, **kwargs)-
Delete an email # noqa: E501
Deletes a single email from account scope. Operation is destructive and not reversible. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_email(email_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str email_id: ID of email to delete (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread.
def delete_email_draft(self, draft_id, **kwargs)-
Delete an email draft # noqa: E501
Delete a saved email draft without sending it. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_email_draft(draft_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str draft_id: ID of draft (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread.
def delete_email_draft_with_http_info(self, draft_id, **kwargs)-
Delete an email draft # noqa: E501
Delete a saved email draft without sending it. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_email_draft_with_http_info(draft_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str draft_id: ID of draft (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread.
def delete_email_with_http_info(self, email_id, **kwargs)-
Delete an email # noqa: E501
Deletes a single email from account scope. Operation is destructive and not reversible. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_email_with_http_info(email_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str email_id: ID of email to delete (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread.
def download_attachment(self, email_id, attachment_id, **kwargs)-
Get email attachment bytes. Returned as
octet-streamwith content type header. If you have trouble with byte responses try thedownloadAttachmentBase64response endpoints and convert the base 64 encoded content to a file or string. # noqa: E501Returns attachment bytes by attachment ID. Use attachment IDs from email payloads or attachment listing endpoints. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.download_attachment(email_id, attachment_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str email_id: ID of email (required) :param str attachment_id: ID of attachment (required) :param str api_key: Can pass apiKey in url for this request if you wish to download the file in a browser. Content type will be set to original content type of the attachment file. This is so that browsers can download the file correctly. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: str If the method is called asynchronously, returns the request thread.
def download_attachment_base64(self, email_id, attachment_id, **kwargs)-
Get email attachment as base64 encoded string as an alternative to binary responses. Decode the
base64FileContentsas autf-8encoded string or array of bytes depending on thecontentType. # noqa: E501Returns attachment payload as base64 in JSON. Useful for clients that cannot reliably consume binary streaming responses. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.download_attachment_base64(email_id, attachment_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str email_id: ID of email (required) :param str attachment_id: ID of attachment (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: DownloadAttachmentDto If the method is called asynchronously, returns the request thread.
def download_attachment_base64_with_http_info(self, email_id, attachment_id, **kwargs)-
Get email attachment as base64 encoded string as an alternative to binary responses. Decode the
base64FileContentsas autf-8encoded string or array of bytes depending on thecontentType. # noqa: E501Returns attachment payload as base64 in JSON. Useful for clients that cannot reliably consume binary streaming responses. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.download_attachment_base64_with_http_info(email_id, attachment_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str email_id: ID of email (required) :param str attachment_id: ID of attachment (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(DownloadAttachmentDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def download_attachment_with_http_info(self, email_id, attachment_id, **kwargs)-
Get email attachment bytes. Returned as
octet-streamwith content type header. If you have trouble with byte responses try thedownloadAttachmentBase64response endpoints and convert the base 64 encoded content to a file or string. # noqa: E501Returns attachment bytes by attachment ID. Use attachment IDs from email payloads or attachment listing endpoints. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.download_attachment_with_http_info(email_id, attachment_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str email_id: ID of email (required) :param str attachment_id: ID of attachment (required) :param str api_key: Can pass apiKey in url for this request if you wish to download the file in a browser. Content type will be set to original content type of the attachment file. This is so that browsers can download the file correctly. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def download_body(self, email_id, **kwargs)-
Get email body as string. Returned as
plain/textwith content type header. # noqa: E501Returns hydrated email body text as a string with content type aligned to the underlying body format. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.download_body(email_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str email_id: ID of email (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: str If the method is called asynchronously, returns the request thread.
def download_body_bytes(self, email_id, **kwargs)-
Get email body in bytes. Returned as
octet-streamwith content type header. # noqa: E501Streams hydrated email body bytes with content type derived from the message body format. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.download_body_bytes(email_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str email_id: ID of email (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: str If the method is called asynchronously, returns the request thread.
def download_body_bytes_with_http_info(self, email_id, **kwargs)-
Get email body in bytes. Returned as
octet-streamwith content type header. # noqa: E501Streams hydrated email body bytes with content type derived from the message body format. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.download_body_bytes_with_http_info(email_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str email_id: ID of email (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def download_body_with_http_info(self, email_id, **kwargs)-
Get email body as string. Returned as
plain/textwith content type header. # noqa: E501Returns hydrated email body text as a string with content type aligned to the underlying body format. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.download_body_with_http_info(email_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str email_id: ID of email (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def forward_email(self, email_id, forward_email_options, **kwargs)-
Forward email to recipients # noqa: E501
Forwards an existing email to new recipients. Uses the owning inbox context unless overridden by allowed sender options. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.forward_email(email_id, forward_email_options, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str email_id: ID of email (required) :param ForwardEmailOptions forward_email_options: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: SentEmailDto If the method is called asynchronously, returns the request thread.
def forward_email_with_http_info(self, email_id, forward_email_options, **kwargs)-
Forward email to recipients # noqa: E501
Forwards an existing email to new recipients. Uses the owning inbox context unless overridden by allowed sender options. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.forward_email_with_http_info(email_id, forward_email_options, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str email_id: ID of email (required) :param ForwardEmailOptions forward_email_options: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(SentEmailDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def get_attachment_meta_data(self, email_id, attachment_id, **kwargs)-
Get email attachment metadata. This is the
contentTypeandcontentLengthof an attachment. To get the individual attachments use thedownloadAttachmentmethods. # noqa: E501Returns metadata for a specific attachment ID (name, content type, and size fields). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_attachment_meta_data(email_id, attachment_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str email_id: ID of email (required) :param str attachment_id: ID of attachment (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: AttachmentMetaData If the method is called asynchronously, returns the request thread.
def get_attachment_meta_data_with_http_info(self, email_id, attachment_id, **kwargs)-
Get email attachment metadata. This is the
contentTypeandcontentLengthof an attachment. To get the individual attachments use thedownloadAttachmentmethods. # noqa: E501Returns metadata for a specific attachment ID (name, content type, and size fields). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_attachment_meta_data_with_http_info(email_id, attachment_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str email_id: ID of email (required) :param str attachment_id: ID of attachment (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(AttachmentMetaData, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def get_email(self, email_id, **kwargs)-
Get hydrated email (headers and body) # noqa: E501
Returns parsed email content including headers and body fields. Accessing hydrated content may mark the email as read depending on read-state rules. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_email(email_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str email_id: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Email If the method is called asynchronously, returns the request thread.
def get_email_attachments(self, email_id, **kwargs)-
List attachment metadata for an email # noqa: E501
Returns metadata for all attachment IDs associated with the email (name, content type, size, and IDs). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_email_attachments(email_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str email_id: ID of email (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: list[AttachmentMetaData] If the method is called asynchronously, returns the request thread.
def get_email_attachments_with_http_info(self, email_id, **kwargs)-
List attachment metadata for an email # noqa: E501
Returns metadata for all attachment IDs associated with the email (name, content type, size, and IDs). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_email_attachments_with_http_info(email_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str email_id: ID of email (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(list[AttachmentMetaData], status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def get_email_codes(self, email_id, **kwargs)-
Extract verification codes from an email # noqa: E501
Extracts one-time passcodes and similar tokens from email content using the selected extraction method and fallback options. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_email_codes(email_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str email_id: ID of email to extract codes from (required) :param ExtractCodesOptions extract_codes_options: :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: ExtractCodesResult If the method is called asynchronously, returns the request thread.
def get_email_codes_with_http_info(self, email_id, **kwargs)-
Extract verification codes from an email # noqa: E501
Extracts one-time passcodes and similar tokens from email content using the selected extraction method and fallback options. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_email_codes_with_http_info(email_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str email_id: ID of email to extract codes from (required) :param ExtractCodesOptions extract_codes_options: :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(ExtractCodesResult, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def get_email_content_match(self, email_id, content_match_options, **kwargs)-
Run regex against hydrated email body and return matches # noqa: E501
Executes a Java regex pattern over hydrated email body text and returns the full match plus capture groups. Pattern syntax follows Java
Patternrules. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True>>> thread = api.get_email_content_match(email_id, content_match_options, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str email_id: ID of email to match against (required) :param ContentMatchOptions content_match_options: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: EmailContentMatchResult If the method is called asynchronously, returns the request thread.
def get_email_content_match_with_http_info(self, email_id, content_match_options, **kwargs)-
Run regex against hydrated email body and return matches # noqa: E501
Executes a Java regex pattern over hydrated email body text and returns the full match plus capture groups. Pattern syntax follows Java
Patternrules. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True>>> thread = api.get_email_content_match_with_http_info(email_id, content_match_options, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str email_id: ID of email to match against (required) :param ContentMatchOptions content_match_options: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(EmailContentMatchResult, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def get_email_content_part(self, email_id, content_type, **kwargs)-
Get email content part by content type # noqa: E501
Extracts one MIME body part by
contentTypeand optionalindex, returned in a structured DTO with metadata. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True>>> thread = api.get_email_content_part(email_id, content_type, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str email_id: ID of email to match against (required) :param str content_type: Content type (required) :param bool strict: Strict content type match :param int index: Index of content type part if multiple :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: EmailContentPartResult If the method is called asynchronously, returns the request thread.
def get_email_content_part_content(self, email_id, content_type, **kwargs)-
Get multipart content part as raw response # noqa: E501
Extracts one MIME body part by
contentTypeand optionalindex, and returns raw content with matching response content type when valid. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True>>> thread = api.get_email_content_part_content(email_id, content_type, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str email_id: ID of email to match against (required) :param str content_type: Content type (required) :param bool strict: Strict content type match :param int index: Index of content type part if multiple. Starts from 0 and applies to the result list after selecting for your content type. Content type parts are sorted by order found in original MIME message. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: str If the method is called asynchronously, returns the request thread.
def get_email_content_part_content_with_http_info(self, email_id, content_type, **kwargs)-
Get multipart content part as raw response # noqa: E501
Extracts one MIME body part by
contentTypeand optionalindex, and returns raw content with matching response content type when valid. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True>>> thread = api.get_email_content_part_content_with_http_info(email_id, content_type, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str email_id: ID of email to match against (required) :param str content_type: Content type (required) :param bool strict: Strict content type match :param int index: Index of content type part if multiple. Starts from 0 and applies to the result list after selecting for your content type. Content type parts are sorted by order found in original MIME message. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def get_email_content_part_with_http_info(self, email_id, content_type, **kwargs)-
Get email content part by content type # noqa: E501
Extracts one MIME body part by
contentTypeand optionalindex, returned in a structured DTO with metadata. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True>>> thread = api.get_email_content_part_with_http_info(email_id, content_type, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str email_id: ID of email to match against (required) :param str content_type: Content type (required) :param bool strict: Strict content type match :param int index: Index of content type part if multiple :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(EmailContentPartResult, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def get_email_count(self, **kwargs)-
Get email count # noqa: E501
Returns total email count for the authenticated user, or count scoped to a specific inbox when
inboxIdis provided. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True>>> thread = api.get_email_count(async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str inbox_id: :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: CountDto If the method is called asynchronously, returns the request thread.
def get_email_count_with_http_info(self, **kwargs)-
Get email count # noqa: E501
Returns total email count for the authenticated user, or count scoped to a specific inbox when
inboxIdis provided. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True>>> thread = api.get_email_count_with_http_info(async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str inbox_id: :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(CountDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def get_email_draft(self, draft_id, **kwargs)-
Get an email draft # noqa: E501
Get a saved email draft including the full SendEmailOptions payload. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_email_draft(draft_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str draft_id: ID of draft (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: EmailDraftDto If the method is called asynchronously, returns the request thread.
def get_email_draft_with_http_info(self, draft_id, **kwargs)-
Get an email draft # noqa: E501
Get a saved email draft including the full SendEmailOptions payload. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_email_draft_with_http_info(draft_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str draft_id: ID of draft (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(EmailDraftDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def get_email_drafts(self, **kwargs)-
List email drafts # noqa: E501
List saved email drafts for the authenticated user, optionally filtered by inbox. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_email_drafts(async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str inbox_id: Optional inbox filter :param int page: Optional page index in draft pagination :param int size: Optional page size in draft pagination :param str sort: Optional createdAt sort direction ASC or DESC :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PageEmailDraftProjection If the method is called asynchronously, returns the request thread.
def get_email_drafts_with_http_info(self, **kwargs)-
List email drafts # noqa: E501
List saved email drafts for the authenticated user, optionally filtered by inbox. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_email_drafts_with_http_info(async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str inbox_id: Optional inbox filter :param int page: Optional page index in draft pagination :param int size: Optional page size in draft pagination :param str sort: Optional createdAt sort direction ASC or DESC :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PageEmailDraftProjection, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def get_email_html(self, email_id, **kwargs)-
Get hydrated email HTML for browser rendering # noqa: E501
Returns hydrated HTML body directly with
text/htmlcontent type. Supports temporary access/browser usage and optional CID replacement for inline asset rendering. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True>>> thread = api.get_email_html(email_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str email_id: (required) :param bool replace_cid_images: :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: str If the method is called asynchronously, returns the request thread.
def get_email_html_json(self, email_id, **kwargs)-
Get hydrated email HTML wrapped in JSON # noqa: E501
Returns hydrated HTML body and subject in a JSON DTO. Useful for API clients that need structured response payloads instead of raw HTML responses. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_email_html_json(email_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str email_id: (required) :param bool replace_cid_images: :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: EmailHtmlDto If the method is called asynchronously, returns the request thread.
def get_email_html_json_with_http_info(self, email_id, **kwargs)-
Get hydrated email HTML wrapped in JSON # noqa: E501
Returns hydrated HTML body and subject in a JSON DTO. Useful for API clients that need structured response payloads instead of raw HTML responses. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_email_html_json_with_http_info(email_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str email_id: (required) :param bool replace_cid_images: :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(EmailHtmlDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def get_email_html_query(self, email_id, html_selector, **kwargs)-
Query hydrated HTML body and return matching text lines # noqa: E501
Applies a JSoup/CSS selector to hydrated HTML email body and returns matching text lines. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_email_html_query(email_id, html_selector, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str email_id: ID of email to perform HTML query on (required) :param str html_selector: HTML selector to search for. Uses JQuery/JSoup/CSS style selector like '.my-div' to match content. See https://jsoup.org/apidocs/org/jsoup/select/Selector.html for more information. (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: EmailTextLinesResult If the method is called asynchronously, returns the request thread.
def get_email_html_query_with_http_info(self, email_id, html_selector, **kwargs)-
Query hydrated HTML body and return matching text lines # noqa: E501
Applies a JSoup/CSS selector to hydrated HTML email body and returns matching text lines. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_email_html_query_with_http_info(email_id, html_selector, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str email_id: ID of email to perform HTML query on (required) :param str html_selector: HTML selector to search for. Uses JQuery/JSoup/CSS style selector like '.my-div' to match content. See https://jsoup.org/apidocs/org/jsoup/select/Selector.html for more information. (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(EmailTextLinesResult, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def get_email_html_with_http_info(self, email_id, **kwargs)-
Get hydrated email HTML for browser rendering # noqa: E501
Returns hydrated HTML body directly with
text/htmlcontent type. Supports temporary access/browser usage and optional CID replacement for inline asset rendering. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True>>> thread = api.get_email_html_with_http_info(email_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str email_id: (required) :param bool replace_cid_images: :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def get_email_links(self, email_id, **kwargs)-
Extract links from an email HTML body # noqa: E501
Parses HTML content and extracts link URLs (
href). For non-HTML emails this endpoint returns a validation error. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True>>> thread = api.get_email_links(email_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str email_id: ID of email to fetch text for (required) :param str selector: Optional HTML query selector for links :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: EmailLinksResult If the method is called asynchronously, returns the request thread.
def get_email_links_with_http_info(self, email_id, **kwargs)-
Extract links from an email HTML body # noqa: E501
Parses HTML content and extracts link URLs (
href). For non-HTML emails this endpoint returns a validation error. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True>>> thread = api.get_email_links_with_http_info(email_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str email_id: ID of email to fetch text for (required) :param str selector: Optional HTML query selector for links :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(EmailLinksResult, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def get_email_preview_html(self, email_id, **kwargs)-
Get deprecated server-normalized email preview HTML # noqa: E501
Returns a server-normalized preview document with active content removed and restrictive browser metadata. This representation can normalize malformed email layout and is deprecated for fidelity-sensitive rendering. Fetch the original HTML source and apply link hardening inside an opaque-origin browser sandbox instead. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_email_preview_html(email_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str email_id: (required) :param bool replace_cid_images: :param str link_behavior: :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: EmailPreviewHtmlDto If the method is called asynchronously, returns the request thread.
def get_email_preview_html_with_http_info(self, email_id, **kwargs)-
Get deprecated server-normalized email preview HTML # noqa: E501
Returns a server-normalized preview document with active content removed and restrictive browser metadata. This representation can normalize malformed email layout and is deprecated for fidelity-sensitive rendering. Fetch the original HTML source and apply link hardening inside an opaque-origin browser sandbox instead. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_email_preview_html_with_http_info(email_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str email_id: (required) :param bool replace_cid_images: :param str link_behavior: :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(EmailPreviewHtmlDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def get_email_preview_ur_ls(self, email_id, **kwargs)-
Get email URLs for viewing in browser or downloading # noqa: E501
Returns precomputed URLs for preview and raw message access for the specified email. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_email_preview_ur_ls(email_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str email_id: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: EmailPreviewUrls If the method is called asynchronously, returns the request thread.
def get_email_preview_ur_ls_with_http_info(self, email_id, **kwargs)-
Get email URLs for viewing in browser or downloading # noqa: E501
Returns precomputed URLs for preview and raw message access for the specified email. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_email_preview_ur_ls_with_http_info(email_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str email_id: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(EmailPreviewUrls, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def get_email_screenshot_as_base64(self, email_id, get_email_screenshot_options, **kwargs)-
Take a screenshot of an email in a browser and return base64 encoded string # noqa: E501
Renders the email in a browser engine and returns PNG data as base64. Useful for APIs and dashboards that cannot easily stream binary responses. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_email_screenshot_as_base64(email_id, get_email_screenshot_options, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str email_id: (required) :param GetEmailScreenshotOptions get_email_screenshot_options: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: EmailScreenshotResult If the method is called asynchronously, returns the request thread.
def get_email_screenshot_as_base64_with_http_info(self, email_id, get_email_screenshot_options, **kwargs)-
Take a screenshot of an email in a browser and return base64 encoded string # noqa: E501
Renders the email in a browser engine and returns PNG data as base64. Useful for APIs and dashboards that cannot easily stream binary responses. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_email_screenshot_as_base64_with_http_info(email_id, get_email_screenshot_options, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str email_id: (required) :param GetEmailScreenshotOptions get_email_screenshot_options: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(EmailScreenshotResult, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def get_email_screenshot_as_binary(self, email_id, get_email_screenshot_options, **kwargs)-
Take a screenshot of an email in a browser # noqa: E501
Renders the email in a browser engine and returns PNG bytes. Intended for visual QA and rendering regression checks. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_email_screenshot_as_binary(email_id, get_email_screenshot_options, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str email_id: (required) :param GetEmailScreenshotOptions get_email_screenshot_options: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread.
def get_email_screenshot_as_binary_with_http_info(self, email_id, get_email_screenshot_options, **kwargs)-
Take a screenshot of an email in a browser # noqa: E501
Renders the email in a browser engine and returns PNG bytes. Intended for visual QA and rendering regression checks. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_email_screenshot_as_binary_with_http_info(email_id, get_email_screenshot_options, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str email_id: (required) :param GetEmailScreenshotOptions get_email_screenshot_options: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread.
def get_email_signature(self, email_id, **kwargs)-
Extract signature from an inbound email # noqa: E501
Attempts to parse a sender signature block from an email body. Uses raw MIME content parts when possible and falls back to hydrated body parsing. This is heuristic and may not be accurate for all email clients or formats. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_email_signature(email_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str email_id: ID of email to extract signature from (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: EmailSignatureParseResult If the method is called asynchronously, returns the request thread.
def get_email_signature_with_http_info(self, email_id, **kwargs)-
Extract signature from an inbound email # noqa: E501
Attempts to parse a sender signature block from an email body. Uses raw MIME content parts when possible and falls back to hydrated body parsing. This is heuristic and may not be accurate for all email clients or formats. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_email_signature_with_http_info(email_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str email_id: ID of email to extract signature from (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(EmailSignatureParseResult, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def get_email_summary(self, email_id, **kwargs)-
Get email summary (headers/metadata only) # noqa: E501
Returns lightweight metadata and headers for an email. Use
getEmailfor hydrated body content orgetRawEmailfor original SMTP content. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True>>> thread = api.get_email_summary(email_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str email_id: (required) :param bool decode: Deprecated and ignored. Retained for backwards compatibility. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: EmailPreview If the method is called asynchronously, returns the request thread.
def get_email_summary_with_http_info(self, email_id, **kwargs)-
Get email summary (headers/metadata only) # noqa: E501
Returns lightweight metadata and headers for an email. Use
getEmailfor hydrated body content orgetRawEmailfor original SMTP content. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True>>> thread = api.get_email_summary_with_http_info(email_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str email_id: (required) :param bool decode: Deprecated and ignored. Retained for backwards compatibility. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(EmailPreview, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def get_email_text_lines(self, email_id, **kwargs)-
Extract normalized text lines from email body # noqa: E501
Converts email body content to line-based plain text with optional HTML entity decoding and custom line separator. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_email_text_lines(email_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str email_id: ID of email to fetch text for (required) :param bool decode_html_entities: Decode HTML entities :param str line_separator: Line separator character :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: EmailTextLinesResult If the method is called asynchronously, returns the request thread.
def get_email_text_lines_with_http_info(self, email_id, **kwargs)-
Extract normalized text lines from email body # noqa: E501
Converts email body content to line-based plain text with optional HTML entity decoding and custom line separator. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_email_text_lines_with_http_info(email_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str email_id: ID of email to fetch text for (required) :param bool decode_html_entities: Decode HTML entities :param str line_separator: Line separator character :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(EmailTextLinesResult, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def get_email_thread(self, thread_id, **kwargs)-
Get email thread metadata by thread ID # noqa: E501
Returns thread metadata built from RFC 5322
Message-ID,In-Reply-To, andReferencesheaders. UsegetEmailThreadItemsto fetch the thread messages. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True>>> thread = api.get_email_thread(thread_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str thread_id: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: EmailThreadDto If the method is called asynchronously, returns the request thread.
def get_email_thread_items(self, thread_id, **kwargs)-
Get messages in a specific email thread # noqa: E501
Returns all messages in a thread ordered by
createdAtusing the requested sort direction. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True>>> thread = api.get_email_thread_items(thread_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str thread_id: (required) :param str sort: Optional createdAt sort direction ASC or DESC :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: EmailThreadItemsDto If the method is called asynchronously, returns the request thread.
def get_email_thread_items_with_http_info(self, thread_id, **kwargs)-
Get messages in a specific email thread # noqa: E501
Returns all messages in a thread ordered by
createdAtusing the requested sort direction. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True>>> thread = api.get_email_thread_items_with_http_info(thread_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str thread_id: (required) :param str sort: Optional createdAt sort direction ASC or DESC :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(EmailThreadItemsDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def get_email_thread_with_http_info(self, thread_id, **kwargs)-
Get email thread metadata by thread ID # noqa: E501
Returns thread metadata built from RFC 5322
Message-ID,In-Reply-To, andReferencesheaders. UsegetEmailThreadItemsto fetch the thread messages. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True>>> thread = api.get_email_thread_with_http_info(thread_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str thread_id: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(EmailThreadDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def get_email_threads(self, **kwargs)-
List email threads in paginated form # noqa: E501
Lists conversation threads inferred from
Message-ID,In-Reply-To, andReferences. Supports filtering by inbox, search text, and time range. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True>>> thread = api.get_email_threads(async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str html_selector: Optional inbox filter. Query parameter name is
htmlSelectorfor legacy compatibility. :param str inbox_id: Optional inbox filter. :param int page: Optional page index in email thread pagination :param int size: Optional page size in email thread pagination. Maximum size is 100. Use page index and sort to page through larger results :param str sort: Optional createdAt sort direction ASC or DESC :param str search_filter: Optional search filter search filter for email threads. :param datetime since: Optional filter email threads created since time :param datetime before: Optional filter emails threads created before given date time :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PageEmailThreadProjection If the method is called asynchronously, returns the request thread. def get_email_threads_with_http_info(self, **kwargs)-
List email threads in paginated form # noqa: E501
Lists conversation threads inferred from
Message-ID,In-Reply-To, andReferences. Supports filtering by inbox, search text, and time range. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True>>> thread = api.get_email_threads_with_http_info(async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str html_selector: Optional inbox filter. Query parameter name is
htmlSelectorfor legacy compatibility. :param str inbox_id: Optional inbox filter. :param int page: Optional page index in email thread pagination :param int size: Optional page size in email thread pagination. Maximum size is 100. Use page index and sort to page through larger results :param str sort: Optional createdAt sort direction ASC or DESC :param str search_filter: Optional search filter search filter for email threads. :param datetime since: Optional filter email threads created since time :param datetime before: Optional filter emails threads created before given date time :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PageEmailThreadProjection, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. def get_email_with_http_info(self, email_id, **kwargs)-
Get hydrated email (headers and body) # noqa: E501
Returns parsed email content including headers and body fields. Accessing hydrated content may mark the email as read depending on read-state rules. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_email_with_http_info(email_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str email_id: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(Email, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def get_emails_offset_paginated(self, **kwargs)-
Get all emails in all inboxes in paginated form. Email API list all. # noqa: E501
Offset-style pagination endpoint for listing emails across inboxes. Supports inbox filters, unread-only, search, date boundaries, favourites, connector sync, plus-address filtering, and explicit include IDs. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_emails_offset_paginated(async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param list[str] inbox_id: Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account. :param int page: Optional page index in email list pagination :param int size: Optional page size in email list pagination. Maximum size is 100. Use page index and sort to page through larger results :param str sort: Optional createdAt sort direction ASC or DESC :param bool unread_only: Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly :param str search_filter: Optional search filter. Matches email ID, inbox ID, sender address, subject, receiving inbox email address, receiving plus-address full address, or plus-address suffix. Pasted email address tokens are normalized before matching. :param datetime since: Optional filter emails received after given date time :param datetime before: Optional filter emails received before given date time :param bool favourited: Optional filter emails that are favourited :param bool sync_connectors: Sync connectors :param str plus_address_id: Optional plus address ID filter :param list[str] include: Optional list of IDs to include in result :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PageEmailProjection If the method is called asynchronously, returns the request thread.
def get_emails_offset_paginated_with_http_info(self, **kwargs)-
Get all emails in all inboxes in paginated form. Email API list all. # noqa: E501
Offset-style pagination endpoint for listing emails across inboxes. Supports inbox filters, unread-only, search, date boundaries, favourites, connector sync, plus-address filtering, and explicit include IDs. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_emails_offset_paginated_with_http_info(async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param list[str] inbox_id: Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account. :param int page: Optional page index in email list pagination :param int size: Optional page size in email list pagination. Maximum size is 100. Use page index and sort to page through larger results :param str sort: Optional createdAt sort direction ASC or DESC :param bool unread_only: Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly :param str search_filter: Optional search filter. Matches email ID, inbox ID, sender address, subject, receiving inbox email address, receiving plus-address full address, or plus-address suffix. Pasted email address tokens are normalized before matching. :param datetime since: Optional filter emails received after given date time :param datetime before: Optional filter emails received before given date time :param bool favourited: Optional filter emails that are favourited :param bool sync_connectors: Sync connectors :param str plus_address_id: Optional plus address ID filter :param list[str] include: Optional list of IDs to include in result :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PageEmailProjection, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def get_emails_paginated(self, **kwargs)-
Get all emails in all inboxes in paginated form. Email API list all. # noqa: E501
Primary paginated email listing endpoint. Returns emails across inboxes with support for inbox filters, unread-only, search, date boundaries, favourites, connector sync, and plus-address filtering. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_emails_paginated(async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param list[str] inbox_id: Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account. :param int page: Optional page index in email list pagination :param int size: Optional page size in email list pagination. Maximum size is 100. Use page index and sort to page through larger results :param str sort: Optional createdAt sort direction ASC or DESC :param bool unread_only: Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly :param str search_filter: Optional search filter. Matches email ID, inbox ID, sender address, subject, receiving inbox email address, receiving plus-address full address, or plus-address suffix. Pasted email address tokens are normalized before matching. :param datetime since: Optional filter emails received after given date time. If unset will use time 24hours prior to now. :param datetime before: Optional filter emails received before given date time :param bool sync_connectors: Sync connectors :param str plus_address_id: Optional plus address ID filter :param bool favourited: Optional filter emails that are favourited :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PageEmailProjection If the method is called asynchronously, returns the request thread.
def get_emails_paginated_with_http_info(self, **kwargs)-
Get all emails in all inboxes in paginated form. Email API list all. # noqa: E501
Primary paginated email listing endpoint. Returns emails across inboxes with support for inbox filters, unread-only, search, date boundaries, favourites, connector sync, and plus-address filtering. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_emails_paginated_with_http_info(async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param list[str] inbox_id: Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account. :param int page: Optional page index in email list pagination :param int size: Optional page size in email list pagination. Maximum size is 100. Use page index and sort to page through larger results :param str sort: Optional createdAt sort direction ASC or DESC :param bool unread_only: Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly :param str search_filter: Optional search filter. Matches email ID, inbox ID, sender address, subject, receiving inbox email address, receiving plus-address full address, or plus-address suffix. Pasted email address tokens are normalized before matching. :param datetime since: Optional filter emails received after given date time. If unset will use time 24hours prior to now. :param datetime before: Optional filter emails received before given date time :param bool sync_connectors: Sync connectors :param str plus_address_id: Optional plus address ID filter :param bool favourited: Optional filter emails that are favourited :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PageEmailProjection, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def get_gravatar_url_for_email_address(self, email_address, **kwargs)-
Get Gravatar URL for an email address # noqa: E501
Builds a Gravatar image URL from the provided email address and optional size. This endpoint does not fetch image bytes; it only returns the computed URL. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_gravatar_url_for_email_address(email_address, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str email_address: (required) :param str size: :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: GravatarUrl If the method is called asynchronously, returns the request thread.
def get_gravatar_url_for_email_address_with_http_info(self, email_address, **kwargs)-
Get Gravatar URL for an email address # noqa: E501
Builds a Gravatar image URL from the provided email address and optional size. This endpoint does not fetch image bytes; it only returns the computed URL. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_gravatar_url_for_email_address_with_http_info(email_address, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str email_address: (required) :param str size: :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(GravatarUrl, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def get_latest_email(self, **kwargs)-
Get latest email in all inboxes. Most recently received. # noqa: E501
Returns the most recently received email across all inboxes or an optional subset of inbox IDs. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_latest_email(async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param list[str] inbox_ids: Optional set of inboxes to filter by. Only get the latest email from these inbox IDs. If not provided will search across all inboxes :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Email If the method is called asynchronously, returns the request thread.
def get_latest_email_in_inbox1(self, inbox_id, **kwargs)-
Get latest email in an inbox. Use
WaitForControllerto get emails that may not have arrived yet. # noqa: E501Returns the newest email for the specified inbox ID. For polling/wait semantics use wait endpoints. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_latest_email_in_inbox1(inbox_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str inbox_id: ID of the inbox you want to get the latest email from (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Email If the method is called asynchronously, returns the request thread.
def get_latest_email_in_inbox1_with_http_info(self, inbox_id, **kwargs)-
Get latest email in an inbox. Use
WaitForControllerto get emails that may not have arrived yet. # noqa: E501Returns the newest email for the specified inbox ID. For polling/wait semantics use wait endpoints. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_latest_email_in_inbox1_with_http_info(inbox_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str inbox_id: ID of the inbox you want to get the latest email from (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(Email, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def get_latest_email_with_http_info(self, **kwargs)-
Get latest email in all inboxes. Most recently received. # noqa: E501
Returns the most recently received email across all inboxes or an optional subset of inbox IDs. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_latest_email_with_http_info(async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param list[str] inbox_ids: Optional set of inboxes to filter by. Only get the latest email from these inbox IDs. If not provided will search across all inboxes :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(Email, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def get_organization_emails_paginated(self, **kwargs)-
List organization-visible emails # noqa: E501
Returns paginated emails visible through organization/team access. Supports inbox filtering, unread-only filtering, search, favourites, plus-address filtering, and optional connector sync. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_organization_emails_paginated(async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param list[str] inbox_id: Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account. :param int page: Optional page index in email list pagination :param int size: Optional page size in email list pagination. Maximum size is 100. Use page index and sort to page through larger results :param str sort: Optional createdAt sort direction ASC or DESC :param bool unread_only: Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly :param str search_filter: Optional search filter. Matches email ID, inbox ID, sender address, subject, receiving inbox email address, receiving plus-address full address, or plus-address suffix. Pasted email address tokens are normalized before matching. :param datetime since: Optional filter emails received after given date time. If unset will use time 24hours prior to now. :param datetime before: Optional filter emails received before given date time :param bool sync_connectors: Sync connectors :param bool favourited: Search only favorited emails :param str plus_address_id: Optional plus address ID filter :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PageEmailProjection If the method is called asynchronously, returns the request thread.
def get_organization_emails_paginated_with_http_info(self, **kwargs)-
List organization-visible emails # noqa: E501
Returns paginated emails visible through organization/team access. Supports inbox filtering, unread-only filtering, search, favourites, plus-address filtering, and optional connector sync. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_organization_emails_paginated_with_http_info(async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param list[str] inbox_id: Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account. :param int page: Optional page index in email list pagination :param int size: Optional page size in email list pagination. Maximum size is 100. Use page index and sort to page through larger results :param str sort: Optional createdAt sort direction ASC or DESC :param bool unread_only: Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly :param str search_filter: Optional search filter. Matches email ID, inbox ID, sender address, subject, receiving inbox email address, receiving plus-address full address, or plus-address suffix. Pasted email address tokens are normalized before matching. :param datetime since: Optional filter emails received after given date time. If unset will use time 24hours prior to now. :param datetime before: Optional filter emails received before given date time :param bool sync_connectors: Sync connectors :param bool favourited: Search only favorited emails :param str plus_address_id: Optional plus address ID filter :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PageEmailProjection, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def get_raw_email_contents(self, email_id, **kwargs)-
Get raw email string. Returns unparsed raw SMTP message with headers and body. # noqa: E501
Returns the original unparsed SMTP/MIME message as
text/plain. Use JSON variant if your client expects JSON transport. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True>>> thread = api.get_raw_email_contents(email_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str email_id: ID of email (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread.
def get_raw_email_contents_with_http_info(self, email_id, **kwargs)-
Get raw email string. Returns unparsed raw SMTP message with headers and body. # noqa: E501
Returns the original unparsed SMTP/MIME message as
text/plain. Use JSON variant if your client expects JSON transport. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True>>> thread = api.get_raw_email_contents_with_http_info(email_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str email_id: ID of email (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread.
def get_raw_email_json(self, email_id, **kwargs)-
Get raw email in JSON. Unparsed SMTP message in JSON wrapper format. # noqa: E501
Returns the original unparsed SMTP/MIME message wrapped in a JSON DTO for API clients that avoid plain-text stream responses. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_raw_email_json(email_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str email_id: ID of email (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: RawEmailJson If the method is called asynchronously, returns the request thread.
def get_raw_email_json_with_http_info(self, email_id, **kwargs)-
Get raw email in JSON. Unparsed SMTP message in JSON wrapper format. # noqa: E501
Returns the original unparsed SMTP/MIME message wrapped in a JSON DTO for API clients that avoid plain-text stream responses. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_raw_email_json_with_http_info(email_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str email_id: ID of email (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(RawEmailJson, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def get_unread_email_count(self, **kwargs)-
Get unread email count # noqa: E501
Returns unread email count. An email is considered read after dashboard/API retrieval depending on your read workflow. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_unread_email_count(async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str inbox_id: Inbox ID filter for unread count scope :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: UnreadCount If the method is called asynchronously, returns the request thread.
def get_unread_email_count_with_http_info(self, **kwargs)-
Get unread email count # noqa: E501
Returns unread email count. An email is considered read after dashboard/API retrieval depending on your read workflow. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_unread_email_count_with_http_info(async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str inbox_id: Inbox ID filter for unread count scope :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(UnreadCount, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def mark_all_as_read(self, **kwargs)-
Mark all emails as read or unread # noqa: E501
Sets read state for all emails, optionally scoped to one inbox. Use
read=falseto reset unread state in bulk. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True>>> thread = api.mark_all_as_read(async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param bool read: What value to assign to email read property. Default true. :param str inbox_id: Optional inbox ID filter :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread.
def mark_all_as_read_with_http_info(self, **kwargs)-
Mark all emails as read or unread # noqa: E501
Sets read state for all emails, optionally scoped to one inbox. Use
read=falseto reset unread state in bulk. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True>>> thread = api.mark_all_as_read_with_http_info(async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param bool read: What value to assign to email read property. Default true. :param str inbox_id: Optional inbox ID filter :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread.
def mark_as_read(self, email_id, **kwargs)-
Mark an email as read or unread # noqa: E501
Sets read state for one email. Useful when implementing custom mailbox workflows that treat viewed messages as unread. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.mark_as_read(email_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str email_id: (required) :param bool read: What value to assign to email read property. Default true. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: EmailPreview If the method is called asynchronously, returns the request thread.
def mark_as_read_with_http_info(self, email_id, **kwargs)-
Mark an email as read or unread # noqa: E501
Sets read state for one email. Useful when implementing custom mailbox workflows that treat viewed messages as unread. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.mark_as_read_with_http_info(email_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str email_id: (required) :param bool read: What value to assign to email read property. Default true. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(EmailPreview, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def reply_to_email(self, email_id, reply_to_email_options, **kwargs)-
Reply to an email # noqa: E501
Sends a reply using the original conversation context (subject/thread headers). Reply target resolution honors sender/reply-to semantics. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.reply_to_email(email_id, reply_to_email_options, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str email_id: ID of the email that should be replied to (required) :param ReplyToEmailOptions reply_to_email_options: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: SentEmailDto If the method is called asynchronously, returns the request thread.
def reply_to_email_with_http_info(self, email_id, reply_to_email_options, **kwargs)-
Reply to an email # noqa: E501
Sends a reply using the original conversation context (subject/thread headers). Reply target resolution honors sender/reply-to semantics. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.reply_to_email_with_http_info(email_id, reply_to_email_options, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str email_id: ID of the email that should be replied to (required) :param ReplyToEmailOptions reply_to_email_options: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(SentEmailDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def search_emails(self, search_emails_options, **kwargs)-
Get all emails by search criteria. Return in paginated form. # noqa: E501
Searches emails by email ID, inbox ID, sender address, subject, receiving inbox address, or receiving plus-address. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.search_emails(search_emails_options, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param SearchEmailsOptions search_emails_options: (required) :param bool sync_connectors: Sync connectors :param bool favourited: Search only favourited emails :param str plus_address_id: Optional plus address ID filter :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PageEmailProjection If the method is called asynchronously, returns the request thread.
def search_emails_with_http_info(self, search_emails_options, **kwargs)-
Get all emails by search criteria. Return in paginated form. # noqa: E501
Searches emails by email ID, inbox ID, sender address, subject, receiving inbox address, or receiving plus-address. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.search_emails_with_http_info(search_emails_options, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param SearchEmailsOptions search_emails_options: (required) :param bool sync_connectors: Sync connectors :param bool favourited: Search only favourited emails :param str plus_address_id: Optional plus address ID filter :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PageEmailProjection, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def send_email_draft(self, draft_id, **kwargs)-
Send an email draft # noqa: E501
Send a saved draft using the existing inbox send pipeline. The draft is deleted only after the send succeeds. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.send_email_draft(draft_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str draft_id: ID of draft (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: SentEmailDto If the method is called asynchronously, returns the request thread.
def send_email_draft_with_http_info(self, draft_id, **kwargs)-
Send an email draft # noqa: E501
Send a saved draft using the existing inbox send pipeline. The draft is deleted only after the send succeeds. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.send_email_draft_with_http_info(draft_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str draft_id: ID of draft (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(SentEmailDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def send_email_source_optional(self, send_email_options, **kwargs)-
Send email # noqa: E501
Sends an email from an existing inbox, or creates a temporary inbox when
inboxIdis not provided. SupportsuseDomainPoolandvirtualSendinbox creation behavior for convenience sends. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True>>> thread = api.send_email_source_optional(send_email_options, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param SendEmailOptions send_email_options: (required) :param str inbox_id: ID of the inbox you want to send the email from :param bool use_domain_pool: Use domain pool. Optionally create inbox to send from using the mailslurp domain pool. :param bool virtual_send: Optionally create inbox to send from that is a virtual inbox and won't send to external addresses :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread.
def send_email_source_optional_with_http_info(self, send_email_options, **kwargs)-
Send email # noqa: E501
Sends an email from an existing inbox, or creates a temporary inbox when
inboxIdis not provided. SupportsuseDomainPoolandvirtualSendinbox creation behavior for convenience sends. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True>>> thread = api.send_email_source_optional_with_http_info(send_email_options, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param SendEmailOptions send_email_options: (required) :param str inbox_id: ID of the inbox you want to send the email from :param bool use_domain_pool: Use domain pool. Optionally create inbox to send from using the mailslurp domain pool. :param bool virtual_send: Optionally create inbox to send from that is a virtual inbox and won't send to external addresses :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread.
def set_email_favourited(self, email_id, favourited, **kwargs)-
Set email favourited state # noqa: E501
Sets favourite state for an email for dashboard/search workflows. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.set_email_favourited(email_id, favourited, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str email_id: ID of email to set favourite state (required) :param bool favourited: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread.
def set_email_favourited_with_http_info(self, email_id, favourited, **kwargs)-
Set email favourited state # noqa: E501
Sets favourite state for an email for dashboard/search workflows. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.set_email_favourited_with_http_info(email_id, favourited, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str email_id: ID of email to set favourite state (required) :param bool favourited: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread.
def update_email_draft(self, draft_id, send_email_options, **kwargs)-
Update an email draft # noqa: E501
Replace the SendEmailOptions stored for a draft. The draft remains attached to its original inbox; create a new draft to use a different inbox. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.update_email_draft(draft_id, send_email_options, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str draft_id: ID of draft (required) :param SendEmailOptions send_email_options: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: EmailDraftDto If the method is called asynchronously, returns the request thread.
def update_email_draft_with_http_info(self, draft_id, send_email_options, **kwargs)-
Update an email draft # noqa: E501
Replace the SendEmailOptions stored for a draft. The draft remains attached to its original inbox; create a new draft to use a different inbox. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.update_email_draft_with_http_info(draft_id, send_email_options, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str draft_id: ID of draft (required) :param SendEmailOptions send_email_options: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(EmailDraftDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def validate_email(self, email_id, **kwargs)-
Validate email HTML contents # noqa: E501
Runs HTML validation on the email body when HTML is present. Non-HTML emails are treated as valid for this check. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.validate_email(email_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str email_id: ID of email (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: ValidationDto If the method is called asynchronously, returns the request thread.
def validate_email_with_http_info(self, email_id, **kwargs)-
Validate email HTML contents # noqa: E501
Runs HTML validation on the email body when HTML is present. Non-HTML emails are treated as valid for this check. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.validate_email_with_http_info(email_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str email_id: ID of email (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(ValidationDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.