May I know what use case you are trying to solve for you to set an alarm via API?
Typically, in order to set an alarm on a monitor, configure the threshold on the monitor so that when that threshold is breached the alarm will automatically be triggered. In Site24x7 this can be done by configuring the threshold profile.
To do this navigate in the site24x7 client to the monitor you want to configure and edit. Under configuration edit the threshold profile. In the example I have set CPU > 70% as the threshold. Once this is breached you will automatically receive an alert through your preferred medium.
Once you defined your profile you can use it across monitors of the same type.
You can set the same threshold from our APIs as well and update it to the monitor.