> For the complete documentation index, see [llms.txt](https://docs.wonderchat.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.wonderchat.io/api-reference/update-message-feedback.md).

# Update Message Feedback

Update the feedback status for an individual message (thumbs up or thumbs down).

## Endpoint

```
POST https://app.wonderchat.io/api/v1/update-message-feedback
```

## Request Parameters

| Parameter     | Type   | Required | Description                                         |
| ------------- | ------ | -------- | --------------------------------------------------- |
| `apiKey`      | string | ✅ Yes    | Your API key                                        |
| `messageId`   | string | ✅ Yes    | The ID of the message to update feedback for        |
| `feedback`    | string | ✅ Yes    | Feedback value: `"HELPFUL"` or `"NOT_HELPFUL"`      |
| `userComment` | string | ❌ No     | Additional comment from the user about the feedback |

## Example Request

```bash
curl --location --request POST 'https://app.wonderchat.io/api/v1/update-message-feedback' \
--header 'Content-Type: application/json' \
--data-raw '{
  "apiKey": "YOUR_API_KEY",
  "messageId": "YOUR_MESSAGE_ID",
  "feedback": "HELPFUL",
  "userComment": "This answer was very helpful!"
}'
```

## Example Response

```json
{
  "status": "success",
  "feedback": "HELPFUL",
  "wasUpdated": false,
  "messageFeedback": {
    "id": "clm1n0vvs000008l43ez2bxyz",
    "feedbackType": "HELPFUL",
    "submittedAt": "2023-12-01T06:35:45.123Z"
  }
}
```

## Feedback Values

| Value         | Description                                     |
| ------------- | ----------------------------------------------- |
| `HELPFUL`     | Positive feedback - the message was helpful     |
| `NOT_HELPFUL` | Negative feedback - the message was not helpful |

## Response Fields

| Field                          | Type    | Description                                       |
| ------------------------------ | ------- | ------------------------------------------------- |
| `status`                       | string  | Operation status (`"success"` or `"error"`)       |
| `feedback`                     | string  | The feedback value that was submitted             |
| `wasUpdated`                   | boolean | Whether this was an update to existing feedback   |
| `messageFeedback.id`           | string  | Unique identifier for the feedback entry          |
| `messageFeedback.feedbackType` | string  | The type of feedback submitted                    |
| `messageFeedback.submittedAt`  | string  | ISO 8601 timestamp of when feedback was submitted |

## Use Cases

* **Message Quality Tracking**: Monitor individual message performance
* **User Satisfaction**: Understand which responses users find helpful
* **Improvement Insights**: Collect user comments to understand why responses weren't helpful
* **Training Optimization**: Use feedback data to improve chatbot responses


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.wonderchat.io/api-reference/update-message-feedback.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
