Pull Vision data into reports, notebooks or your own tools. The REST API returns the same data as the MCP server, and every endpoint is read-only and returns JSON.
Authentication#
Send your API key as a Bearer token. The base URL is https://vision.henkanpartners.ai/api/v1.
curl -H "Authorization: Bearer <your-api-key>" https://vision.henkanpartners.ai/api/v1/sites
Keys look like hv_live_ followed by 43 characters. See API keys.
Endpoints#
| Method and path | MCP tool | Returns |
|---|---|---|
GET /api/v1/sites | list_sites | Sites of your organisation. |
GET /api/v1/sites/:siteId/overview | get_site_overview | Figures for a period. |
GET /api/v1/sessions | search_sessions | Sessions, newest first. |
GET /api/v1/sessions/:id/timeline | get_session_timeline | Steps and friction tags of a session. A click on a link includes its address (href, host and path). |
GET /api/v1/sessions/:id/summary | get_session_summary | The existing AI summary of a session. |
GET /api/v1/sites/:siteId/data-layer | list_data_layer_keys | The site's data layer keys and the values seen over 30 days. |
GET /api/v1/sites/:siteId/data-layer/breakdown | get_data_layer_breakdown | Sessions, friction rate and conversion rate per value or number bracket of one key. |
GET /api/v1/sites/:siteId/visitors | list_visitors | The site's human visitors with a visit in the period, newest visit first, with their generated names. |
GET /api/v1/visitors/:id | get_visitor_journey | One visitor's visits, newest first, with the pages of each visit and the data layer values pushed. |
GET /api/v1/sites/:siteId/funnels | list_funnels | The funnels saved on the site and their steps. |
GET /api/v1/funnels/:id | get_funnel_report | One funnel over range (24h, 7d or 30d, default 30d): sessions per step, share that left before the next step, devices, friction and session ids of those who left. Add breakdown_key (a text data layer key) for conversion per value. |
GET /api/v1/patterns | list_patterns | Patterns over the last 30 days. |
GET /api/v1/patterns/:id | get_pattern | One pattern with example sessions. |
Parameters#
| Endpoint | Parameter | Type | Description |
|---|---|---|---|
| Sites | cursor, limit | string, integer | Paging. limit is 1–100, default 50. |
| Site overview | range | 24h, 7d or 30d | Period. Defaults to 7d. |
| Sessions | site | UUID | Only this site. |
| Sessions | from, to | ISO date-time | Start and end, for example 2026-10-01T00:00:00Z. |
| Sessions | friction | string | A friction type such as rage_click or checkout_exit, or any. |
| Sessions | kind | human, ai_agent or all | Visitor type. Defaults to human. |
| Sessions | converted | boolean | Only converted, or only not converted, sessions. |
| Sessions | entry, device, q | string | Entry page, desktop / mobile / tablet, and text matched against the entry page. |
| Sessions | dl | string | Data layer conditions joined by ;: key:eq:value for a text value or a number key's exact value, key:gt:number, key:ge:number (at least) or key:lt:number for the session's highest value. At most 5. Example: loyalty_tier:eq:gold;cart_value:gt:150. |
| Sessions | cursor, limit | string, integer | Paging. limit is 1–100, default 50. |
| Data layer breakdown | key | string | Required. A key listed on the site. |
| Data layer breakdown | range, kind, dl | 24h/7d/30d, human/ai_agent/all, string | Period (default 30d), visitor type (default human) and the same dl filter as Sessions. |
| Visitors | range | 24h, 7d or 30d | Visitors with a visit in this period. Defaults to 30d. |
| Visitors | returning, converted, with_friction | boolean | Only visitors with 2 visits or more, who converted, or with a friction tag in at least one visit. |
| Visitors | dl, cursor, limit | string, string, integer | The same dl filter as Sessions (any visit matches), and paging. limit is 1–100, default 50. |
| Timeline | cursor, limit | string, integer | Paging of steps. limit is 1–400, default 200. |
| Patterns | site, kind | UUID, human or ai_agent | Filters. kind defaults to human. |
| Patterns | cursor, limit | string, integer | Paging. limit is 1–100, default 50. |
Examples#
Mobile sessions that left from the checkout since 1 October:
curl -H "Authorization: Bearer <your-api-key>" \
"https://vision.henkanpartners.ai/api/v1/sessions?friction=checkout_exit&device=mobile&from=2026-10-01T00:00:00Z"
{
"sessions": [
{
"id": "6f1c2b9e-…",
"site_id": "3b8d4a6f-…",
"started_at": "2026-10-15T07:42:10Z",
"duration_s": 79,
"status": "ready",
"pages": 2,
"device": "mobile",
"browser": "Safari",
"os": "iOS",
"country": "FR",
"converted": false,
"friction_types": ["dead_click", "checkout_exit"],
"visitor_kind": "human",
"agent_verified": false,
"source": { "channel": "search", "name": "google.com" },
"data": {
"entry_path": "/products/linen-blazer",
"agent_name": null,
"referrer": "https://www.google.com/",
"utm": null
}
}
],
"next_cursor": "…"
}
Every session says where it came from: source.channel (search, direct, paid_search, social, paid_social, email, ai or referral) and source.name, the same source as in the dashboard, with the referrer and the utm tags under data. Filter on them with channel and source, for example the sessions that came from Bing:
curl -H "Authorization: Bearer <your-api-key>" \
"https://vision.henkanpartners.ai/api/v1/sessions?channel=search&source=bing.com"
GET /api/v1/sites/:siteId/overview adds sources: human sessions per channel and source over the period, with conversions and the split by device.
Your page groups and your channels#
When a site has groups saved on the Groups page, the API speaks in their names. The overview returns page_groups (pages, visitors, sessions and friction rate per group) and channel_groups (sessions and conversions per channel; own is false for visits that match none of your channels and keep their Vision channel). Each session carries source.channel_group, the name of your channel it belongs to, or null.
Filter sessions with page_group (visits that saw a page of that group) and channel_group. Both take a name, ignore case and need site:
curl -H "Authorization: Bearer <your-api-key>" \
"https://vision.henkanpartners.ai/api/v1/sessions?site=<site-id>&page_group=Product%20pages&channel_group=Newsletter"
An unknown name is answered with a 400 that lists the names that exist. The API reads the grouping marked as default for the site.
The timeline of one session:
curl -H "Authorization: Bearer <your-api-key>" \
https://vision.henkanpartners.ai/api/v1/sessions/6f1c2b9e-…/timeline
{
"session_id": "6f1c2b9e-…",
"total_steps": 10,
"truncated": false,
"next_cursor": null,
"data": {
"steps": [
{ "t_ms": 0, "kind": "page_view", "page": "/products/linen-blazer" },
{ "t_ms": 26600, "kind": "click", "page": "/products/linen-blazer", "target": "Add to bag" }
],
"friction_tags": [
{
"type": "dead_click",
"at_ms": 26600,
"page": "/products/linen-blazer",
"detail": "Add to bag"
}
]
}
}
Paging#
Lists return up to 100 items per call. When there are more, the response has a next_cursor value: pass it as cursor to get the next page. When next_cursor is null, you have everything.
Errors#
Errors return a JSON body { "error": { "code": "…", "message": "…" } }.
| Status | Code | When |
|---|---|---|
| 400 | bad_request, invalid_cursor | A parameter has the wrong format, or the cursor is not one the API returned. |
| 400 | unknown_key | The data layer key is not listed on the site. |
| 401 | unauthorized | The key is missing, malformed or revoked. |
| 404 | not_found | Unknown endpoint, or an id that does not exist in your organisation. Ids of other organisations always return 404. |
| 404 | no_summary | The session has no AI summary yet. |
| 429 | rate_limited | Too many requests. Wait for the number of seconds in the Retry-After header. |
| 500 | internal | Something went wrong on our side. Try again later. |
Plans#
The REST API is included on the POC and Max plans. On other plans it answers 403 with the code plan_feature; MCP works on every plan. See Plans.
