Skip to content

Latest commit

 

History

History
155 lines (109 loc) · 4.96 KB

SendingAPIApi.md

File metadata and controls

155 lines (109 loc) · 4.96 KB

postmark.SendingAPIApi

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

Method HTTP request Description
send_email POST /email Send a single email
send_email_batch POST /email/batch Send a batch of emails
send_email_with_template POST /email/withTemplate Send an email using a Template

send_email

SendEmailResponse send_email(x_postmark_server_token, body=body)

Send a single email

Example

from __future__ import print_statement
import time
import postmark
from postmark.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = postmark.SendingAPIApi()
x_postmark_server_token = 'x_postmark_server_token_example' # str | The token associated with the Server on which this request will operate.
body = postmark.SendEmailRequest() # SendEmailRequest |  (optional)

try: 
    # Send a single email
    api_response = api_instance.send_email(x_postmark_server_token, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SendingAPIApi->send_email: %s\n" % e)

Parameters

Name Type Description Notes
x_postmark_server_token str The token associated with the Server on which this request will operate.
body SendEmailRequest [optional]

Return type

SendEmailResponse

Authorization

No authorization required

HTTP request headers

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

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

send_email_batch

SendEmailBatchResponse send_email_batch(x_postmark_server_token, body=body)

Send a batch of emails

Example

from __future__ import print_statement
import time
import postmark
from postmark.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = postmark.SendingAPIApi()
x_postmark_server_token = 'x_postmark_server_token_example' # str | The token associated with the Server on which this request will operate.
body = postmark.SendEmailBatchRequest() # SendEmailBatchRequest |  (optional)

try: 
    # Send a batch of emails
    api_response = api_instance.send_email_batch(x_postmark_server_token, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SendingAPIApi->send_email_batch: %s\n" % e)

Parameters

Name Type Description Notes
x_postmark_server_token str The token associated with the Server on which this request will operate.
body SendEmailBatchRequest [optional]

Return type

SendEmailBatchResponse

Authorization

No authorization required

HTTP request headers

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

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

send_email_with_template

SendEmailResponse send_email_with_template(x_postmark_server_token, body)

Send an email using a Template

Example

from __future__ import print_statement
import time
import postmark
from postmark.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = postmark.SendingAPIApi()
x_postmark_server_token = 'x_postmark_server_token_example' # str | The token associated with the Server on which this request will operate.
body = postmark.EmailWithTemplateRequest() # EmailWithTemplateRequest | 

try: 
    # Send an email using a Template
    api_response = api_instance.send_email_with_template(x_postmark_server_token, body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SendingAPIApi->send_email_with_template: %s\n" % e)

Parameters

Name Type Description Notes
x_postmark_server_token str The token associated with the Server on which this request will operate.
body EmailWithTemplateRequest

Return type

SendEmailResponse

Authorization

No authorization required

HTTP request headers

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

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