Skip to content
Documentation menu

API reference

Pull your measured visibility anywhere.

The published REST API, route by route, and the 64 tool MCP server for Claude, ChatGPT, Cursor and Claude Code: 39 reads plus 25 actions. Every MCP action that spends budget or cannot be undone returns a summary and a short lived confirmation token first, and executes only when called again with it. The agent makes that second call itself, so the token stops a slip, not an agent you authorised.

Read what AI answers say about your brands, and queue the work behind the console, with an API key. Send the key as a Bearer token. A key belongs to one workspace and acts as the seat that created it: a brand in another workspace, or a client outside that seat's view, answers 404. Rates are fractions of one and travel with the count of answers behind them; a value that was never measured is null, never zero. The routes in this document are the published API. The console calls other routes with the same key, and those can change in any release.

Authentication

An admin creates a key in the console under Settings, API & MCP. Creating a key needs API access, which starts on the Monitor plan. The key is shown once. Send it as a Bearer token on every request, and start with the list of brands the key can see:

curl "https://api.ansengine.co/brands" \
  -H "Authorization: Bearer ak_your_key"
  • A key acts as the seat that created it, with that person's role as it stands at each request. A key on a viewer seat reads and cannot write: every POST answers 403.
  • A key on a seat limited to named clients sees only those clients. GET /brands lists them, and any other brand id answers 404, the same answer an id from another workspace gets.
  • Keys you create do not expire. Revoke one under Settings, API & MCP and it stops working at once. Every key a person holds stops working when they are removed or deactivated, including by SCIM provisioning.

Plans

Most routes work on every plan with API access. Where a route needs more, its reference says which plan, and the route answers 402 with error upgrade_required, the plan gate that refused (feature) and the lowest plan id that passes it (minPlan).

Rate limits and the spend safety limit

Routes that queue or change work share one limit: 30 requests a minute for the workspace, counted across every write that takes this limit, the console's included. A seat limited to named clients gets 15 of its own. Over it, a route answers 429 and its Retry-After header says how many seconds to wait. Reads carry no limit of their own.

Routes that start paid work check the workspace's spend safety limit first, a cap that stops runaway spend and that normal use never reaches. Once it is reached they answer 429 with error budget_cap_reached, and spend resumes next cycle. Reads never count against it, and each route's reference says whether it can.

Errors

Every error body is JSON with an error field: a sentence, or the list of schema issues when a body did not match its schema.

StatusWhat it means
400An id or a body did not validate.
401No valid API key was sent.
402This route, or this branch of it, needs a higher plan.
403A viewer seat's key tried to write.
404No such brand or record for this key.
409A connection the route needs is missing, such as a CRM or Google Sheets.
422The request was valid and the work could not be done. The body says why.
429Over the rate limit, or the spend safety limit is reached.
502A provider behind the route answered with an error.
503The feature is not configured on this deployment.

Versioning and changes

This API is not versioned today. No version travels in the path or in a header, and there is no API changelog: breaking changes are not announced ahead of time. What is kept instead: this document and the reference pages are generated from the same registry the api is tested against, so a documented route whose seat, plan, limits, parameters, request body or statuses change cannot ship until this document changes with it. The fields a route returns are described in words and are not held that way. Fetch /openapi.json and compare it with your last copy to see what changed. The measurement changelog in the console (Methodology) records changes to the engines and to our method, which can move the numbers these routes return without changing a route.

The OpenAPI document

The same reference, machine readable: an OpenAPI 3.1 document at /openapi.json on the api. It needs no key and names no workspace, so a client generator or an API viewer can read it directly. This page and the pages below are rendered from the same file.

curl "https://api.ansengine.co/openapi.json"

The reference

Every route

RouteWhat it does
GET /brandsList the brands this key can see.
GET /org/usageRead the plan, the prompt pool and engine spend against the monthly cap.
GET /brands/{brandId}/promptsList the prompts tracked for a brand.
GET /brands/{brandId}/prompt-performanceMentioned, cited and recommended rates per tracked prompt.
GET /brands/{brandId}/visibility-trendDaily mentioned, cited and recommended rates over time.
GET /brands/{brandId}/export/runs.csvDownload every measured run as a CSV file.
GET /brands/{brandId}/export/answers.jsonDownload the captured answers, verbatim, as JSON.
GET /brands/{brandId}/competitive-reportPer prompt: your standing, who is mentioned instead, and the sources behind them.
GET /brands/{brandId}/source-graphEvery domain the engines cite across your prompts.
GET /brands/{brandId}/serp-positionsClassic Google results beside the AI answers, per tracked prompt.
POST /brands/{brandId}/serp-trackQueue the classic Google capture for the tracked prompts.
GET /brands/{brandId}/google-competitorsWho shares your keywords on classic Google, marked competitor or platform.
POST /brands/{brandId}/google-competitorsQueue the classic Google competitor capture.
GET /brands/{brandId}/citation-targetsThe pages engines cite for your category, highest leverage first.
POST /brands/{brandId}/citation-authorityQueue the authority refresh for the cited domains and the link gap expansion.
GET /brands/{brandId}/link-gapsPages that cite the sources engines cite, and not to you.
GET /brands/{brandId}/crawl-truthWhat AI crawlers get when they fetch your site.
POST /brands/{brandId}/crawl-truthQueue the crawler probe and the readability capture.
GET /brands/{brandId}/onpageThe site retrievability report, findings ordered by the traffic of the page each sits on.
POST /brands/{brandId}/onpageQueue the site crawl.
POST /brands/{brandId}/onpage/benchmarkCompare one of your pages with the pages engines were seen citing, on the same checks.
GET /brands/{brandId}/leadsThe lead ledger with its measured evidence, and the influenced tier.
POST /brands/{brandId}/leads/{leadId}/crmPush one lead into your connected HubSpot or Salesforce, with its evidence.
POST /brands/{brandId}/leads/sheetsAppend the lead ledger, evidence included, to your own Google Sheet.
GET /brands/{brandId}/revenue-pagesRevenue by landing page in three lanes: organic, AI referral and paid.
GET /brands/{brandId}/search-winsSearch Console drops, click through quick wins and demand without a page.
POST /brands/{brandId}/search/sitemapSubmit your sitemap to Google Search Console through your own connection.
POST /brands/{brandId}/search/inspectGoogle's own index verdict for one URL, verbatim.
GET /brands/{brandId}/search/indexnowThe brand's IndexNow key, and where to host it.
POST /brands/{brandId}/search/indexnowNotify Bing, Yandex and the other IndexNow engines about changed URLs.
GET /brands/{brandId}/outreachThe publisher pitch pipeline: targets, their levers, contact state, drafts, outcomes and the checks of the live page.
POST /brands/{brandId}/outreach/seedPromote the measured citation targets into the outreach pipeline.
POST /brands/{brandId}/outreach/{targetId}/contactFind the public editorial contact behind one cited page.
POST /brands/{brandId}/outreach/{targetId}/draftDraft the pitch for one target, grounded only in your verified brand facts.

The MCP server

The same product as tools an agent can call. 2 are free and need no account (the crawler check and pricing); the other 62 use your API key. The server card at /.well-known/mcp/server-card.json on the MCP host describes the full catalog. Connect from Claude Code:

claude mcp add ansengine --transport http \
  https://mcp.ansengine.co/mcp \
  --header "Authorization: Bearer ak_your_key"

All 64 tools, writes marked. Every write that spends budget or cannot be undone, publishing live and sending included, needs an explicit two step confirmation, which the agent itself sends back, so it stops a slip rather than an agent you authorised; the others change settings, stage work for a person or queue a check that spends nothing. Every tool runs with your own key, so your role, plan, budget and provider limits apply exactly as they do in the console.

check_ai_crawler_accessget_pricingmeasure_ai_visibilitydiagnose_visibility_gapsget_serp_positionsget_crawl_truthget_onpage_reportget_citation_targetsget_link_gapsget_google_competitorsget_prompt_performanceget_query_fanoutget_prompt_intelget_source_graphget_competitive_reportlist_locationsget_gbp_featuresget_review_featuresget_local_gridget_visibility_trendget_prompt_answersget_budget_statusadd_promptset_prompt_activeset_competitorsseed_outreach_targetslist_promptslist_brandsget_outreach_pipelinefind_outreach_contactdraft_outreach_pitchsend_outreach_pitchgenerate_content_draftpublish_to_cmslist_pending_approvalsdecide_placementrun_acquire_scanlist_prospect_scanslist_prospectsconvert_prospect_to_clientcapture_local_gridrun_crawl_truthrun_onpage_auditget_qbrget_prove_receiptsask_pulseget_client_report_linkget_prompt_universetrack_universe_slicepromote_prospectget_prospect_contactsubmit_draft_for_approvalcreate_clientadd_locationadd_promptsset_prompt_statestart_first_measurementrun_agent_checkget_agent_runswhoamiget_client_stateget_todayget_action_decisionsget_work_packages

Prompts or a missing read you need: kailesk@ansengine.co.