How to apply action to all rules

I'm integrating with a third-party monitor and wrote a script to forward alarms to my monitor. Now I want all rules to call it. I checked but the REST API doesn't appear able to update rules. I also don't see how any options to use Groovy to add actions to multi-severity rules. What is the best way to apply my action to all rules programmatically? After I've applied it to all rules on my instance, I will need to apply it to all rules across all our other instances as well.