NPS® Responses

When a recipient responds to an NPS survey, their rating, comment, and last survey date are captured. You can export the responses for your individual NPS survey by using the Responses API. Visit the Incremental Export documentation for information on how to export all responses across surveys.

JSON Format

Responses are represented as JSON objects which have the following keys:

Name Type Read-Only Mandatory Comment
id integer yes no Automatically assigned when the response is created
recipient_id integer yes yes The recipient the response belongs to
rating integer no yes The rating
comment string no no The comment
created_at date yes no When the response was created
updated_at date yes no When the response was updated
Example
{
  "id":           1,
  "recipient_id": 1,
  "rating":       9,
  "comment":      "It has improved the efficiency of our support department.",
  "created_at":   "2013-08-29T00:00:00-07:00",
  "updated_at":   "2013-08-29T00:00:00-07:00"
}

List Responses

GET /api/v2/nps/surveys/{survey_id}/responses.json

Lists all responses for a given survey.

Allowed for
  • Admins
Using curl
curl https://{subdomain}.zendesk.com/api/v2/nps/surveys/{survey_id}/responses.json \
  -v -u {email_address}:{password}
Filters
  • category=[promoters|passives|detractors]
  • has_comment=[true|false]
Example Response
Status: 200 OK

{
  "responses": [
    {
      "id": 1,
      "recipient_id": 42,
      "rating": 10,
      "comment": "I really like it",
      "created_at": "2014-01-07T17:22:00Z",
      "updated_at": "2014-01-07T17:26:45Z"
    }
  ],
  ...
}

Show Response

GET /api/v2/nps/surveys/{survey_id}/responses/{id}.json

Allowed for
  • Admins
Using curl
curl https://{subdomain}.zendesk.com/api/v2/nps/surveys/{survey_id}/responses/{id}.json \
  -v -u {email_address}:{password}
Example Response
Status: 200 OK

{
  "response": {
    "id": 1,
    "recipient_id": 42,
    "rating": 10,
    "comment": "I really like it",
    "created_at": "2014-01-07T17:22:00Z",
    "updated_at": "2014-01-07T17:26:45Z"
  }
}

Create Response

POST /api/v2/nps/surveys/{survey_id}/responses.json

Creates a response for a given survey and recipient. If the recipient already has a response, it's updated.

Allowed for
  • Admins
Using curl
curl https://{subdomain}.zendesk.com/api/v2/nps/surveys/{survey_id}/responses.json \
  -d '{ "response": { "recipient_id": 1, "rating": 10, "comment": "I really like it" } }'
  -H "Content-Type: application/json" -v -u {email_address}:{password} -X POST
Example Response
Status: 201 Created

{
  "response": {
    "id": 1,
    "recipient_id": 42,
    "rating": 10,
    "comment": "I really like it",
    "created_at": "2014-01-07T17:22:00Z",
    "updated_at": "2014-01-07T17:26:45Z"
  }
}

Update Response

PUT /api/v2/nps/surveys/{survey_id}/responses/{id}.json

Allowed for
  • Admins
Using curl
curl https://{subdomain}.zendesk.com/api/v2/nps/surveys/{survey_id}/responses/{id}.json \
  -d '{ "response": { "rating": 10, "comment": "I really like it" } }'
  -H "Content-Type: application/json" -v -u {email_address}:{password} -X PUT
Example Response
Status: 200 OK

{
  "response": {
    "id": 1,
    "recipient_id": 42,
    "rating": 10,
    "comment": "I really like it",
    "created_at": "2014-01-07T17:22:00Z",
    "updated_at": "2014-01-07T17:26:45Z"
  }
}