Chatbot Analytics

Get analytics

Get the aggregated statistics of a chatbot.

get/get-analysis/{chatbotId}

Request

  • Base URL: https://api.chat-data.com/api/v2
  • URL: https://api.chat-data.com/api/v2/get-analysis/{chatbotId}
  • Auth: HTTP bearer

Path parameters

chatbotIdstring required

The unique identifier allocated to the chatbot.

Query parameters

startTimestampnumber

Start of the time range (inclusive), in milliseconds since the Unix epoch. Statistics are stored per UTC day, each dated at 00:00 UTC.

endTimestampnumber

End of the time range (inclusive), in milliseconds since the Unix epoch.

sourcestring[]

Filter analytics by source. Repeat the parameter to match several sources.

Response

Successful response.

status'success' required

Example response

{
  "status": "success",
  "countryDistribution": [
    {
      "country": "US",
      "count": 184
    },
    {
      "country": "GB",
      "count": 61
    }
  ],
  "hourDistribution": [
    {
      "hour": "14",
      "source": "iframe",
      "count": 37
    },
    {
      "hour": "15",
      "source": "iframe",
      "count": 29
    }
  ],
  "creditsDistribution": [
    {
      "date": 1791849600000,
      "source": "api",
      "count": 96
    },
    {
      "date": 1791936000000,
      "source": "iframe",
      "count": 412
    }
  ],
  "messagesDistribution": [
    {
      "date": 1791849600000,
      "source": "api",
      "count": 88
    },
    {
      "date": 1791936000000,
      "source": "iframe",
      "count": 356
    }
  ],
  "liveChatEmailsDistribution": [
    {
      "date": 1791849600000,
      "source": "api",
      "count": 1
    },
    {
      "date": 1791936000000,
      "source": "iframe",
      "count": 3
    }
  ],
  "liveChatSmsDistribution": [
    {
      "date": 1791849600000,
      "source": "api",
      "count": 0
    },
    {
      "date": 1791936000000,
      "source": "iframe",
      "count": 2
    }
  ],
  "liveChatEscalationsDistribution": [
    {
      "date": 1791849600000,
      "source": "api",
      "count": 1
    },
    {
      "date": 1791936000000,
      "source": "iframe",
      "count": 4
    }
  ],
  "upVotesDistribution": [
    {
      "date": 1791849600000,
      "source": "api",
      "count": 6
    },
    {
      "date": 1791936000000,
      "source": "iframe",
      "count": 21
    }
  ],
  "downVotesDistribution": [
    {
      "date": 1791849600000,
      "source": "api",
      "count": 1
    },
    {
      "date": 1791936000000,
      "source": "iframe",
      "count": 4
    }
  ],
  "conversationsDistribution": [
    {
      "date": 1791849600000,
      "source": "api",
      "count": 14
    },
    {
      "date": 1791936000000,
      "source": "iframe",
      "count": 58
    }
  ],
  "leadsCountDistribution": [
    {
      "date": 1791849600000,
      "source": "api",
      "count": 2
    },
    {
      "date": 1791936000000,
      "source": "iframe",
      "count": 9
    }
  ],
  "workflowEmailsDistribution": [
    {
      "date": 1791849600000,
      "source": "api",
      "count": 1
    },
    {
      "date": 1791936000000,
      "source": "iframe",
      "count": 5
    }
  ],
  "topicsDistribution": [
    {
      "topic": "Pricing",
      "count": 26
    },
    {
      "topic": "Shipping",
      "count": 17
    }
  ],
  "sentimentsDistribution": [
    {
      "sentiment": "positive",
      "count": 41
    },
    {
      "sentiment": "neutral",
      "count": 12
    }
  ],
  "ratingDistribution": [
    {
      "rating": "5",
      "count": 19
    },
    {
      "rating": "4",
      "count": 7
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.