PUT
/
feedback
/
{id}
from portkey_ai import Portkey

portkey = Portkey(api_key="PORTKEY_API_KEY")

feedback = portkey.feedback.update(
  feedback_id="FEEDBACK_ID",
  value=1
)

print(feedback)
{
  "status": "<string>",
  "message": "<string>",
  "feedback_ids": [
    "<string>"
  ]
}

Authorizations

x-portkey-api-key
string
header
required

Path Parameters

id
string
required

Feedback ID

Body

application/json
value
integer
required

Feedback value, an integer between -10 and 10.

Required range: -10 <= x <= 10
weight
number
default:1

Weight of the feedback, a float between 0 and 1. Default is 1.0.

Required range: 0 <= x <= 1
metadata
object

Additional metadata for the feedback.

Response

200 - application/json
Feedback successfully updated
status
string

success or failure

message
string

Confirmation message indicating successful feedback submission.

feedback_ids
string[]

Ids of Feedbacks created returned in the same order as input