---
title: "Rate an AI agent reply as the signed-in operator"
method: POST
path: "/api/messages/{messageId}/rating/operator"
tags: ["Messages"]
---

# Rate an AI agent reply as the signed-in operator

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

## Request

- Base URL: `https://api.supovia.com`
- URL: `https://api.supovia.com/api/messages/{messageId}/rating/operator`
- Auth: API key in header `Authorization`

Records how the signed-in operator rated one AI agent reply, on the same three faces the visitor rates replies with, and optionally why. Each operator holds one rating per message: rating again replaces theirs and leaves their colleagues' ratings alone. A `comment` explains an `unhappy` or `neutral` rating; leaving it out keeps the comment the operator already wrote, an empty string removes it, and a `happy` rating never keeps one. Operator ratings are team-only: no visitor read, visitor event or webhook carries them. Emits `MESSAGE_UPDATED_EVENT` to the dashboard.

## Request body

- object
  - `rating` 'unhappy' | 'neutral' | 'happy', required
  - `comment` string: What was wrong with the reply

## Response `200`

The message with its updated operator ratings

## Other responses

- `400`: An unrecognised rating, or a comment that is too long or given with a happy rating
- `404`: No such AI agent reply in the operator's organization
- `409`: The message's operator ratings changed concurrently, or it holds the maximum number of ratings

---

[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)
