Post Actions

Post action is a behavior executed when Cochl.Sense detects a sound event. For example, if a user sets a Webhook post action for the Gunshot tag, an HTTP webhook request will be sent whenever Cochl.Sense detects a Gunshot.

There are two types of post actions available: Email and Webhook.

1. Webhook Post Action


(1) Webhook

A webhook is an HTTP endpoint that receives detected tags. Cochl.Sense dashboard users can set up a webhook for a project, and all detections for that project will be sent to the webhook.

(2) HTTP Method

POST HTTP requests will be sent to the webhook.

(3) HTTP Request Body

The HTTP request body will include the detection result in the JSON format shown below. You can refer to the list of possible tag_name values here. The timestamp value indicates when the detection occurred, and it is in Unix time format.


{
    "tag_name": "Gunshot",
    "project_id": "b48adb0a-9bfe-4e30-9ac8-61b8a10541ff",
    "timestamp": 1679494615,
}

2. Email


(1) Email

The Email post action sends a list of sound events detected during the time period set on the Cochl.Sense Dashboard.

hope_size