Ticket Ratings

Collect customer satisfaction on resolved tickets. Requires a Bearer token (see Tickets Overview).

Rate a ticket

POST /tickets/ratings/{ticket_id}

Submits a satisfaction rating once a ticket is Accepted or Declined. A ticket can only be rated once — rating an already-rated ticket returns 422.

Path parameters

ParamTypeRequiredDescription
ticket_idintegeryesThe ticket ID.

Body

PropTypeRequiredDescription
ratinginteger — 1 to 5yesSatisfaction score.
commentstring (nullable)optionalOptional free-text feedback.
curl --request POST \
  --url https://queries.envia.com/tickets/ratings/987654 \
  --header 'Authorization: Bearer YOUR_API_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{ "rating": 5, "comment": "Fast and helpful resolution." }'

Response 200

{ "data": true, "message": "Successful." }