Submit message feedback (like/dislike)
Conversations
Submit Message Feedback
Submit user feedback (thumbs up/down and optional text) for a message. Supports both Auth0 JWT and device-based authentication for guest users.
POST
Submit message feedback (like/dislike)
Submit user feedback (like/dislike rating and optional text comments) for a specific message. This endpoint supports both registered users (Auth0 JWT) and guest users (device-based authentication), making it accessible during free trial flows.Documentation Index
Fetch the complete documentation index at: https://docs.handauncle.com/llms.txt
Use this file to discover all available pages before exploring further.
Authentication Methods
Unlike other conversation endpoints, this route accepts two authentication methods:-
Auth0 JWT (Registered users)
- Header:
Authorization: Bearer <token> - Standard authenticated flow
- Header:
-
Device-based (Guest users)
- Headers:
x-device-id,x-user-id,x-platform - Same authentication as
/api/v1/ai/chat - Enables feedback during trial/guest sessions
- Headers:
Use Cases
- Thumbs up/down on AI responses
- Report inaccuracies with text feedback
- Track user satisfaction for model improvements
- A/B testing different prompts or models
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
rating | 1 | -1 | ✅ Yes | 1 for like (👍), -1 for dislike (👎) |
feedback | string | ❌ No | Optional text feedback (max 1000 chars) |
Response
Returns the updated feedback data with a timestamp.Examples
Error Responses
400 Bad Request - Invalid Rating
401 Unauthorized - Missing Authentication
403 Forbidden - Wrong User
404 Not Found - Message Doesn’t Exist
Validation Rules
ratingmust be exactly1or-1(no other values accepted)feedbackis optional but limited to 1000 charactersmessageIdmust be a valid 24-character MongoDB ObjectId- User must own the conversation containing the message
Notes
- Idempotent: Submitting feedback multiple times overwrites previous feedback
- Guest support: Same authentication pattern as chat API for seamless trial experience
- Privacy: Only the message owner can submit feedback
- Analytics: Feedback data can be used to improve AI model performance
- No removal: Once submitted, feedback can only be updated (not deleted)
Related Endpoints
- List Messages - Get messages to display feedback UI
- Chat - Create messages that can receive feedback
- Get Conversation - View conversation metadata
Authorizations
Auth0 access token for registered users.
Path Parameters
MongoDB ObjectId of the message to rate
Pattern:
^[a-f0-9]{24}$Example:
"507f1f77bcf86cd799439011"
Body
application/json