postal icon indicating copy to clipboard operation
postal copied to clipboard

Bulk sending messages in single API call

Open adamcooke opened this issue 7 years ago • 1 comments

It would be good to send multiple messages to the API in a single HTTP request. The current send/message and send/raw methods are designed for sending a single method.

A new method (or methods) will be needed for this purpose.

In theory, the API should simply accept an array of hashes containing the params that would normally be passed to the send/message or send/raw methods. It should then go through this array and compile a result hash that is the same format of that in the single messages above.

adamcooke avatar May 23 '17 10:05 adamcooke

Could the code I submitted be used as basis, removing the to parameter, and give it a different API endpoint?

In my opinion it should be possible to define global parameters (e.g. subject, from, html body), which can be appended/overwritten with per-recipient parameters.

alexroosenstein avatar May 23 '17 10:05 alexroosenstein