Public REST API

CortIQ Developer API

Powerful REST API for accessing your analytics data programmatically. Build custom dashboards, automate reports, and integrate with your tools.

Two ways to access CortIQ

CortIQ separates the Data Layer (your analytics) from the Agentic Layer (AI access). One read-only API key per site works for both, so an AI agent can read that site's analytics and nothing else.

Data Layer — REST API

Read your analytics programmatically (dashboards, reports, exports)

Read sessions, page views, referrers, AI agent sessions, conversions and heatmap points. JSON or CSV.

GET /functions/v1/public-api/sites/{site_id}/pages?date_from=…
Authorization: Bearer ck_live_…

Auth: CortIQ API key · scoped to one site · default 1,000 requests/hour.

Agentic Layer — MCP Server

Let AI agents query your analytics with tool-use

A Model Context Protocol server exposing 22 read-only tools, so Claude, ChatGPT or your own agent can answer questions grounded in your real data.

POST /functions/v1/mcp-server
Authorization: Bearer ck_live_…

Auth: same API-key model · read-only tools · per-key rate limit · queries scoped to the key's site.

Security model: both APIs authenticate with a CortIQ API key that is stored only as a SHA-256 hash. Each key is scoped to one site, and every query is filtered to that site server-side. Keys are rate-limited per key and can expire or be deactivated.

Fast & Reliable

Served by a Supabase Edge Function in the same project as your data

Secure

API key authentication with rate limiting and usage tracking

Site-scoped

Each API key reads data for exactly one site

AI Agent Analytics

Dedicated endpoint for AI agent sessions (agentic browsers)

Get Started in Minutes

Simple authentication, comprehensive data access

1. Authentication

Send your CortIQ API key as a Bearer token on every request

HTTP Header:

Authorization: Bearer ck_live_your_api_key

Each key is scoped to one site. Create keys in the dashboard under Settings → CortIQ API & MCP. The full key is shown once; only its SHA-256 hash is stored.

2. Make a Request

Simple REST API with JSON or CSV responses

Base URL:

https://cxmkdtgfocgbfizawlwa.supabase.co/functions/v1/public-api

Example cURL:

curl https://cxmkdtgfocgbfizawlwa.supabase.co/functions/v1/public-api/sites/YOUR_SITE_ID/visits \
  -H "Authorization: Bearer ck_live_your_api_key_here" \
  -G --data-urlencode "date_from=2026-01-01" \
     --data-urlencode "date_to=2026-01-31" \
     --data-urlencode "format=json"

Available Endpoints

7 read-only GET endpoints

GET
/sites
The site this key is scoped to
GET
/sites/{id}/visits
Sessions
GET
/sites/{id}/pages
Page views
GET
/sites/{id}/referrers
Sessions per referrer hostname
GET
/sites/{id}/agents
AI agent sessions
GET
/sites/{id}/conversions
Conversion events
GET
/sites/{id}/heatmaps
Click and scroll heatmap points

Why CortIQ API?

AI Agent Sessions

Sessions from agentic browsers such as ChatGPT agent and Perplexity Comet, as a separate endpoint

Consent-Gated Data

Visitor analytics are collected only after analytics consent, in both cookieless and full mode. Only the bot/security layer runs without consent.

Export Formats

JSON by default, CSV with format=csv on every endpoint

Rate Limiting

Per-key limit, default 1,000 successful requests per rolling hour; 429 with Retry-After when exceeded

Pagination

Up to 1,000 rows per request; page with limit and offset