updating API to allow for batch sending