cURL
curl -X POST https://reygrid.com/api/v1/agents/{AgentId}/conversations/user_42/messages/msg_x6tWaZ3H9oOKd/feedback \
-H "Authorization: Bearer $REYGRID_API_KEY" \
-H "Content-Type: application/json" \
-d '{"rating": "down", "comment": "The shipping times are out of date"}'from reygrid import ReyGrid
client = ReyGrid(api_key="YOUR_API_KEY")
client.rate_message(
"{AgentId}",
"user_42",
"msg_x6tWaZ3H9oOKd",
"down",
comment="The shipping times are out of date",
)import { ReyGrid } from "reygrid";
const client = new ReyGrid({ apiKey: "YOUR_API_KEY" });
await client.rateMessage("{AgentId}", "user_42", "msg_x6tWaZ3H9oOKd", {
rating: "down",
comment: "The shipping times are out of date",
});{
"success": true,
"feedback": {
"rating": "down",
"comment": "The shipping times are out of date",
"createdAt": "2026-10-05T10:21:34.120Z"
}
}{
"success": false,
"error": {
"code": "INVALID_BODY",
"message": "Invalid body",
"list": {
"title": [
"Title too short"
]
}
}
}{
"error": "Unauthorized",
"code": "AUTH_REQUIRED"
}{
"success": false,
"error": {
"code": "SOURCE_NOT_FOUND",
"message": "This source does not exist"
}
}Messages
Rate a reply
Records a thumbs up or down (and an optional comment) on an assistant message. Sending it again replaces the previous rating.
POST
/
agents
/
{agentId}
/
conversations
/
{conversationRef}
/
messages
/
{messageId}
/
feedback
cURL
curl -X POST https://reygrid.com/api/v1/agents/{AgentId}/conversations/user_42/messages/msg_x6tWaZ3H9oOKd/feedback \
-H "Authorization: Bearer $REYGRID_API_KEY" \
-H "Content-Type: application/json" \
-d '{"rating": "down", "comment": "The shipping times are out of date"}'from reygrid import ReyGrid
client = ReyGrid(api_key="YOUR_API_KEY")
client.rate_message(
"{AgentId}",
"user_42",
"msg_x6tWaZ3H9oOKd",
"down",
comment="The shipping times are out of date",
)import { ReyGrid } from "reygrid";
const client = new ReyGrid({ apiKey: "YOUR_API_KEY" });
await client.rateMessage("{AgentId}", "user_42", "msg_x6tWaZ3H9oOKd", {
rating: "down",
comment: "The shipping times are out of date",
});{
"success": true,
"feedback": {
"rating": "down",
"comment": "The shipping times are out of date",
"createdAt": "2026-10-05T10:21:34.120Z"
}
}{
"success": false,
"error": {
"code": "INVALID_BODY",
"message": "Invalid body",
"list": {
"title": [
"Title too short"
]
}
}
}{
"error": "Unauthorized",
"code": "AUTH_REQUIRED"
}{
"success": false,
"error": {
"code": "SOURCE_NOT_FOUND",
"message": "This source does not exist"
}
}Authorizations
ReyGrid API key sent as a Bearer token.
Path Parameters
The ID of the agent.
The conversationId or userId of the conversation.
The ID of an assistant message.
Body
application/json