Skip to main content
POST
/
ratings
cURL
curl --request POST \
  --url https://www.greenflash.ai/api/v1/ratings \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "externalConversationId": "123e4567-e89b-12d3-a456-426614174000",
  "rating": 4,
  "ratingMin": 1,
  "ratingMax": 5,
  "feedback": "Helpful response!",
  "ratedAt": "2025-07-09T09:00:00Z"
}
'
{
  "success": true
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Request payload for logging ratings.

productId
string<uuid>
required

The Greenflash product ID to rate.

rating
number
required

The rating value. Must be between ratingMin and ratingMax (inclusive).

ratingMin
number
required

The minimum possible rating value (e.g., 1 for a 1-5 scale).

ratingMax
number
required

The maximum possible rating value (e.g., 5 for a 1-5 scale).

conversationId
string<uuid>

The Greenflash conversation ID to rate. Either conversationId, externalConversationId, messageId, or externalMessageId must be provided.

externalConversationId
string

Your external conversation identifier to rate. Either conversationId, externalConversationId, messageId, or externalMessageId must be provided.

messageId
string

The Greenflash message ID to rate. Either conversationId, externalConversationId, messageId, or externalMessageId must be provided.

externalMessageId
string

Your external message identifier to rate. Either conversationId, externalConversationId, messageId, or externalMessageId must be provided.

ratedAt
string<date>

When the rating was given. Defaults to current time if not provided.

feedback
string

Optional text feedback accompanying the rating.

Response

Rating logged successfully

Success response for rating logging.

success
boolean
required

Whether the API call was successful.