A See Say Webhook is an automated message sent from ELERTS when a Report or its media is received. It contains a JSON message—or payload—and is sent to a unique URL you create. The Webhook will be hit every time a photo or video is uploaded. It will contain the full report data including any previously uploaded media files. Webhooks can be managed on the Admin->Webhooks page. More Info

Webhook Header

X-Elerts-Hmac-Sha256: a hash of the events, timestamp and uuid.

Webhook Payload:

Guaranteed fields = *

timestamp*

uuid*

events*->

        type* (media, report, reply, alert, reportStatusChanged, reportTagChanged, dispatcherReply)

        data* ->

            organization* (Name of organization)

            organizationId*

            reportId*

            threadId*

            timestamp*

            source*

            status* (0=Incoming, 1=Active, 2=Test, 3=Closed, 4=Trash)

            elertsLink*

            author* -> 

                    name

                    email

                    phone                           

                    spammer                          

            message        

            type

            typeName

            location

            locationName

            tags -> [{"id":1350,"name":"BUS"},{"id":1353,"name":"CUSTOMER SERVICE ISSUE"}]

           notes (only available on manual trigger from console) -> [{"id":256946,"message":"A test note with media","noteTime":"2024-07-15 20:04:12","author":"ELERTS Admin","files":[{"originalName":"filename.jpeg","id":348,"url":"url.jpeg","uploadTime":"2024-07-15 20:04:12"}]}]

           chat (only available on manual trigger from console) -> [{"message":"Another message for the console!","timestamp":"2024-05-21 18:40:25","status":5,"direction":1,"media":[]},{"message":"Thanks for your messages!","timestamp":"2024-05-21 18:40:45","direction":0,"author":{"name":"ELERTS Admin","phone":"555-555-5555","email":"support@elerts.com"}}]}]}]

            gps->

                    lat*

                    lon*                

                    accuracy

                    locationString

                    timestamp

                    speed

                    course

                    elevation

                    verticalaccuracy            

            media->

                    type* (photo, video)

                    url*

Push Message Webhook

There are 4 different types of Push Message items (all, groupId, topicId, userTokens). all requests that you send the message to all users for that orgId. userTokens requests that you send the push to the included ELERTS userTokens. You should have them saved with your own internal accounts. groupId and topicId include the ids of groups or topics that the message should be sent to. For groupId and topicId messages you will need to call the ELERTS API  clients.token to obtain the list of ELERTS tokens to send the message to. See API documentation in the Console Help.

Push Message Webhook Payload:

Guaranteed fields = *

timestamp*

uuid*

events*->

        type* (messagePush)

        data* ->

            orgId*

            items* (array of objects)

                    ids* (array)

                    pushType* (all, groupId, topicId, userTokens)

            data* -> 

                    GCM* -> {"data":{"msg":"{\"text\":{\"message\":\"New Media: Strange man wandering in and out of doors by baggage carousels in Terminal 2. He doesn\\u2019t look like a passenger. He\\u2019s taking photos of the equipment and doors.\",\"title\":\"ELERTS Transit\"},\"led\":{\"duration\":-1,\"offtime\":100,\"ontime\":100,\"argb\":\"#FFf78039\"},\"sound\":{\"name\":\"notification\"}}"},"priority":"high"}

                    APNS* -> :{"aps":{"alert":{"title":"ELERTS Transit","body":"New Media: Strange man wandering in and out of doors by baggage carousels in Terminal 2. He doesn\u2019t look like a passenger. He\u2019s taking photos of the equipment and doors."},"sound":"notification.aiff","badge":"1","interruption-level":"time-senstive"},"source":"ELERTS"}