4. Create Alerts
Overview
When your automation software is notified of a signal from a RapidSOS Ready data provider, you should create an alert.
Below is a high-level explanation of the general workflow.
- The central station creates the alert at the time of need for dispatch (immediately before the 10-digit call attempt). At the same time, the request for dispatch can be initiated, by sending either a Full Digital Alert or Supplemental Alert to the ECC.
If the ECC supports Digital Alerts, they can receive a dispatch request digitally, without the need for a 10-digit phone call.
- Once the alert is created, any milestones (calls made, multi-trips, visual verifications, etc) can be logged to the alert record.
- Once dispatch has been requested, the CS can cancel the dispatch request or comment/chat directly with the ECC (PSAP) in real time.
- For Alerts, the CS will utilize the notification subscription to sync status updates, dispositions, and chat comments from the ECC back to automation.
- For Supplemental Alerts, no chat or status updates are received from the ECC. Supplemental Alerts provide 1-way chat capabilities for the CS to enter information that may aid in prioritization by the ECC (calls made, visual verifications, additional notes/info as needed).
4.1 Create Alert API
Utilizing the HTTP POST method to the below URLs, integration partners can create a new alert and push it to the system to request emergency dispatch.
For additional information on the request structure, body, responses and error codes, check out our Interactive API Explorer here.
URLs
| Sandbox | Production |
|---|---|
| https://api-sandbox.rapidsos.com/v1/alerts/ | https://api.rapidsos.com/v1/alerts/ |
Authenticating
To authenticate requests using an access token, requests must include an Authorization header set to the value Bearer YOUR-ACCESS-TOKEN where YOUR-ACCESS-TOKEN is substituted for the retrieved access token. See the Authentication documentation for details.
Example request
POST /v1/alerts/ HTTP/1.1
Host: api-sandbox.rapidsos.com
Content-Type: application/json;
Authorization: Bearer YOUR-ACCESS-TOKEN
{
"blocking": true,
"callflow": "CentralStationABCFireAlarmFlow",
"variables": {
"event": {
"source_id": "abc123",
"incident_time": 1581110270622,
"location": {
"geodetic": {
"latitude": 45.123,
"longitude": -71.321,
"uncertainty_radius": 7.5
},
"civic": {
"name": "RapidSOS HQ",
"street_1": "123 Main Street",
"street_2": "Apt. 626",
"city": "Los Angeles",
"state": "CA",
"country": "USA",
"zip_code": 11375
}
},
"emergency_type": "BURGLARY",
"site_type": "RESIDENTIAL"
},
"alarm_description": "string",
"zone_description": "string",
"alarm_permit_number": "string",
"visually_verified": true,
"instructions": "string",
"service_provider_name": "string",
"site_phone": "string",
"emergency_contacts": [
{
"name": "John Doe",
"phone": 15555555555,
"relationship": "Father",
"language": "English"
}
]
}
}Example Response
The Alerts API will always return a JSON response in the standard format unless an error or bad request is issued.
{
"source_id": "abc123",
"incident_time": 1581110270622,
"location": {
"geodetic": {
"latitude": 45.123,
"longitude": -71.321,
"uncertainty_radius": 7.5
},
"civic": {
"name": "RapidSOS HQ",
"street_1": "123 Main Street",
"street_2": "Apt. 626",
"city": "Los Angeles",
"state": "CA",
"country": "USA",
"zip_code": 11375
}
},
"status": {
"name": "NEW",
"display_name": "New"
},
"disposition": {
"name": "DISPATCHED",
"display_name": "Dispatched"
},
"last_updated_time": 1581110270622,
"alert_id": "6e58d630-d28f-4623-ba01-3207b497a9ba",
"sla_expiration_time": 1581110270922,
"emergency_type": {
"name": "BURGLARY",
"display_name": "Burglary"
},
"site_type": {
"name": "RESIDENTIAL",
"display_name": "Residential"
},
"covering_psap": {
"id": "NY_123",
"name": "New York Police Department",
"phone": 15555555555
},
"authorized_entity": {
"id": "CS_123",
"name": "Central Station ABC",
"phone": 15555555555
},
"followers": [
"41",
"23"
]
}The response payload will indicate if the ECC is supported and currently active, or supported for Supplemental Alerts (supplemental alarm data) only. Supplemental Alerts serve as a fallback to full Alerts enabling the data to still be sent, where the removal of the phone call cannot be accommodated at the corresponding ECC.
If the ECC is unsupported, inactive, or supports Supplemental Alerts, the CS operational procedures (action plan) should remain as they exist today, utilizing the 10-digit dial to the ECC.
In the scenario where an ECC is supported/active and either decline (rejects) or takes no action on an alert (times out), existing procedures for dialing the 10-digit phone number will need to be initiated. In this scenario, the data appears similar to the ECC as a Supplemental Alert, where it can potentially be utilized by the telecommunicator assigned to handle 10-digit calls.
Overview
Utilizing the POST Create Alert API, integration partners can create a new alert and push it to the system to request emergency dispatch. All static alarm data must be posted to the alert at this point. Once created, chat, milestones and status updates can be logged to the alert. The intial static data can not be changed.
The POST Create Alert API can be called immediately prior to the time of dispatch request, or earlier in the CS’s processes, such as when the alarm first arrives. The latter scenario allows actions such as logging milestones (calls made, multi-trips etc) to be performed as they occur, however, most alerts would likely never eventuate to dispatch as the CS will likely resolve 9 of 10 alarms.
Should the POST Create Alert API be called at the same time as the dispatch request, any milestones previously performed should be logged immediately at creation.