RapidSOS provides an HTTP-based utility that sends requests to a web-server. This utility provides a mechanism for triggering external services, feedback/logging, error notification, and more. The HTTP utility supports both a POST and GET method that can be leveraged at any point throughout an emergency response flow.
We suggest using unique development and production endpoints for your testing and live implementations.
- Production: https://www.yourproduction.com/endpoint
- Development: https://www.yoursandbox.com/endpoint
HTTP GET requests can be secured via three different methodologies:
- oauth2 - Dictionary to support OAuth2 authentication
- url: Oauth2 URL for authentication
- grant_type: Optional for future use. If exists - must be "client_credentials" (optional)
- client_id: string: OAUTH2 client ID
- client_secret: string: OAUTH2 client secret
AWS API-Gateway Authentication
- aws_signature: Dictionary to support AWS Signature (AWS API-Gateway)
- region: string: Specify the region to use
- access_key: string: AWS Access Key
- secret_key: string: AWS Secret Key
Response / Status Message Payload
A RapidSOS Solution Architect will work with you to confirm the return payload from a GET or to define the data schema of a POST. RapidSOS expects either a string or JSON response from a GET request, and will return JSON to POST requests.
Every RapidSOS trigger (the API call that initiates data transfer through RapidSOS) requires, at minimum, a user name, user phone number, and location (latitude, longitude, and uncertainty). Additional data can be incorporated into the flow trigger and returned in the response payload to a POST request. The below JSON Format Sample provides an example of the response payload from RapidSOS inclusive of the required fields, and an example key, value pair; a Solutions Architect will work with you to define the precise schema for implementation.
JSON Format Sample
“HTTP Utility Name": “Example Utility Block Name”,
"name": “Users_First Name Users_Surname,
Sample Flow Diagram
Below is a description of a sample flow to illustrate the HTTP postback capabilities in a standard RapidSOS Data Connect + Voice Flow. Please reference diagram A below and the aligning numbers within the diagram describing the state within the flow:
- The flow is initially triggered by the source, and includes at minimum a name, phone number, and location data.
- HTTP Post is made, HTTP Utility Name is “Trigger Initiated”. Refer to JSON Format Sample for the response body from RapidSOS.
- Interactive Voice Response (IVR) is set up to query the caller if the incident is a real emergency, continuing to path five (5), or a false incident, continuing to path eight (8).
- HTTP Post is made, HTTP Utility Name is “User Confirmed Incident”. Refer to JSON Format Sample for the response body from RapidSOS.
- RapidSOS publishes the users’ information to the Emergency Response Data Platform.
- RapidSOS initiates the 9-1-1 call with the user to the correct dispatch for their location.
- HTTP Post is made, HTTP Utility Name is “9-1-1 Call Connected”. Refer to JSON Format Sample for the response body from RapidSOS.
- RapidSOS plays a generic message confirming the incident is not valid, and initiates call termination.
- HTTP Post is made, HTTP Utility Name is “User Terminated Incident”. Refer to JSON Format Sample for the response body from RapidSOS.
- RapidSOS terminates the flow.