Request

Fetch Insight By Date

POST https://api.chatsight.ai/insights/fetch

HEADER x-chatsight-api-auth: <API-TOKEN>

curl --location --request POST 'https://api.chatsight.ai/insights/fetch' \
--header 'x-chatsight-api-auth: <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{"date":"2021-03-26"}'
axios.post('https://api.chatsight.ai/insights/fetch',{date: "2021-03-26"},{headers:{"x-chatsight-api-auth":"<YOUR-API-KEY>"}})
.then(response => {
  if(response.data && response.data.success){
    return response.data
  }else{
    return false
  }
}).catch(err => {return err})

Response

response.availableElements contains every category present within response.data

For example: response.data.mention shows a category about every time a recognized 'mention' was detected in raw text.

Each category returns 100 of the most frequent elements for that category.

{
    "api": "chatsight-lang-text",
    "success": true,
    "response": {
        "availableElements": [
            "mention"
        ],
        "data": {
            "mention": {
              "@Username_1234":1916,
              "@DoctorUserName":2016
            }
        }
    }
}