POST
/
cortex
/
feedback
curl --request POST \
  --url https://api.sophra.org/api/cortex/feedback \
  --header 'Content-Type: application/json' \
  --data '{
  "sessionId": "sess_abc123",
  "feedback": [
    {
      "queryId": "q_xyz789",
      "rating": 0.8,
      "metadata": {
        "userAction": "click",
        "timestamp": "2024-03-25T10:30:00Z",
        "resultId": "res_456def",
        "queryHash": "hash123",
        "engagementType": "direct",
        "customMetadata": {
          "searchType": "hybrid",
          "position": 3,
          "timeToClick": 2500,
          "deviceType": "desktop",
          "viewport": {
            "width": 1920,
            "height": 1080
          },
          "scrollDepth": 0.75,
          "dwellTime": 45000,
          "category": "documentation",
          "language": "en"
        }
      }
    }
  ]
}'
{
  "success": true,
  "data": {
    "feedbackId": "<string>",
    "processed": true,
    "timestamp": "2023-11-07T05:31:56Z"
  }
}

Body

application/json

Response

201 - application/json

Feedback recorded successfully

The response is of type object.