Hello,
I wrote a simple node app that listens for post requests and passes that to the zmtrigger telnet process. This is used to create alarms triggered from my my IOT motion sensors. Thought I'd share it here in case it can help others. Originally I tried to use the API but the zmtrigger gives you a bit more to work with such as duration of alarm and alarm title.
https://gitlab.com/grantbruneau/zoneminder-alarm