PUT
/
api
/
analytics
/
events
curl --request PUT \
  --url https://api.trieve.ai/api/analytics/events \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'TR-Dataset: <tr-dataset>' \
  --data '{
  "event_name": "<string>",
  "event_type": "view",
  "items": [
    "<string>"
  ],
  "metadata": "<any>",
  "request": {
    "request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "request_type": "search"
  },
  "user_id": "<string>"
}'
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 event data
event_name
string
required

The name of the event

event_type
enum<string>
required
Available options:
view
items
string[]
required

The items that were viewed

metadata
any | null

Any other metadata associated with the event

request
object
user_id
string | null

The user id of the user who viewed the items