Skip to content

Create conversation rating result

Request

Create a rating result for a specific conversation.

Security
ApiKeyAuth(Required scopes: conversation.satisfaction)
Path
conversationIdinteger, (int64)required
ratingIdstringrequired

The ratingId parameter has to be the ID of the offer created via invoking the /conversations/{conversationId}/ratings/offer endpoint.

Bodyapplication/jsonrequired

The rating result to be created for a conversation

ratingResultCsat (object) or Nps (object) or ThumbsUpOrDown (object)(SubmittedRatingResult)required
One of:
commentstring
submittedAtstring, (date-time)
userIdstringdeprecated

The userId property is no longer used so it's made optional to keep backwards compatibility. A null value can be provided instead of an actual ID.

POST
/beta/conversations/{conversationId}/ratings/{ratingId}/submit
curl -i -X POST \
  'https://dev.dixa.io/beta/conversations/{conversationId}/ratings/{ratingId}/submit' \
  -H 'Authorization: YOUR_API_KEY_HERE' \
  -H 'Content-Type: application/json' \
  -d '{
    "userId": "d3cf6f15-1497-4e71-92f2-9b3b228352bd",
    "ratingResult": {
      "value": 4,
      "_type": "Csat"
    },
    "comment": "Best customer service ever!",
    "submittedAt": "2024-03-11T16:39:30Z"
  }'

Responses

The created conversation rating result

Bodyapplication/json
dataobject(RatingResult)required
Response
{ "data": { "ratingId": "33cf4e5e-9ce9-461c-b668-be9b712b717c", "userId": "4c5f7efa-0822-4b75-bdf5-907fa7336e0c", "ratingResult": {}, "comment": "Excellent customer service!", "submittedAt": "2024-03-11T16:39:30Z" } }