PUT
/
api
/
analytics
/
ctr
curl --request PUT \
  --url https://api.trieve.ai/api/analytics/ctr \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'TR-Dataset: <tr-dataset>' \
  --data '{
  "clicked_chunk_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "clicked_chunk_tracking_id": "<string>",
  "ctr_type": "search",
  "metadata": "<any>",
  "position": 123,
  "request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}'
This response has no body data.

Authorizations

Authorization
string
header
required

Headers

TR-Dataset
string
required

The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.

Body

application/json
JSON request payload to send CTR data
ctr_type
enum<string>
required
Available options:
search,
rag,
recommendation
position
integer
required

The position of the clicked chunk

request_id
string
required

The request id for the CTR data

clicked_chunk_id
string | null

The ID of chunk that was clicked

clicked_chunk_tracking_id
string | null

The tracking ID of the chunk that was clicked

metadata
any | null

Any metadata you want to include with the event i.e. action, user_id, etc.