-
Notifications
You must be signed in to change notification settings - Fork 71
Message Streams
tomazy edited this page Apr 8, 2020
·
2 revisions
To interact with message streams you will need an instance of Postmark::ApiClient:
client = Postmark::ApiClient.new('<your server token>')
client.create_message_stream(name: 'Ruby Newsletter', id: 'ruby-newsletter', message_stream_type: 'Broadcasts')
# {:id=>"ruby-newsletter",
# :server_id=>112233,
# :name=>"Ruby Newsletter",
# :description=>nil,
# :message_stream_type=>"Broadcasts",
# :created_at=>"2020-04-08T12:41:04.7153143-01:00",
# :updated_at=>nil,
# :archived_at=>nil}
client.update_message_stream('ruby-newsletter', description: 'Weekly Ruby Newsletter')
# {:id=>"ruby-newsletter",
# :server_id=>112233,
# :name=>"Ruby Newsletter",
# :description=>"Weekly Ruby Newsletter",
# :message_stream_type=>"Broadcasts",
# :created_at=>"2020-04-08T12:41:04-04:00",
# :updated_at=>"2020-04-08T12:45:37.9956881-04:00",
# :archived_at=>nil}
client.get_message_stream('ruby-newsletter')
# {:id=>"ruby-newsletter",
# :server_id=>112233,
# :name=>"Ruby Newsletter",
# :description=>"Weekly Ruby Newsletter",
# :message_stream_type=>"Broadcasts",
# :created_at=>"2020-04-08T12:41:04-04:00",
# :updated_at=>"2020-04-08T12:45:37.9956881-04:00",
# :archived_at=>nil}
client.message_streams.map { |h| h[:name] }
# ["Default Inbound Stream", "Default Transactional Stream", "Ruby Newsletter"]
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