-
Notifications
You must be signed in to change notification settings - Fork 31
Message Streams
Igor Balos edited this page Dec 8, 2020
·
5 revisions
For these API requests you will need to use a server API token. Once you obtain it, you will need to use server API client.
ApiClient client = Postmark.getApiClient(<server token>);List message streams
//Message Streams list
MessageStreams streams = client.getMessageStreams(Parameters.init().build("MessageStreamType","broadcasts"));
System.out.println(streams.getMessageStreams()[0].getName());Retrieve single message stream
// Get stream with filter
String streamId="bulk";
MessageStream stream = client.getMessageStream(streamId);
System.out.println(stream.getName());Update message stream
MessageStream stream = new MessageStream();
stream.setDescription("Igor bulker is now really");
stream.setSubscriptionManagementConfiguration(new SubscriptionManagementConfiguration("Custom"));
MessageStream response = client.setMessageStream("bulk", stream);For additional information about the capabilities of the Postmark API, see Postmark Developers Documentation.