REST API

Overview

The Clickbase REST API is the HTTP twin of the MCP connectors. It lets you manage your team's sites, goals and funnels, read every analytics report the dashboard shows, and mint API tokens — programmatically, over plain JSON on the root domain (https://clickbase.so/api). Every surface (the web app, this REST API, and the MCP connectors) calls the exact same server-side Actions and serializes through the same Eloquent API Resources, so a number you read here is always the same number the dashboard shows.

Getting started

  • Authentication — Passport bearer tokens, team binding, the subscription requirement, and failure modes.
  • Conventions — the cross-cutting contract: base URL, headers, the response envelope, pagination, money, date ranges, filters, and status codes. Read this first.
  • Tokens — create, list, and revoke API tokens over the API.

Sites & configuration

  • Sites — list, create, configure (domain, timezone, currency, KPI, sharing, tracking mode), and delete sites.
  • Tracking config — the public remote config the browser tracker fetches before its first pageview.

Goals & funnels

  • Goals — the goals defined on a site (page, event, scroll, and autocapture types).
  • Funnels — ordered sequences of 2–8 goals.

Analytics & reporting

  • Analytics — topline stats: timeseries, breakdowns, goal and funnel stats, journeys, and dimension drill-downs.
  • Sessions — the visitor sessions list and a single session's timeline.
  • Events — the raw custom-events log, its chart, and property breakdowns.
  • Errors — the error report: ranked messages, a single error's detail, its chart, and its events.
  • Realtime — the live "right now" feeds: current visitors, activity, and source domains.
  • People — identified users and a single user's profile.
  • Session replay — the replay sessions list and hydrated rrweb events for one session.

Revenue

  • Revenue — MRR, LTV, subscriber growth, and breakdowns by channel, source, campaign, payment, and subscription.
  • Stripe — connect, configure, and sync a site's Stripe integration.

More

  • Annotations — chart annotations on a site.
  • Segments — saved dashboard filter segments on a site.
  • Search Console — Google Search Console keyword data.
  • Tracking — the public ingestion beacons (/api/collect, /api/event, /api/identify) and the Payments API.

MCP connectors

Every reporting and management Action above is also exposed as an MCP connector — same tokens, same behavior. See the reader tools and writer tools.

At a glance

Authentication. The data endpoints use Passport OAuth bearer tokens, scoped to the token's team. Send Authorization: Bearer {token} on every request. The team must have an active subscription, or the request returns 402 Payment Required. See Authentication.

Response shape. Responses are unwrapped (JsonResource::withoutWrapping()): a single resource serializes flat, a non-paginated collection is a flat array, and only paginated list endpoints keep the data / meta / links envelope — the goals, sessions, events, page-titles, site-users, errors, error-events, and session-replays lists. See Conventions for the full list and the pagination params.

Rate limiting. The authenticated data group is limited to 60 requests per minute; exceeding it returns 429 Too Many Requests. The tracking ingestion and Stripe webhook endpoints have their own, separate limits.