refactoring to support the new bulk-messaging-api
and switched to using requests for HTTP communications