Skip to main content

Feedback Severities

Returns aggregated counts of feedback grouped by severity level, formatted for charting.

Endpoint

GET /hubspot/stats/feedback-severities/:startDate/:endDate

URL Parameters

ParameterTypeRequiredDescription
startDatestringStart date (YYYY-MM-DD)
endDatestringEnd date (YYYY-MM-DD)

Request Headers

HeaderValueDescription
AuthorizationBearer <token>Authentication token
No request body is required.

Response

Success Response (HTTP 200)

{
  "message": "",
  "data": {
    "labels": ["Low", "Medium", "High"],
    "series": [12, 34, 5]
  }
}
Field descriptions:
  • labels: Array of severity levels
  • series: Array of counts corresponding to each label (in the same order)

Error Response (HTTP 400–500)

{
  "message": "Invalid params",
  "data": {}
}
Any HTTP status outside 200 indicates an error.

Authentication

A valid JWT token must be provided via the Authorization header.

Example Request (cURL)

curl -X GET "https://yourdomain.com/hubspot/stats/feedback-severities/2025-11-01/2025-11-15" \
-H "Authorization: Bearer YOUR_TOKEN"

Example Request (JavaScript - fetch)

const res = await fetch(
  "/hubspot/stats/feedback-severities/2025-11-01/2025-11-15",
  {
    method: "GET",
    headers: { "Authorization": "Bearer YOUR_TOKEN" }
  }
);

console.log(await res.json());

Notes

  • This endpoint is typically used for pie, bar, or donut charts.
  • Dates must follow the YYYY-MM-DD format.