# API

> Plaintext version for LLMs. Canonical HTML: https://askbowtie.com/api

API

Two contracts are locked and safe to build against.

Locked contracts

`POST /api/ingest`what the tracker posts

`POST /mcp`what your agent queries

Ingest

## POST /api/ingest

What the tracker posts on every page view. The shape never changes.

POST /api/ingest
Content-Type: application/json

This is what bowtie.js posts on every page view, click and error. You almost never call it directly: install the tracker once and it handles the envelope, batching and retries. See the [tracking reference](/docs/tracking/) for the install snippet and the full event catalog.

To post a server-side conversion from your backend, the same request shape applies: see [server-side sessions](/docs/server-side/). Authorization is a domain allow list only: the `domain` field must already be a registered site.

MCP

## POST /mcp

The endpoint your agent queries, JSON-RPC.

POST /mcp
Authorization: Bearer <token>
Content-Type: application/json

This is the read side: a JSON-RPC 2.0 endpoint your AI agent talks to directly, covering traffic, conversions, errors and search performance over one connection for your account, scoped per token to the sites you choose. A GET on `/mcp` returns a live setup and schema summary. For the walkthrough, see [connect your site to Claude](/learn/mcp/connect-your-site-to-claude/).

Auth is a bearer token minted from your dashboard, scoped to the domains you choose when you create it.

Everything else is internal

Every other path under /api/, including all of /api/app/, is how the askbowtie app talks to its own backend. It carries no compatibility guarantee and can change or disappear between deploys. Build against ingest and MCP.

Questions about either contract? [Contact us](/contact/).

## Get your token

Sign in, then Settings → MCP tokens.

[Start free](/v2/app/start/)
