Session Telemetry Beacon

POST http://localhost/api/v1/interaction/session-beacon scope: interaction.session

Accumulates one slice of a session's mouse/keyboard/focus timeline, identified by session_id — call repeatedly through a page or checkout flow; GET the accumulated session's risk verdict via the endpoint below once the flow completes.

Parameters

Field Type Optional Description
session_id string Required Up to 128 characters — a client-generated identifier for this browsing session.

Example Request

curl -X POST http://localhost/api/v1/interaction/session-beacon \
  -H "Authorization: Bearer wsk_xxx_xxx" \
  -d "session_id=sess_a1b2c3d4"
<?php
$ch = curl_init('http://localhost/api/v1/interaction/session-beacon');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer wsk_xxx_xxx']);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query(['session_id' => 'sess_a1b2c3d4']));
$response = curl_exec($ch);
curl_close($ch);

$data = json_decode($response, true);
import requests

response = requests.post("http://localhost/api/v1/interaction/session-beacon",
    headers={"Authorization": "Bearer wsk_xxx_xxx"},
    data={"session_id": "sess_a1b2c3d4"},
)

data = response.json()
package main

import (
	"fmt"
	"io"
	"net/http"
	"strings"
)

func main() {
	client := &http.Client{}
	body := strings.NewReader("session_id=sess_a1b2c3d4")
	req, _ := http.NewRequest("POST", "http://localhost/api/v1/interaction/session-beacon", body)
	req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
	req.Header.Set("Authorization", "Bearer wsk_xxx_xxx")

	resp, err := client.Do(req)
	if err != nil {
		panic(err)
	}
	defer resp.Body.Close()

	respBody, _ := io.ReadAll(resp.Body)
	fmt.Println(string(respBody))
}

Example Response

{
  "received": true
}