Count a view or a read
POST
/api/v1/stats/hit
const url = 'https://example.com/api/v1/stats/hit';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"event":"view","id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","kind":"home","locale":"th","referrer":"example","width":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/stats/hit \ --header 'Content-Type: application/json' \ --data '{ "event": "view", "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "kind": "home", "locale": "th", "referrer": "example", "width": 1 }'Answers 204 whether or not the hit was counted. In bundled mode only this site may send; in headless mode any origin may, with Content-Type: application/json.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
event
required
string
id
string format: uuid
kind
required
string
locale
required
string
referrer
string
width
required
integer
Responses
Section titled “ Responses ”Received. The answer is the same whether or not the hit was counted.

