REST API: NPS Responses
Replace {subdomain}
in the endpoints below with your Vitally subdomain.
You can find your subdomain in the URL used to log into Vitally (i.e., https://yoursubdomain.vitally.io
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
GET
US Data Center (default):
EU Data Center:
Paginated list of NPS Responses, by default ordered by updatedAt
.
Query Params (see Pagination)
Example Request
Example Response
List NPS Responses For An Account GET
GET
US Data Center (default):
EU Data Center:
Paginated list of NPS Responses for a given Account, by default ordered by updatedAt
.
Request Params
Property | Type | Description |
accountId |
| The Account ID assigned by Vitally |
Query Params (see Pagination)
Param | Type | Description |
limit |
| (optional) The number of items to return. The max/default is 100 |
from |
| (optional) The cursor returned from a previous request |
Example Request
Example Response
Create An NPS Response POST
POST
US Data Center (default):
EU Data Center:
NPS Response's are unique on externalId
. So creating and updating are both possible via the POST endpoint.
Request Body
Property | Type | Description |
userId |
| Required The Vitally assigned ID of the Vitally User to associate the NPS Response with. This is NOT the external ID you assign for the user, but the ID that Vitally assigns. |
respondedAt |
| Required The timestamp of when the NPS Response was submitted |
score |
| Required The score of the NPS Response |
externalId |
| The unique ID of the NPS Response in your system |
feedback |
| The text feedback the User submitted |
Example Request
Example Response
Get An NPS Response GET
GET
US Data Center (default):
EU Data Center:
Request Params
Property | Type | Description |
id |
| The NPS Response ID assigned by Vitally |
Update An NPS Response PUT
PUT
US Data Center (default):
EU Data Center:
Request Params
Property | Type | Description |
id |
| Accepts both the NPS Repsonse ID assigned by Vitally and the |
Request Body
Property | Type | Description |
userId |
| Required The Vitally assigned ID of the Vitally User to associate the NPS Response with |
respondedAt |
| Required The timestamp of when the NPS Response was submitted |
score |
| Required The score of the NPS Response |
feedback |
| The text feedback the User submitted |
Delete An NPS Response DELETE
DELETE
US Data Center (default):
EU Data Center:
Request Params
Property | Type | Description |
id |
| The NPS Response ID assigned by Vitally |
Last updated