Hi @Stape!
I was able to recreate the CURL request that solved your old post using the new V3 Create Event endpoint, here:
curl --request POST \
--url https://a.klaviyo.com/api/events/ \
--header 'Authorization: Klaviyo-API-Key API_KEY' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'revision: 2023-07-15' \
--data '
{
"data": {
"type": "event",
"attributes": {
"properties": {
"page": "https://website.com/",
"browser": "Chrome",
"os": "Mac",
"$use_ip": "true",
"$is_session_activity": "true"
},
"metric": {
"data": {
"type": "metric",
"attributes": {
"name": "__activity__"
}
}
},
"profile": {
"data": {
"type": "profile",
"attributes": {
"properties": {
"$referrer": "{ \"ts\":1614270576, \"value\":\"\", \"first_page\":\"https://website.com/\" }",
"$last_referrer": "{ \"ts\":1617046396, \"value\":\"\", \"first_page\":\"https://website.com/\" }"
},
"email": "email@gmail.com"
}
}
}
}
}
}
'
Per your second question, server-side calls do not allow you to include viewed item information - that is only allowed via the JavaScript API as outlined in our developer documentation here:
I hope this helps, and thanks for using the Community!
- Brian