# Rate one message in a session good or bad, with an optional comment. A null rating clears your rating.

Source: <https://everruns.com/docs/api/operations/set_message_feedback/>

PUT

/v1/sessions/{session\_id}/messages/{message\_id}/feedback

Select code samplecURL (shell:curl)

```js
const url = 'https://app.everruns.com/api/v1/sessions/example/messages/example/feedback';
const options = {method: 'PUT'};


try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```sh
curl --request PUT \
  --url https://app.everruns.com/api/v1/sessions/example/messages/example/feedback
```

* Production APIapp.everruns.com/api/v1/sessions/{session\_id}/messages/{message\_id}/feedback

## Parameters

### Path Parameters

**session\_id**

required

string

Prefixed public identifier

**message\_id**

required

string

Prefixed public identifier

## Responses

### 200

Success

Media typeapplication/json

The caller’s rating of one message.

object

**comment**

Optional note kept with the rating.

string | null

**message\_id**

required

Message the rating is for (`msg_...`).

string

**rating**

One of:

* string

  `good`, `bad`, or null when the rating was cleared.

  string

  Allowed values: good bad

* null

  null

**updated\_at**

required

When the rating was last set or cleared.

string format: date-time

##### Example

```json
{
  "message_id": "msg_01933b5a00007000800000000000001",
  "rating": "good"
}
```

### 404

Session or message not found