-
Notifications
You must be signed in to change notification settings - Fork 70
Templates push
Igor Balos edited this page Jan 22, 2019
·
1 revision
For these API requests you will need to use a account API token. Once you obtain it, you will need to use account API client.
account_token = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
client = Postmark::AccountApiClient.new(account_token, secure: true)
You can easily push templates from one server to another one.
In order to preview which templates would be pushed from one server to another one, you will need to do the following:
# preview template push
client.push_templates({source_server_id: 1, destination_server_id:2, perform_changes: false} )
# => [{:action=>"Create", :template_id=>nil, :alias=>"alias1", :name=>"Comment notification"},{:action=>"Create", :template_id=>nil, :alias=>"alias2", :name=>"Password reset"}]
In order to push templates from one server to another one, you will need to do the following:
# templates push
client.push_templates({source_server_id: 1, destination_server_id:2, perform_changes: true} )
# => [{:action=>"Create", :template_id=>3, :alias=>"alias1", :name=>"Comment notification"},{:action=>"Create", :template_id=>4, :alias=>"alias2", :name=>"Password reset"}]
For additional information about the capabilities of the Postmark API, see Postmark Developers Documentation.
- Email sending
- Test email sending
- Bounces
- Templates
- Templates push
- Server
- Servers
- Message Streams
- Webhooks
- Messages
- Domains
- Sender Signatures
- Stats
- Trigger Tags
- Suppressions
- Data Removals
- Trigger Inbound Rules
- Parsing Inbound
- Using Postmark with Mail library
- Accessing Postmark Message ID
- Error Handling
- Integration Testing
- Troubleshooting
- Known issues and how to resolve them