Webhooks

    Overview

    Share911 can be configured to send data to a designated URL whenever certain events occur.  

    For help configuring Webhooks for your organization please contact support@share911.com.

     

    Table of Contents

    Configuring a Webhook

    Webhook Payload

    JSON

    Examples

    Lockdown

    All Clear

    Data Fields

    CAP

    Examples

    Lockdown

    All Clear

    Data Fields

     

     

    Configuring a Webhook

    Share911 supports the use of up to 3 webhooks per channel.

    Screenshot 2024-03-11 at 10.06.38 AM

    Enable this webhook

    Each webhook may be configured prior to it being enabled.  This allows for staff to double-check values before going live.

    Label

    The name you would like to give this webhook.  Used to keep track of how the webhook is used.

    Username

    The username to use when authenticating via Basic authentication.

    Password

    The password to use when authenticating via Basic authentication.

    Integration Endpoint URL

    The destination URL that will receive the webhook POST requests.  This URL should support encryption (https) since Basic authentication is being used.

    Alert Types

    The alerts that this webhook should trigger on.  For example, if only Lockdown and All Clear are selected then broadcasting an Evacuate alert would _not_ cause the webhook to activate.

    Activate during drills

    Controls whether this webhook should activate during drills.

    Data Format

    Determines the format of the data sent to the Endpoint URL:  JSON, CAP

    CA Certificate

    An optional certificate to include when making the POST request.

    Allow insecure connections

    Controls whether the webhook request will permit connections using self-signed certificates.

    Extra Headers

    Optional headers that will be sent with the request.  Place each field/value pair on its own line in JSON format. 

    Example:

    MyCustomerHeader: "abc123"
    Expect: "100-continue"

    Extra Data

    Optional extra data that will be sent with each request.  Place each field/value pair on its own line in JSON format.

    Example:

    signalSource: "Share911"
    customerId: "xyz123"

     

    Webhook Payload

    JSON

    A JSON payload will be delivered directly as the body of the POST request using the "application/json" content type

    Examples

    LOCKDOWN - JSON

    {
    "eventType": "alert",
    "eventId": "c95482d8-2adc-4434-b8dc-c5c5f049fa91",
    "transId": "038b1cbc-996b-4442-b26d-7ced6d12cbeb",
    "channelId": "bedford.k12.va.us/middle",
    "channelName": "Bedford Middle School",
    "eventName": "Lockdown",
    "eventCode": 1,
    "msg": "Test to demonstrate webhook integration",
    "drill": true,
    "addr": {
    "street1": "1 Main St",
    "street2": "",
    "city": "Bedford",
    "state": "VA",
    "lat": 37.3258781,
    "lng": -79.5034316,
    "county": "Bedford County",
    "zip": "24503"
    },
    "by": {
    "userId": "sdflksfdjlj",
    "firstname": "Adrian",
    "lastname": "Lanning",
    "title": "Share911 CTO",
    "email": "adrian@share911.com",
    "mobile": "+15555555555"
    },
    "timestamp": "2023-03-07T20:22:38.000Z",
    "voiceText": "",
    "myCustomData": "xyz123"
    }

     

    ALL CLEAR - JSON

    {
        "eventType": "alert",
        "eventId": "3e79a6a8-7766-4978-adb6-34c922c1814c",
        "transId": "7f64c089-f1ea-4cab-bfc3-22a5c941813a",
        "channelId": "bedford.k12.va.us/middle",
        "channelName": "Bedford Middle School",
        "eventName": "All Clear",
        "eventCode": 5,
      "msg": "The event is over",
      "drill": false,
        "addr": {
            "street1": "1 Main St",
            "street2": "",
            "city": "Bedford",
            "state": "VA",
            "lat": 37.3258781,
            "lng": -79.5034316,
            "county": "Bedford County",
            "zip": "24503"
        },
        "by": {
          "userId": "sdflksfdjlj",
            "firstname": "Adrian",
            "lastname": "Lanning",
            "title": "Share911 CTO",
            "email": "adrian@share911.com",
          "mobile": "+15555555555"
        },
        "timestamp": "2023-03-07T20:27:57.000Z",
        "voiceText": "",
        "myCustomData": "xyz123"
    }

     

    Data Fields - JSON

    eventType

    The type of event: 'alert'

    eventId

    A UUID generated by Share911 for every event; can be safely ignored but may be useful when tracing a specific event's flow through the system.

    transId

    A UUID generated by Share911 for every alert; can be safely ignored but may be useful when tracing a specific alert's flow through the system.

    channelId

    Channel ID is the unique identifier of the communication channel on which the alert was broadcast. Typically each customer building will have its own channel in Share911.  The easiest way to find the Channel ID is on the Manage Channel => Channel Info page, under either Channel ID or Share ID.  You can also find the Channel ID by looking in the URL. For example, if the East Branch demo channel is opened in Share911, the Channel ID is the "sharevilledemo/eastbranch" part of the URL:
    https://share911.com/sharevilledemo/eastbranch

    channelName

    Customer-defined name for the communication channel on which the alert was broadcast.

    eventName

    The name of the alert in English. For example, "Lockdown".

    eventCode

    A numeric ID which corresponds 1-to-1 with the "eventName". Can be used to avoid string comparison when identification of a specific alert type is required. Contact support@share911.com for a complete mapping of alert types to names.

    msg

    The optional message supplied when the broadcast was initiated.

    drill

    A boolean value indicating whether the event was during a drill or not.

    addr

    A JSON object representing the address of the target channel.

    Has the following fields: street1, street2, city, state, lat, lng, county, zip

    by

    A JSON object representing information about the initiating user.

    Has the following fields: userId, firstname, lastname, title, email, mobile

    timestamp

    The time the broadcast was initiated in ISO 8601 format.

     

    CAP

    An XML payload will be delivered directly as the body of the POST request using the "text/xml" content type.

    Examples

    LOCKDOWN - CAP

    <?xml version = "1.0" encoding = "UTF-8"?>
    <alert xmlns = "urn:oasis:names:tc:emergency:cap:1.2">
    <identifier>c95482d8-2adc-4434-b8dc-c5c5f049fa91</identifier>
    <sender>Share911</sender>
    <sent>2023-03-07T20:22:38.000-00:00</sent>
    <status>Exercise</status>
    <msgType>Alert</msgType>
    <scope>Private</scope>
    <info>
    <category>Security</category>
    <event>Share911 Alert</event>
    <responseType>Lockdown</responseType>
    <urgency>Immediate</urgency>
    <severity>Severe</severity>
    <certainty>Observed</certainty>
    <eventCode>
    <valueName>Lockdown</valueName>
    <value>1</value>
    </eventCode>
    <expires>2023-03-07T20:23:38.000-00:00</expires>
    <senderName>Adrian Lanning</senderName>
    <headline>Lockdown DRILL</headline>
    <description>Test to demonstrate webhook integration</description>
    <instruction></instruction>
    <contact>adrian@share911.com</contact>
    </info>
    </alert>

    ALL CLEAR - CAP

    <?xml version = "1.0" encoding = "UTF-8"?>
    <alert xmlns = "urn:oasis:names:tc:emergency:cap:1.2">
      <identifier>3e79a6a8-7766-4978-adb6-34c922c1814c</identifier>
      <sender>Share911</sender>
      <sent>2023-03-07T20:27:57.000-00:00</sent>
      <status>Actual</status>
      <msgType>Alert</msgType>
      <scope>Private</scope>
      <info>
        <category>Security</category>
        <event>Share911 Alert</event>
        <responseType>Lockdown</responseType>
        <urgency>Immediate</urgency>
        <severity>Severe</severity>
        <certainty>Observed</certainty>
        <eventCode>
          <valueName>All Clear</valueName>
          <value>5</value>
        </eventCode>
        <expires>2023-03-07T20:32:57.000-00:00</expires>
        <senderName>Adrian Lanning</senderName>
        <headline>All Clear</headline>
        <description>The event is over</description>
        <instruction></instruction>
        <contact>adrian@share911.com</contact>
      </info>
    </alert>

    Data Fields - CAP

    identifier

    A UUID generated by Share911 for every event; can be safely ignored but may be useful when tracing a specific event's flow through the system.

    sender

    The service responsible for the CAP message. Always "Share911"

    sent

    The time the broadcast was initiated in ISO 8601 format.

    status

    Indicates whether the event was a drill or not.  "Exercise" if drill, "Actual" otherwise.

    msgType

    The type of event.  Always 'Alert'

    scope

    Indicates whether the information is Public, Restricted, or Private.  Always "Private"

    info.category

    Always "Security"

    info.event

    Always "Share911 Alert"

    info.responseType

    The name of the alert in English

    info.urgency

    Always "Immediate"

    info.severity

    Always "Severe"

    info.certainty

    Always "Observed"

    info.eventCode.valueName

    Same as "info.responseType"

    info.eventCode.value

    A numeric ID which corresponds 1-to-1 with the "eventName". Can be used to avoid string comparison when identification of a specific alert type is required. Contact support@share911.com for a complete mapping of alert types to names.

    info.expires

    The time the broadcast should be automatically cleared

    info.senderName

    The sender's first and last name

    info.headline

    The name of the alert in English. For example, "Lockdown" or "Lockdown DRILL".

    info.description

    The message that the sender included in the broadcast

    info.instruction

    Always empty

    info.contact

    The sender's email address