---
title: "Submit Span Feedback"
method: POST
path: "/spans/{span_id}/feedback"
tags: ["spans"]
---

# Submit Span Feedback

`POST /spans/{span_id}/feedback`

Submit human feedback for a span.

This endpoint allows you to provide feedback (thumbs up/down) on a span's output.
The feedback is stored on the associated generation and can trigger auto-save
to the function's dataset based on the observer's configuration.

- score=1.0: Positive feedback (thumbs up)
- score=0.0: Negative feedback (thumbs down)
- Intermediate values (e.g., 0.5) are supported for nuanced feedback

## Path parameters

- `span_id` string, uuid, required — The ID of the span to provide feedback on

## Request body

- SubmitFeedbackRequest
  - `score` number, required — Feedback score (0.0=negative, 1.0=positive)
  - `comment` string, nullable — Optional comment explaining the feedback
  - `save_to_dataset` boolean, nullable — Force save to dataset (True=force save, False=never save, None=use auto-save config)

## Response `200`

Successful Response

- SubmitFeedbackResponse
  - `span_id` string, uuid, required — The ID of the span
  - `score` number, required — The feedback score that was submitted
  - `comment` string, nullable — The feedback comment that was submitted
  - `example_saved` boolean, required — Whether the example was saved to the dataset

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `402` — Payment Required (out of credits)
- `404` — Not Found
- `422` — Request Validation Error

---

[API](https://skmtc.dev/opper/apis/opper-api-v2.md) · [All operations](https://skmtc.dev/opper/apis/opper-api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/opper/opper-api-v2/revisions/d3ccdaa15678/schema)
