DocsOpen Henkan Vision
Agents and API

REST API reference

Read sites, sessions, timelines, summaries and patterns over HTTPS with a read-only API key.

Up to date with v1.64.8Updated 22 November 20265 min read

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.

The tool reference (select Reference on the API & MCP page), with search_sessions expanded.
1
Tool and endpoint. Each MCP tool and its REST endpoint.
2
Parameters. The name, type and description of each one.
3
Returns. The response shape, with a copy button.
4
Details. Expand a tool to see its parameters and response.

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 pathMCP toolReturns
GET /api/v1/siteslist_sitesSites of your organisation.
GET /api/v1/sites/:siteId/overviewget_site_overviewFigures for a period.
GET /api/v1/sessionssearch_sessionsSessions, newest first.
GET /api/v1/sessions/:id/timelineget_session_timelineSteps and friction tags of a session. A click on a link includes its address (href, host and path).
GET /api/v1/sessions/:id/summaryget_session_summaryThe existing AI summary of a session.
GET /api/v1/sites/:siteId/data-layerlist_data_layer_keysThe site's data layer keys and the values seen over 30 days.
GET /api/v1/sites/:siteId/data-layer/breakdownget_data_layer_breakdownSessions, friction rate and conversion rate per value or number bracket of one key.
GET /api/v1/sites/:siteId/visitorslist_visitorsThe site's human visitors with a visit in the period, newest visit first, with their generated names.
GET /api/v1/visitors/:idget_visitor_journeyOne visitor's visits, newest first, with the pages of each visit and the data layer values pushed.
GET /api/v1/sites/:siteId/funnelslist_funnelsThe funnels saved on the site and their steps.
GET /api/v1/funnels/:idget_funnel_reportOne 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/patternslist_patternsPatterns over the last 30 days.
GET /api/v1/patterns/:idget_patternOne pattern with example sessions.

Parameters#

EndpointParameterTypeDescription
Sitescursor, limitstring, integerPaging. limit is 1–100, default 50.
Site overviewrange24h, 7d or 30dPeriod. Defaults to 7d.
SessionssiteUUIDOnly this site.
Sessionsfrom, toISO date-timeStart and end, for example 2026-10-01T00:00:00Z.
SessionsfrictionstringA friction type such as rage_click or checkout_exit, or any.
Sessionskindhuman, ai_agent or allVisitor type. Defaults to human.
SessionsconvertedbooleanOnly converted, or only not converted, sessions.
Sessionsentry, device, qstringEntry page, desktop / mobile / tablet, and text matched against the entry page.
SessionsdlstringData 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.
Sessionscursor, limitstring, integerPaging. limit is 1–100, default 50.
Data layer breakdownkeystringRequired. A key listed on the site.
Data layer breakdownrange, kind, dl24h/7d/30d, human/ai_agent/all, stringPeriod (default 30d), visitor type (default human) and the same dl filter as Sessions.
Visitorsrange24h, 7d or 30dVisitors with a visit in this period. Defaults to 30d.
Visitorsreturning, converted, with_frictionbooleanOnly visitors with 2 visits or more, who converted, or with a friction tag in at least one visit.
Visitorsdl, cursor, limitstring, string, integerThe same dl filter as Sessions (any visit matches), and paging. limit is 1–100, default 50.
Timelinecursor, limitstring, integerPaging of steps. limit is 1–400, default 200.
Patternssite, kindUUID, human or ai_agentFilters. kind defaults to human.
Patternscursor, limitstring, integerPaging. 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": "…" } }.

StatusCodeWhen
400bad_request, invalid_cursorA parameter has the wrong format, or the cursor is not one the API returned.
400unknown_keyThe data layer key is not listed on the site.
401unauthorizedThe key is missing, malformed or revoked.
404not_foundUnknown endpoint, or an id that does not exist in your organisation. Ids of other organisations always return 404.
404no_summaryThe session has no AI summary yet.
429rate_limitedToo many requests. Wait for the number of seconds in the Retry-After header.
500internalSomething 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.