Top Categories
Retrieve aggregated data showing the most frequently occurring incident categories within a given date range.Endpoint
GET /hubspot/stats/top-categories/:startDate/:endDate
URL Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
startDate | string | ✅ | Start date of the range (YYYY-MM-DD) |
endDate | string | ✅ | End date of the range (YYYY-MM-DD) |
Request Headers
| Header | Value | Description |
|---|---|---|
Authorization | Bearer <token> | Authentication token |
Note: This endpoint does not accept a request body.
Response
Success Response (HTTP 200)
categories: List of categories ranked or aggregated for the date range.
Error Response (HTTP 400–500)
Any non-200 status code indicates an error.
Authentication
Provide a valid token using theAuthorization header.
Example Request (cURL)
Example Request (JavaScript - fetch)
Notes
- Dates must follow
YYYY-MM-DDformat. - The endpoint returns an empty array when no categories are found.