All URIs are relative to https://api.postmarkapp.com
Method | HTTP request | Description |
---|---|---|
delete_template | DELETE /templates/{templateid} | Delete a Template |
get_single_template | GET /templates/{templateid} | Get a Template |
list_templates | GET /templates | Get the Templates associated with this Server |
send_email_with_template | POST /email/withTemplate | Send an email using a Template |
templates_post | POST /templates | Create a Template |
test_template_content | POST /templates/validate | Test Template Content |
update_template | PUT /templates/{templateid} | Update a Template |
TemplateDetailResponse delete_template(x_postmark_server_token, templateid)
Delete a Template
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.TemplatesAPIApi()
x_postmark_server_token = 'x_postmark_server_token_example' # str | The token associated with the Server on which this request will operate.
templateid = 56 # int | The ID for the Template you wish to delete.
try:
# Delete a Template
api_response = api_instance.delete_template(x_postmark_server_token, templateid)
pprint(api_response)
except ApiException as e:
print("Exception when calling TemplatesAPIApi->delete_template: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
x_postmark_server_token | str | The token associated with the Server on which this request will operate. | |
templateid | int | The ID for the Template you wish to delete. |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TemplateDetailResponse get_single_template(x_postmark_server_token, templateid)
Get a Template
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.TemplatesAPIApi()
x_postmark_server_token = 'x_postmark_server_token_example' # str | The token associated with the Server on which this request will operate.
templateid = 56 # int | The ID for the Template you wish to retrieve.
try:
# Get a Template
api_response = api_instance.get_single_template(x_postmark_server_token, templateid)
pprint(api_response)
except ApiException as e:
print("Exception when calling TemplatesAPIApi->get_single_template: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
x_postmark_server_token | str | The token associated with the Server on which this request will operate. | |
templateid | int | The ID for the Template you wish to retrieve. |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TemplateListingResponse list_templates(x_postmark_server_token, count, offset)
Get the Templates associated with this Server
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.TemplatesAPIApi()
x_postmark_server_token = 'x_postmark_server_token_example' # str | The token associated with the Server on which this request will operate.
count = 3.4 # float | The number of Templates to return
offset = 3.4 # float | The number of Templates to \"skip\" before returning results.
try:
# Get the Templates associated with this Server
api_response = api_instance.list_templates(x_postmark_server_token, count, offset)
pprint(api_response)
except ApiException as e:
print("Exception when calling TemplatesAPIApi->list_templates: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
x_postmark_server_token | str | The token associated with the Server on which this request will operate. | |
count | float | The number of Templates to return | |
offset | float | The number of Templates to "skip" before returning results. |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SendEmailResponse send_email_with_template(x_postmark_server_token, body)
Send an email using a Template
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.TemplatesAPIApi()
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 TemplatesAPIApi->send_email_with_template: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
x_postmark_server_token | str | The token associated with the Server on which this request will operate. | |
body | EmailWithTemplateRequest |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TemplateRecordResponse templates_post(x_postmark_server_token, body)
Create a Template
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.TemplatesAPIApi()
x_postmark_server_token = 'x_postmark_server_token_example' # str | The token associated with the Server on which this request will operate.
body = postmark.CreateTemplateRequest() # CreateTemplateRequest |
try:
# Create a Template
api_response = api_instance.templates_post(x_postmark_server_token, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling TemplatesAPIApi->templates_post: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
x_postmark_server_token | str | The token associated with the Server on which this request will operate. | |
body | CreateTemplateRequest |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TemplateValidationResponse test_template_content(x_postmark_server_token, body=body)
Test Template Content
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.TemplatesAPIApi()
x_postmark_server_token = 'x_postmark_server_token_example' # str | The token associated with the Server on which this request will operate.
body = postmark.TemplateValidationRequest() # TemplateValidationRequest | (optional)
try:
# Test Template Content
api_response = api_instance.test_template_content(x_postmark_server_token, body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling TemplatesAPIApi->test_template_content: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
x_postmark_server_token | str | The token associated with the Server on which this request will operate. | |
body | TemplateValidationRequest | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TemplateRecordResponse update_template(x_postmark_server_token, templateid, body)
Update a Template
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.TemplatesAPIApi()
x_postmark_server_token = 'x_postmark_server_token_example' # str | The token associated with the Server on which this request will operate.
templateid = 56 # int | The ID for the Template you wish to update.
body = postmark.EditTemplateRequest() # EditTemplateRequest |
try:
# Update a Template
api_response = api_instance.update_template(x_postmark_server_token, templateid, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling TemplatesAPIApi->update_template: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
x_postmark_server_token | str | The token associated with the Server on which this request will operate. | |
templateid | int | The ID for the Template you wish to update. | |
body | EditTemplateRequest |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]