Skip to main content

Overview

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.

 

Endpoint

We suggest using unique development and production endpoints for your testing and live implementations. 

 

Authentication (Optional)

HTTP GET requests can be secured via three different methodologies:

Basic Authentication

  • username:
  • password:

OAuth2 Authentication

  • 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.  

 

Data Available

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,
“phone”:”+12345678901”,
   "location_latitude": "40”,
“location_longitude”:”-100”,
“location_uncertainty”:”7”,
“sample_key”:”sample_value”
}

 

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:

  1. The flow is initially triggered by the source, and includes at minimum a name, phone number, and location data.
  2. HTTP Post is made, HTTP Utility Name is “Trigger Initiated”. Refer to JSON Format Sample for the response body from RapidSOS.
  3. 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). 
  4. HTTP Post is made, HTTP Utility Name is “User Confirmed Incident”. Refer to JSON Format Sample for the response body from RapidSOS.
  5. RapidSOS publishes the users’ information to the Emergency Response Data Platform.
  6. RapidSOS initiates the 9-1-1 call with the user to the correct dispatch for their location. 
  7. HTTP Post is made, HTTP Utility Name is “9-1-1 Call Connected”. Refer to JSON Format Sample for the response body from RapidSOS.
  8. RapidSOS plays a generic message confirming the incident is not valid, and initiates call termination. 
  9. HTTP Post is made, HTTP Utility Name is “User Terminated Incident”. Refer to JSON Format Sample for the response body from RapidSOS.
  10. RapidSOS terminates the flow.
     

 

 

Diagram A

Diagram A

About us

We build APIs that share data with first responders to help protect lives.

RapidSOS logo

Contact