Skip to main content
POST
/
v1
/
agents
/
sessions
/
{session_id}
/
feedback
Submit Feedback
curl --request POST \
  --url https://api.mixpeek.com/v1/agents/sessions/{session_id}/feedback \
  --header 'Content-Type: application/json' \
  --data '
{
  "message_id": "<string>",
  "rating": "<string>",
  "feedback_text": "<string>"
}
'
{
  "session_id": "<string>",
  "message_id": "<string>",
  "rating": "<string>",
  "stored": true,
  "recorded_at": "2023-11-07T05:31:56Z"
}

Headers

Authorization
string

REQUIRED: Bearer token authentication using your API key. Format: 'Bearer sk_xxxxxxxxxxxxx'. You can create API keys in the Mixpeek dashboard under Organization Settings.

Examples:

"Bearer YOUR_API_KEY"

"Bearer YOUR_STRIPE_API_KEY"

X-Namespace
string

REQUIRED: Namespace identifier for scoping this request. All resources (collections, buckets, taxonomies, etc.) are scoped to a namespace. You can provide either the namespace name or namespace ID. Format: ns_xxxxxxxxxxxxx (ID) or a custom name like 'my-namespace'

Examples:

"ns_abc123def456"

"production"

"my-namespace"

Path Parameters

session_id
string
required

Session ID

Body

application/json

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 | null

Additional feedback text (OPTIONAL)

Response

Successful Response

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=datetime.utcnow() )

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