---
title: "Get NPS stats for different time frames"
method: POST
path: "/aggregations/nps"
tags: ["Endpoints"]
---

# Get NPS stats for different time frames

`POST /aggregations/nps`

The [Net Promoter Score](https://en.wikipedia.org/wiki/Net_promoter_score) helps to segment and understand your customer's sentiments towards your product by grouping them into three categories:
- **Promoters:**These are customers who are happy with your product and likely to recommend it to others. 
- **Passives:**These are customers who use your product because it meets their needs and might not go out of their way to recommend it to others.
- **Detractors:**These are customers for whom your product does not satisfy their complete needs and are likely to churn over time.

Each segment is weighed on a scale between 0 to 10. With detractors rated between 0 to 6, Passives between 7 and 8, and Promoters 9 to 10.

The final NPS score is calculated as follows:  `NPS = (number of promoters / total number of reviews with NPS * 100) − (number of detractors / total number of reviews with NPS * 100)` This value can be found in the response as **rating**.

The response is also grouped into periods of **7 days**, **30 days**, and **365 days**, as well as your overall rating to date.

You can fetch the NPS score for specific channels by specifying the channel id in the **request body**. The results for all channels are returned if the request body is set to an empty object `{}`

**NB:** In other to start collecting NPS surveys you will have to select the NPS template in the [control center](https://app.etrusted.com). Reach out to your CSM in case it's not yet available in your control center.
**NB:** as Event-Types/touchpoints may be empty (e.g.), a fallback/default touchpoint, "$$empty" exists, which may be used to specifically address reviews without eventtype/touchpoint

## Headers

- `Authorization` string, required

## Request body

- ReviewRequestDto
  - `channels` object[]
    - `id` string
  - `touchpoints` object[]
    - `id` string

## Response `200`

The stats was fetched successfully.

- ReviewResponseDto — The stats was fetched successfully.
  - `7days` object
    - `rating` integer
    - `count` integer
    - `distribution` object
      - `promoters` integer
      - `passives` integer
      - `detractors` integer
  - `30days` object
    - `rating` integer
    - `count` integer
    - `distribution` object
      - `promoters` integer
      - `passives` integer
      - `detractors` integer
  - `90days` object
    - `rating` integer
    - `count` integer
    - `distribution` object
      - `promoters` integer
      - `passives` integer
      - `detractors` integer
  - `365days` object
    - `rating` integer
    - `count` integer
    - `distribution` object
      - `promoters` integer
      - `passives` integer
      - `detractors` integer

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found

---

[API](https://skmtc.net/etrusted/apis/accounts-api.md) · [All operations](https://skmtc.net/etrusted/apis/accounts-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/etrusted/accounts-api/versions/649ef7dac98c/schema)
