Media and playlists
Create video analytics event
Records a video player event for a media item: video.started, video.paused, video.resumed, video.completed or video.dismissed. video_analytics.event_type, media_id and occurred_at (Unix timestamp in seconds) are required; position_in_seconds is the playback position. Send the shop in metadata.fluid_shop (404 when it does not resolve). metadata.fluid_session is optional here, and metadata.attribution credits a rep. No authentication is required. The 201 response has no resource, only meta. Used by the FairShare SDK; direct REST integrations should use checkout-v2026-04.
POST
/
api
/
public
/
v2025-06
/
events
/
media
/
video_analytics
Create video analytics event
curl --request POST \
--url https://api.fluid.app/api/public/v2025-06/events/media/video_analytics \
--header 'Content-Type: application/json' \
--data '
{
"video_analytics": {
"event_type": "video.completed",
"media_id": 7731,
"occurred_at": 1789399862,
"position_in_seconds": 94.5
},
"metadata": {
"fluid_shop": "dunder-mifflin.fluid.app",
"fluid_session": "fs_7kQx9mR2vWbT4nHcJ8pLz3",
"fluid_locale": "en_US",
"attribution": {
"username": "dwight-schrute"
}
}
}
'import requests
url = "https://api.fluid.app/api/public/v2025-06/events/media/video_analytics"
payload = {
"video_analytics": {
"event_type": "video.completed",
"media_id": 7731,
"occurred_at": 1789399862,
"position_in_seconds": 94.5
},
"metadata": {
"fluid_shop": "dunder-mifflin.fluid.app",
"fluid_session": "fs_7kQx9mR2vWbT4nHcJ8pLz3",
"fluid_locale": "en_US",
"attribution": { "username": "dwight-schrute" }
}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
video_analytics: {
event_type: 'video.completed',
media_id: 7731,
occurred_at: 1789399862,
position_in_seconds: 94.5
},
metadata: {
fluid_shop: 'dunder-mifflin.fluid.app',
fluid_session: 'fs_7kQx9mR2vWbT4nHcJ8pLz3',
fluid_locale: 'en_US',
attribution: {username: 'dwight-schrute'}
}
})
};
fetch('https://api.fluid.app/api/public/v2025-06/events/media/video_analytics', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fluid.app/api/public/v2025-06/events/media/video_analytics",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'video_analytics' => [
'event_type' => 'video.completed',
'media_id' => 7731,
'occurred_at' => 1789399862,
'position_in_seconds' => 94.5
],
'metadata' => [
'fluid_shop' => 'dunder-mifflin.fluid.app',
'fluid_session' => 'fs_7kQx9mR2vWbT4nHcJ8pLz3',
'fluid_locale' => 'en_US',
'attribution' => [
'username' => 'dwight-schrute'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.fluid.app/api/public/v2025-06/events/media/video_analytics"
payload := strings.NewReader("{\n \"video_analytics\": {\n \"event_type\": \"video.completed\",\n \"media_id\": 7731,\n \"occurred_at\": 1789399862,\n \"position_in_seconds\": 94.5\n },\n \"metadata\": {\n \"fluid_shop\": \"dunder-mifflin.fluid.app\",\n \"fluid_session\": \"fs_7kQx9mR2vWbT4nHcJ8pLz3\",\n \"fluid_locale\": \"en_US\",\n \"attribution\": {\n \"username\": \"dwight-schrute\"\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.fluid.app/api/public/v2025-06/events/media/video_analytics")
.header("Content-Type", "application/json")
.body("{\n \"video_analytics\": {\n \"event_type\": \"video.completed\",\n \"media_id\": 7731,\n \"occurred_at\": 1789399862,\n \"position_in_seconds\": 94.5\n },\n \"metadata\": {\n \"fluid_shop\": \"dunder-mifflin.fluid.app\",\n \"fluid_session\": \"fs_7kQx9mR2vWbT4nHcJ8pLz3\",\n \"fluid_locale\": \"en_US\",\n \"attribution\": {\n \"username\": \"dwight-schrute\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/public/v2025-06/events/media/video_analytics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"video_analytics\": {\n \"event_type\": \"video.completed\",\n \"media_id\": 7731,\n \"occurred_at\": 1789399862,\n \"position_in_seconds\": 94.5\n },\n \"metadata\": {\n \"fluid_shop\": \"dunder-mifflin.fluid.app\",\n \"fluid_session\": \"fs_7kQx9mR2vWbT4nHcJ8pLz3\",\n \"fluid_locale\": \"en_US\",\n \"attribution\": {\n \"username\": \"dwight-schrute\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"meta": {
"request_id": "d2a9c4e7-5b1f-4c38-9a60-8e3b7f2d1c95",
"timestamp": "2026-09-14T15:31:03Z"
}
}⌘I
Create video analytics event
curl --request POST \
--url https://api.fluid.app/api/public/v2025-06/events/media/video_analytics \
--header 'Content-Type: application/json' \
--data '
{
"video_analytics": {
"event_type": "video.completed",
"media_id": 7731,
"occurred_at": 1789399862,
"position_in_seconds": 94.5
},
"metadata": {
"fluid_shop": "dunder-mifflin.fluid.app",
"fluid_session": "fs_7kQx9mR2vWbT4nHcJ8pLz3",
"fluid_locale": "en_US",
"attribution": {
"username": "dwight-schrute"
}
}
}
'import requests
url = "https://api.fluid.app/api/public/v2025-06/events/media/video_analytics"
payload = {
"video_analytics": {
"event_type": "video.completed",
"media_id": 7731,
"occurred_at": 1789399862,
"position_in_seconds": 94.5
},
"metadata": {
"fluid_shop": "dunder-mifflin.fluid.app",
"fluid_session": "fs_7kQx9mR2vWbT4nHcJ8pLz3",
"fluid_locale": "en_US",
"attribution": { "username": "dwight-schrute" }
}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
video_analytics: {
event_type: 'video.completed',
media_id: 7731,
occurred_at: 1789399862,
position_in_seconds: 94.5
},
metadata: {
fluid_shop: 'dunder-mifflin.fluid.app',
fluid_session: 'fs_7kQx9mR2vWbT4nHcJ8pLz3',
fluid_locale: 'en_US',
attribution: {username: 'dwight-schrute'}
}
})
};
fetch('https://api.fluid.app/api/public/v2025-06/events/media/video_analytics', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fluid.app/api/public/v2025-06/events/media/video_analytics",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'video_analytics' => [
'event_type' => 'video.completed',
'media_id' => 7731,
'occurred_at' => 1789399862,
'position_in_seconds' => 94.5
],
'metadata' => [
'fluid_shop' => 'dunder-mifflin.fluid.app',
'fluid_session' => 'fs_7kQx9mR2vWbT4nHcJ8pLz3',
'fluid_locale' => 'en_US',
'attribution' => [
'username' => 'dwight-schrute'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.fluid.app/api/public/v2025-06/events/media/video_analytics"
payload := strings.NewReader("{\n \"video_analytics\": {\n \"event_type\": \"video.completed\",\n \"media_id\": 7731,\n \"occurred_at\": 1789399862,\n \"position_in_seconds\": 94.5\n },\n \"metadata\": {\n \"fluid_shop\": \"dunder-mifflin.fluid.app\",\n \"fluid_session\": \"fs_7kQx9mR2vWbT4nHcJ8pLz3\",\n \"fluid_locale\": \"en_US\",\n \"attribution\": {\n \"username\": \"dwight-schrute\"\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.fluid.app/api/public/v2025-06/events/media/video_analytics")
.header("Content-Type", "application/json")
.body("{\n \"video_analytics\": {\n \"event_type\": \"video.completed\",\n \"media_id\": 7731,\n \"occurred_at\": 1789399862,\n \"position_in_seconds\": 94.5\n },\n \"metadata\": {\n \"fluid_shop\": \"dunder-mifflin.fluid.app\",\n \"fluid_session\": \"fs_7kQx9mR2vWbT4nHcJ8pLz3\",\n \"fluid_locale\": \"en_US\",\n \"attribution\": {\n \"username\": \"dwight-schrute\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/public/v2025-06/events/media/video_analytics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"video_analytics\": {\n \"event_type\": \"video.completed\",\n \"media_id\": 7731,\n \"occurred_at\": 1789399862,\n \"position_in_seconds\": 94.5\n },\n \"metadata\": {\n \"fluid_shop\": \"dunder-mifflin.fluid.app\",\n \"fluid_session\": \"fs_7kQx9mR2vWbT4nHcJ8pLz3\",\n \"fluid_locale\": \"en_US\",\n \"attribution\": {\n \"username\": \"dwight-schrute\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"meta": {
"request_id": "d2a9c4e7-5b1f-4c38-9a60-8e3b7f2d1c95",
"timestamp": "2026-09-14T15:31:03Z"
}
}