Skip to main content
GET
/
api
/
public
/
v1
/
surveys
/
nps
/
{id}
/
analytics
Get NPS analytics
curl --request GET \
  --url https://app.msportal.ai/api/public/v1/surveys/nps/{id}/analytics \
  --header 'Authorization: Bearer <token>'
{
  "data": {
    "surveyId": "<string>",
    "periodType": "daily",
    "periodStart": "2023-11-07T05:31:56Z",
    "periodEnd": "2023-11-07T05:31:56Z",
    "npsScore": 123,
    "averageScore": 123,
    "totalResponses": 123,
    "promotersCount": 123,
    "passivesCount": 123,
    "detractorsCount": 123,
    "surveysSent": 123,
    "responseRate": 123,
    "companyId": "<string>",
    "companyName": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Use your API key as a Bearer token. API keys can be generated in Settings → Integrations → API Access.

Path Parameters

id
string<uuid>
required

Survey ID

Query Parameters

periodType
enum<string>

Filter by period type

Available options:
daily,
weekly,
monthly,
quarterly,
yearly,
all_time
companyId
string<uuid>

Filter by company ID

dateFrom
string<date-time>

Filter by period start date (from)

dateTo
string<date-time>

Filter by period end date (to)

live
boolean | null
default:false

Calculate live analytics instead of using stored data

Response

NPS analytics data

data
object
required