---
title: "Rate an agent or operator reply"
method: POST
path: "/api/messages/{messageId}/rating"
tags: ["Messages"]
---

# Rate an agent or operator reply

`POST /api/messages/{messageId}/rating`

## Request

- Base URL: `https://api.supovia.com`
- URL: `https://api.supovia.com/api/messages/{messageId}/rating`
- Auth: none declared

Records how the visitor rated one reply, as `rating` and `ratingTime` on that message. Called by the embedded chat surfaces with the visitor's chat-session credentials; there is no API-key or operator-token path, because the rating is the customer's own answer and nobody else may author it. Re-rating the same message overwrites the previous value. Emits `MESSAGE_UPDATED_EVENT` to the dashboard.

## Request body

- object
  - `websiteId` string, required
  - `rating` 'unhappy' | 'neutral' | 'happy', required

## Response `200`

The rated message

## Other responses

- `400`: Unrecognised rating value
- `404`: No such rateable message for this chat session

---

[API](https://skmtc.dev/supovia/apis/supovia-api.md) · [All operations](https://skmtc.dev/supovia/apis/supovia-api/llms.txt) · [OpenAPI document](https://skmtc.dev/supovia/apis/supovia-api/revisions/1c5beb84e9fa?raw)
