# 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: 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:

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

The question should be specific, self-contained, and written in natural language.
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.
