---
title: "Submit Feedback"
method: POST
path: "/v1/agents/sessions/{session_id}/feedback"
tags: ["Agent Sessions"]
---

# Submit Feedback

`POST /v1/agents/sessions/{session_id}/feedback`

Submit feedback on an assistant message.

When positive feedback is received, the conversation exchange is stored
to memory for future context. When negative feedback is received, the
exchange is NOT stored. This enables learning from quality interactions.

Args:
    request: FastAPI request with tenant context
    session_id: Session identifier
    payload: Feedback request

Returns:
    SubmitFeedbackResponse with feedback status

Raises:
    NotFoundError: If session or message not found

Example:
    ```bash
    curl -X POST http://localhost:8000/v1/agents/sessions/ses_abc123/feedback \
      -H "Authorization: Bearer {api_key}" \
      -H "X-Namespace: {namespace_id}" \
      -H "Content-Type: application/json" \
      -d '{
        "message_id": "msg_xyz789",
        "rating": "positive",
        "feedback_text": "Very helpful response!"
      }'
    ```

## Path parameters

- `session_id` string, required — Session ID

## Request body

- SubmitFeedbackRequest — Request payload for submitting feedback on a message. Attributes: message_id: The assistant message ID to provide feedback for rating: Feedback rating (positive or negative) feedback_text: Optional additional feedback text Example: ```python request = SubmitFeedbackRequest( message_id="msg_abc123", rating="positive", feedback_text="This was very helpful!" ) ```
  - `message_id` string, required — Assistant message ID (REQUIRED)
  - `rating` string, required — Feedback rating: 'positive' or 'negative' (REQUIRED)
  - `feedback_text` string, nullable — Additional feedback text (OPTIONAL)

## Response `200`

Successful Response

- SubmitFeedbackResponse — Response for feedback submission. Attributes: session_id: Session identifier message_id: Message that received feedback rating: The feedback rating submitted stored: Whether the exchange was stored to memory recorded_at: Timestamp when feedback was recorded Example: ```python response = SubmitFeedbackResponse( session_id="ses_abc123", message_id="msg_xyz789", rating="positive", stored=True, recorded_at=current_time() ) ```
  - `session_id` string, required — Session identifier
  - `message_id` string, required — Message identifier
  - `rating` string, required — Feedback rating submitted
  - `stored` boolean, required — Whether exchange was stored to memory
  - `recorded_at` string, date-time, required — Feedback timestamp

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `422` — Validation Error
- `500` — Internal Server Error

---

[API](https://skmtc.net/mixpeek/apis/mixpeek-api.md) · [All operations](https://skmtc.net/mixpeek/apis/mixpeek-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mixpeek/mixpeek-api/versions/220a3b263fda/schema)
