Send an Alert

HTTP POST

POST /api/2013-12-01/Alerts/[Agency ID]/schedule
You must POST at least the following to send a voice alert.

Parameter Description
Attempts The number of attempts we should make to dial each of the contacts (if they do not acknowledge), pausing for Delay minutes between each attempt.
Delay The number of minutes (an integer value between 1 and 10) should wait between Attempts. If Attempts is set to 1, this value is ignored.
Persistent An integer value of either 0 or 1. If set to 1, the system will automatically dial each of the recipients numbers, once, in order until positive acknowledgement is received.
Recording_ID The Recording ID of the voice recording you’d like to send.
User_ID The ReadyOp User ID of the account that should be used to send the alert. For audit and history purposes the alert will be logged as having been sent from this account inside ReadyOp.

Additionally you must POST at a minimum either an array of Contacts and/or an array of Topics and/or an array of Objects.

Parameter Description
Contacts An array / list of all of the contacts you’d like to send a voice alert to as well as their destination phone index.
Objects An array / list of all the object ids for which you’d like to send a notification.
Topics An array / list of all the topic names for which you’d like to send a notification.

If you’re providing a list of contacts, each contact in the Contacts list should include the following fields:

Parameter Description
Contact_ID The contact’s unique Contact ID.
Phone The contact’s phone identifier/index. This can be obtained when pulling a contact’s information using the Get a Contact API request.
Example Request

$ curl -XPOST https://[Site Name].readyop.com/api/2013-12-01/Alerts/[Agency ID]/schedule \
-d "Attempts=1" \
-d "Delay=1" \
-d "Persistent=0" \
-d "Recording_ID=123" \
-d "User_ID=321" \
-d "Contacts[0][Contact_ID]=1234" \
-d "Contacts[0][Phone]=0" \
-d "Topics[0]=test-topic \
-d "Objects[0]=4321 \
-u "[API Account ID]:[API Token]"

Request Result

{
    "code": 0,
    "status": 200,
    "detail": "Success",
    "timestamp": "2018-11-10T14:58:01+00:00",
    "alert": {
        "Alert ID": 409
    }
}