Horbit Developers
Reactions & views

Counts a view

POST
/v1/public/blog/posts/{post}/views

Call once when a reader opens the post (from the browser, so bots that never run script do not count). Repeat views by the same reader within 30 minutes are ignored — counted says which.

Authorization

x-api-key
headerx-api-key<token>

A tenant API key — secret (htk_…) or, where allowed, publishable (hpk_…).

Path Parameters

post*string

The post's slug (recommended) or id.

Request Body

application/json
  1. body
visitorId?string

Your own stable, anonymous id for the reader (e.g. a uuid kept in localStorage). Used to remember their reactions. Falls back to ip + user agent.

Response Body

Whether this call counted.

response?unknownapplication/json
curl -X POST 'https://api.horbit.ng/v1/public/blog/posts/five-lessons-open-data-hackathon/views' \  -H 'Content-Type: application/json' \  -d '{}'
{  "status": true,  "message": "View counted",  "data": {    "counted": true,    "views": 1285  }}