⚡️ Other integrations

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

https://rest.vitally.io/resources/npsResponses

Paginated list of NPS Responses, by default ordered by updatedAt.

Query Params (see Pagination)

Example Request

GET https://rest.vitally.io/resources/npsResponses?limit=10&from=cursor

Example Response

{
"results": [
{
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"externalId": "nps-response-1",
"userId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"score": 9,
"feedback": "I think the product is great!",
"respondedAt": "2020-12-29T20:16:27.370Z"
}
],
"next": "c29tZWJhc2U2NA=="
}

List NPS Responses For An Account GET

https://rest.vitally.io/resources/accounts/:accountId/npsResponses

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

GET https://rest.vitally.io/resources/accounts/:accountId/npsResponses?limit=10&from=cursor

Example Response

{
"results": [
{
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"externalId": "nps-response-1",
"userId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"score": 9,
"feedback": "I think the product is great!",
"respondedAt": "2020-12-29T20:16:27.370Z"
}
],
"next": "c29tZWJhc2U2NA=="
}

Create An NPS Response POST

https://rest.vitally.io/resources/npsResponses

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

POST https://rest.vitally.io/resources/npsResponses
{
"userId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"externalId": "nps-response-1",
"score": 9,
"feedback": "I think the product is great!",
"respondedAt": "2020-12-29T20:16:27.370Z",
}

Example Response

{
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"externalId": "nps-response-1",
"userId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"score": 9,
"feedback": "I think the product is great!",
"respondedAt": "2020-12-29T20:16:27.370Z"
}

Get An NPS Response GET

https://rest.vitally.io/resources/npsResponses/:id

Request Params

Property

Type

Description

id

string

The NPS Response ID assigned by Vitally

Update An NPS Response PUT

https://rest.vitally.io/resources/npsResponses/:id

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

https://rest.vitally.io/resources/npsResponses/:id

Request Params

Property

Type

Description

id

string

The NPS Response ID assigned by Vitally