⚑
Other integrations
πŸ’Ÿ
Account health scores & metrics
NPS Responses

The NPS Response object

Property
Description
Editable
id
Vitally's unique ID for the NPS Response
No
createdAt
Datetime the NPS Response was created
No
updatedAt
Datetime the NPS Response was last updated
No
externalId
​Your unique ID for the NPS Response
Only on create
userId
Required The ID of the Vitally User the NPS Response is from
Yes
score
Required The numerical score (0-10)
Yes
feedback
The text feedback submitted with the response
Yes
respondedAt
The date-time the user submitted the response
Yes

List NPS Responses GET

1
https://rest.vitally.io/resources/npsResponses
Copied!
Paginated list of NPS Responses, by default ordered by updatedAt.
Query Params (see Pagination)
Example Request
1
GET https://rest.vitally.io/resources/npsResponses?limit=10&from=cursor
Copied!
Example Response
1
{
2
"results": [
3
{
4
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
5
"externalId": "nps-response-1",
6
"userId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
7
"score": 9,
8
"feedback": "I think the product is great!",
9
"respondedAt": "2020-12-29T20:16:27.370Z"
10
}
11
],
12
"next": "c29tZWJhc2U2NA=="
13
}
Copied!

List NPS Responses For An Account GET

1
https://rest.vitally.io/resources/accounts/:accountId/npsResponses
Copied!
Paginated list of NPS Responses for a given Account, by default ordered by updatedAt.
Request Params
Property
Type
Description
accountId
string
The Account ID assigned by Vitally
Query Params (see Pagination)
Param
Type
Description
limit
number
(optional) The number of items to return. The max/default is 100
from
string
(optional) The cursor returned from a previous request
Example Request
1
GET https://rest.vitally.io/resources/accounts/:accountId/npsResponses?limit=10&from=cursor
Copied!
Example Response
1
{
2
"results": [
3
{
4
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
5
"externalId": "nps-response-1",
6
"userId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
7
"score": 9,
8
"feedback": "I think the product is great!",
9
"respondedAt": "2020-12-29T20:16:27.370Z"
10
}
11
],
12
"next": "c29tZWJhc2U2NA=="
13
}
Copied!

Create An NPS Response POST

1
https://rest.vitally.io/resources/npsResponses
Copied!
NPS Response's are unique on externalId. So creating and updating are both possible via the POST endpoint.
Request Body
Property
Type
Description
userId
string
Required The ID of the Vitally Account to associate the NPS Response with
respondedAt
string
Required The timestamp of when the NPS Response was submitted
score
number
Required The score of the NPS Response
externalId
string
The unique ID of the NPS Response in your system
feedback
string
The text feedback the User submitted
Example Request
1
POST https://rest.vitally.io/resources/npsResponses
2
{
3
"userId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
4
"externalId": "nps-response-1",
5
"score": 9,
6
"feedback": "I think the product is great!",
7
"respondedAt": "2020-12-29T20:16:27.370Z",
8
}
Copied!
Example Response
1
{
2
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
3
"externalId": "nps-response-1",
4
"userId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
5
"score": 9,
6
"feedback": "I think the product is great!",
7
"respondedAt": "2020-12-29T20:16:27.370Z"
8
}
Copied!

Get An NPS Response GET

1
https://rest.vitally.io/resources/npsResponses/:id
Copied!
Request Params
Property
Type
Description
id
string
The NPS Response ID assigned by Vitally

Update An NPS Response PUT

1
https://rest.vitally.io/resources/npsResponses/:id
Copied!
Request Params
Property
Type
Description
id
string
The NPS Response ID assigned by Vitally
Request Body
Property
Type
Description
userId
string
Required The ID of the Vitally Account to associate the NPS Response with
respondedAt
string
Required The timestamp of when the NPS Response was submitted
score
number
Required The score of the NPS Response
feedback
string
The text feedback the User submitted

Delete An NPS Response DELETE

1
https://rest.vitally.io/resources/npsResponses/:id
Copied!
Request Params
Property
Type
Description
id
string
The NPS Response ID assigned by Vitally
Last modified 5mo ago