Satisfaction Ratings

If you have enabled satisfaction ratings for your account, this end point allows you to quickly retrieve all ratings.

JSON Format

Name Type Read-only Mandatory Comment
id integer yes no Automatically assigned upon creation
url string yes no The API url of this rating
assignee_id integer yes yes The id of agent assigned to at the time of rating
group_id integer yes yes The id of group assigned to at the time of rating
requester_id integer yes yes The id of ticket requester submitting the rating
ticket_id integer yes yes The id of ticket being rated
score string yes yes The rating: "offered", "unoffered", "good" or "bad"
created_at date yes no The time the satisfaction rating got created
updated_at date yes no The time the satisfaction rating got updated
comment string yes no The comment received with this rating, if available
Example
{
  "id":              35436,
  "url":             "https://company.zendesk.com/api/v2/satisfaction_ratings/62.json",
  "assignee_id":     135,
  "group_id":        44,
  "requester_id":    7881,
  "ticket_id":       208,
  "score":           "good",
  "updated_at":      "2011-07-20T22:55:29Z",
  "created_at":      "2011-07-20T22:55:29Z"
}

List Satisfaction Ratings

GET /api/v2/satisfaction_ratings.json

List all received satisfaction rating requests ever issued for your account.

Allowed For:
  • Admins
Using curl
curl https://{subdomain}.zendesk.com/api/v2/satisfaction_ratings.json \
  -v -u {email_address}:{password}
Filter

score=received |received_with_comment | received_without_comment good | good_with_comment | good_without_comment bad | bad_with_comment | bad_without_comment

start_time: Time of the oldest satisfaction rating to retrieve in Unix epoch time

end_time: Time of the most recent satisfaction rating to retrieve in Unix epoch time

Example Response
Status: 200 OK

{
  "satisfaction_ratings": [
    {
      "id":              35436,
      "url":             "https://company.zendesk.com/api/v2/satisfaction_ratings/35436.json",
      "assignee_id":     135,
      "group_id":        44,
      "requester_id":    7881,
      "ticket_id":       208,
      "score":           "good",
      "updated_at":      "2011-07-20T22:55:29Z",
      "created_at":      "2011-07-20T22:55:29Z",
      "comment":         "Awesome support!"
    },
    {
      "id":              120447,
      "created_at":      "2012-02-01T04:31:29Z",
      "updated_at":      "2012-02-02T10:32:59Z",
      ...
    }
  ]
}

Show Satisfaction Rating

GET /api/v2/satisfaction_ratings/{id}.json

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

{
  "satisfaction_rating": {
    "id":              35436,
    "url":             "https://company.zendesk.com/api/v2/satisfaction_ratings/35436.json",
    "assignee_id":     135,
    "group_id":        44,
    "requester_id":    7881,
    "ticket_id":       208,
    "score":           "good",
    "updated_at":      "2011-07-20T22:55:29Z",
    "created_at":      "2011-07-20T22:55:29Z",
    "comment":         { ... }
  }
}

Create a Satisfaction Rating

POST /api/v2/tickets/{ticket_id}/satisfaction_rating.json

Create a CSAT rating for solved tickets, or for tickets that were previously solved and then reopened.

Allowed For:
  • Requester of the ticket

The requester must be a verified user.

Available parameters
Name Type Required Comments
sort_order string no One of asc, desc. Defaults to asc
Using curl
curl https://{subdomain}.zendesk.com/api/v2/tickets/{ticket_id}/satisfaction_rating.json \
  -X POST -d '{"satisfaction_rating": {"score": "good", "comment": "Awesome support."}}' \
  -v -u {email_address}:{password} -H "Content-Type: application/json"
Example Response
Status: 200 OK

{
  "satisfaction_rating": {
    "id":              35436,
    "url":             "https://company.zendesk.com/api/v2/satisfaction_ratings/35436.json",
    "assignee_id":     135,
    "group_id":        44,
    "requester_id":    7881,
    "ticket_id":       208,
    "score":           "good",
    "updated_at":      "2011-07-20T22:55:29Z",
    "created_at":      "2011-07-20T22:55:29Z",
    "comment":         { ... }
  }
}