Developers

Build on the AskThis API.

REST-first, JSON, versioned under/api/v1/. Every endpoint validates input against a shared schema and answers in a consistent envelope — no surprises.

Three surfaces

One platform, three auth contexts.

Each surface has its own credentials — the boundaries are a security guarantee, not a convention.

App API

Session token
/api/v1/*

Powers the dashboard — sites, scans, prompts, analytics. Also the Enterprise programmatic surface via scoped API keys.

Public / Enterprise API

API keys
/api/v1/*

Token-authenticated, rate-limited by plan, versioned. Automate config, prompts, rules and analytics export.

Data Platform API

Partner credentials
/data/v1/*

Buyer-facing and fully isolated — serves only aggregated, pseudonymous segments. Never raw events or PII.

Authentication

Bearer tokens, scoped keys.

Dashboard sessions use a self-hosted Better Auth session token in theAuthorization: Bearer header. Programmatic access uses scoped API keys you can create, rotate and revoke — rate-limited by plan.

Input is validated on every endpoint; invalid requests are rejected with 422 and per-field errors. Authorization is row-level: every query is scoped to your org and site.

Response envelope
{
  "data": { },
  "error": null,
  "meta": { "requestId": "req_8f2a…" }
}
Core endpoints

The surface area, at a glance.

A working subset — the full reference lives in the docs.

MethodEndpointPurpose
POST/api/v1/sitesCreate site + trigger scan
GET/api/v1/sites/:id/configWidget config (public, cached)
POST/api/v1/scanTrigger / re-trigger scan
GET/api/v1/scan/:jobIdScan progress (SSE/poll)
GET/api/v1/prompts/:siteIdList prompts
PUT/api/v1/prompts/:pageIdUpdate page prompt
GET/api/v1/analytics/:siteId/aiAI analytics
GET/api/v1/citations/:siteIdCitation monitor data
POST/api/v1/tools/ai-scorePublic discoverability scan
POST/api/v1/keysCreate API key (scoped)
GET/api/v1/analytics/:siteId/exportProgrammatic analytics export

Enterprise adds org, domain, branding, bulk-prompt, rules, export and audit endpoints.See the full reference →

Quick start

Two ways in.

Embed the widget with one tag, or pull your data programmatically.

Embed the widget — any site
<script async
  src="https://cdn.askthis.io/widget.js"
  data-site-id="YOUR_ID">
</script>
Query the API — curl
curl https://api.askthis.io/api/v1/analytics/site_123/ai \
  -H "Authorization: Bearer ak_••••3f9a" \
  -H "Content-Type: application/json"
Webhooks

Events, pushed to you.

Subscribe your systems to outbound webhooks. Every delivery is signed — verify the signature before trusting it — and handlers should be idempotent; we retry on failure.

Event types
scan.completedscan.failedcredits.lowcredits.depletedcitation.detectedsubscription.updatedinvoice.paidsite.installed
Model Context Protocol

Connect AskThis to your AI.

Query your analytics, the questions people ask AI about your content, and your Cited Ask prompts straight from Claude, ChatGPT or any MCP client. It reuses your scoped API keys and stays read-only — the API is the only authorizer. Business+.

MCP endpoints
/mcp/publisher/mcp/data/mcp/protocol
Open standard

Ask AI Protocol

The open, versioned protocol behind AskThis's AI share — Cited Ask prompts, the Ask Targets registry, and the Ask Policy permission layer. It's free to implement and doesn't require an AskThis product. Read the protocol →

Ship it this afternoon.

Grab a key, read the docs, and put your content in the AI conversation.