send via template api functionality