Create pageview

Appends a single per-page analytics event — {viewId, pageNumber, documentId, versionNumber, duration} — and answers with its id.

POST /v1/dataroom/view/{linkId}/pageview

Addresshttps://api.hanzo.ai/v1/dataroom/view/{linkId}/pageview
MethodPOST
Operationpost_dataroom_view_by_linkid_pageview
AuthAuthorization: Bearer $HANZO_API_KEY

Appends a single per-page analytics event — {viewId, pageNumber, documentId, versionNumber, duration} — and answers with its id. These events are what the owner's analytics count.

No principal: the viewId from the authenticate step IS the authorisation, and it must belong to THIS link or the call is 404, so a session opened on one link cannot write events onto another. pageNumber is required (400 without it); documentId falls back to the document the session was opened on, and duration is the caller's own dwell measure, summed per page by analytics.

Events are additive: the same page reported twice is two views, which is the metric's whole point.

Request

1 field.

FieldInTypeRequiredDescription
linkIdpathstringyes

Response

The document declares no response body for this operation. It answers 200 on success and the platform error shape on failure — see Errors.

Examples

hanzo dataroom view pageview <linkId>
import { Configuration, DataroomApi } from 'hanzoai';

const api = new DataroomApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.postDataroomViewByLinkidPageview({ linkId: 'linkId' });
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import DataroomApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = DataroomApi(client).post_dataroom_view_by_linkid_pageview(link_id='linkId')
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.DataroomAPI.PostDataroomViewByLinkidPageview(context.Background()).Execute()
if err != nil {
	return err
}
use hanzo_client::apis::{configuration::Configuration, dataroom_api};

let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();

let result = dataroom_api::post_dataroom_view_by_linkid_pageview(&cfg, Default::default()).await?;
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.DataroomApi;

ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));

var result = new DataroomApi(client).postDataroomViewByLinkidPageview();
curl -X POST https://api.hanzo.ai/v1/dataroom/view/<linkId>/pageview \
  -H "Authorization: Bearer $HANZO_API_KEY"

MCP reaches dataroom through the dataroom tool, which names its 19 operations with its own verbs — this one among them, under a name only MCP declares. describe explains any of them:

curl -X POST https://api.hanzo.ai/v1/mcp \
  -H "Content-Type: application/json" \
  -d '{
       "jsonrpc": "2.0",
       "id": 1,
       "method": "tools/call",
       "params": {
         "name": "describe",
         "arguments": {
           "op": "get_dataroom_analytic_dataroom"
         }
       }
     }'

Dataroom API · All Hanzo APIs · Interactive reference

Was this page useful?