Issue with using SharePoint’s SendEmail API

We have a custom script that sends emails based on comments added to a page. We use SharePoint’s SendEmail API to do this. At launch this was working fine though we had to sort out some issues with the recipient of the email not being mail-enabled security groups, but otherwise it worked fine and emails were being delivered.

Now, we’ve had complaints from users that the comments are not sending emails. Upon troubleshooting, there seems to be an issue with the API itself.

Upon trying to submit a comment, the browser console shows the following error “#####.min.js:8 POST #####/_api/SP.Utilities.Utility.SendEmail 400 (Bad Request)” with no other information, just the stack trace but nothing jumps out.

When I browse to /_api/SP.Utilities.Utility.SendEmail from my browser, the following is displayed:

enter image description here

This leads me to believe that there is something wrong with the API? Outgoing email is configured correctly based on my understanding.

Is there anything that would cause this API to fail? A service not running correctly perhaps?