Skip to main content
POST
/
agents
/
{agent_id}
/
feedback
Provide Feedback
curl --request POST \
  --url https://api.contextual.ai/v1/agents/{agent_id}/feedback \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "feedback": "thumbs_up",
  "explanation": "<string>",
  "content_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "query_category": "<string>"
}
'
{
  "feedback_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

agent_id
string<uuid>
required

ID of the agent for which to provide feedback

Body

application/json

Input to POST feedback endpoint

message_id
string<uuid>
required

ID of the message on which to provide feedback.

feedback
enum<string>
required

Feedback to provide on the message. Set to "removed" to undo previously provided feedback.

Available options:
thumbs_up,
thumbs_down,
flagged,
removed
explanation
string

Optional explanation for the feedback.

content_id
string<uuid>

ID of the content on which to provide feedback, if feedback is on retrieval. Do not set (or set to null) while providing generation feedback.

query_category
string

The query category for the feedback.

Response

Successful Response

Response schema for feedback submission endpoint.

feedback_id
string<uuid>
required

ID of the submitted or updated feedback.