---
title: "Update a rating"
method: PATCH
path: "/agents/{agentId}/chat/{chatId}/ratings/{ratingId}"
tags: ["Ratings"]
---

# Update a rating

`PATCH /agents/{agentId}/chat/{chatId}/ratings/{ratingId}`

Update a specific rating of agent message

## Path parameters

- `agentId` string, required
- `chatId` string, required
- `ratingId` string, required

## Request body

- PartialRatingPayload — Make all properties in T optional
  - `score` number, double — The rating score: positive for favorable, negative for unfavorable
  - `agent_id` string — The ID of the agent
  - `chat_id` string — The ID of the chat containing the message
  - `knowledge_id` string — The ID of the agent's knowledge
  - `message_id` string — The ID of the message to rate

## Response `200`

OK

- ILogicalRating
  - `agent_id` string, required — The ID of the agent
  - `knowledge_id` string, required — The ID of the agent's knowledge
  - `external_id` string, required — An external identifier
  - `message_id` string — The ID of the message to rate
  - `chat_id` string, required — The ID of the chat containing the message
  - `score` number, double, required — The rating score: positive for favorable, negative for unfavorable
  - `id` string, required
  - `owner_id` string, required
  - `created_at` string, required
  - `modified_at` string, required

## Other responses

- `401` — AuthorizationError

---

[API](https://skmtc.net/d-id/apis/realtime-endpoints.md) · [All operations](https://skmtc.net/d-id/apis/realtime-endpoints/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/d-id/realtime-endpoints/versions/2f2425e1b6b6/schema)
