API reference
Pull your measured visibility anywhere.
The published REST API, route by route, and the 76 tool MCP server for Claude, ChatGPT, Cursor and Claude Code: 44 reads plus 32 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.
- A key reads and writes client data by default. You can issue one that only reads, or one that also reaches workspace settings.
- No key can delete the workspace, change single sign on, manage seats or billing, or issue another key. Those answer 403 and stay with a person in the console.
- A key has no end date unless you give it one when you issue it. 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.
| Status | What it means |
|---|---|
| 400 | An id or a body did not validate. |
| 401 | No valid API key was sent. |
| 402 | This route, or this branch of it, needs a higher plan. |
| 403 | A viewer seat's key tried to write. |
| 404 | No such brand or record for this key. |
| 409 | A connection the route needs is missing, such as a CRM or Google Sheets. |
| 422 | The request was valid and the work could not be done. The body says why. |
| 429 | Over the rate limit, or the spend safety limit is reached. |
| 502 | A provider behind the route answered with an error. |
| 503 | The 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
| Route | What it does |
|---|---|
| GET /brands | List the brands this key can see. |
| GET /org/usage | Read the plan, the prompt pool and engine spend against the monthly cap. |
| GET /brands/{brandId}/prompts | List the prompts tracked for a brand. |
| GET /brands/{brandId}/prompt-performance | Mentioned, cited and recommended rates per tracked prompt. |
| GET /brands/{brandId}/visibility-trend | Daily mentioned, cited and recommended rates over time. |
| GET /brands/{brandId}/export/runs.csv | Download every measured run as a CSV file. |
| GET /brands/{brandId}/export/answers.json | Download the captured answers, verbatim, as JSON. |
| GET /brands/{brandId}/competitive-report | Per prompt: your standing, who is mentioned instead, and the sources behind them. |
| GET /brands/{brandId}/source-graph | Every domain the engines cite across your prompts. |
| GET /brands/{brandId}/serp-positions | Classic Google results beside the AI answers, per tracked prompt. |
| POST /brands/{brandId}/serp-track | Queue the classic Google capture for the tracked prompts. |
| GET /brands/{brandId}/google-competitors | Who shares your keywords on classic Google, marked competitor or platform. |
| POST /brands/{brandId}/google-competitors | Queue the classic Google competitor capture. |
| GET /brands/{brandId}/citation-targets | The pages engines cite for your category, highest leverage first. |
| POST /brands/{brandId}/citation-authority | Queue the authority refresh for the cited domains and the link gap expansion. |
| GET /brands/{brandId}/link-gaps | Pages that cite the sources engines cite, and not to you. |
| GET /brands/{brandId}/crawl-truth | What AI crawlers get when they fetch your site. |
| POST /brands/{brandId}/crawl-truth | Queue the crawler probe and the readability capture. |
| GET /brands/{brandId}/content/drafts/{draftId}/content-score | A Studio draft's content score: how it covers what the pages AI cited for its brief's prompt cover. |
| GET /brands/{brandId}/content/briefs/{briefId}/cited-pages | What the pages AI cited for a brief's prompt cover. |
| GET /brands/{brandId}/onpage | The site retrievability report, findings ordered by the traffic of the page each sits on. |
| POST /brands/{brandId}/onpage | Queue the site crawl. |
| POST /page-audits/{auditId}/share | Make a link to one page's audit that anyone with it can open, replacing the link it had. |
| POST /brands/{brandId}/onpage/benchmark | Compare one of your pages with the pages engines were seen citing, on the same checks. |
| GET /brands/{brandId}/leads | The lead ledger with its measured evidence, and the influenced tier. |
| POST /brands/{brandId}/leads/{leadId}/crm | Push one lead into your connected HubSpot or Salesforce, with its evidence. |
| POST /brands/{brandId}/leads/sheets | Append the lead ledger, evidence included, to your own Google Sheet. |
| GET /clients/{brandId}/handoff-targets | Read a client's task tools, where its tasks go, and every action sent to one. |
| PUT /clients/{brandId}/handoff-target | Pick where a client's tasks go in one task tool. |
| POST /actions/{actionId}/handoff | Send one action to a client's Asana, ClickUp or monday as one task. |
| POST /lead-checks | Check how AI answers mention a business: the lead form's check, from your own server. |
| GET /lead-checks/{checkId} | Read one lead check: its status, its counts once ready, and its report link. |
| POST /pitches/benchmark | Benchmark one domain: it lands in Pitches as a prospect, ready for its audit. |
| GET /brands/{brandId}/revenue-pages | Revenue by landing page in three lanes: organic, AI referral and paid. |
| GET /brands/{brandId}/search-wins | Search Console drops, click through quick wins and demand without a page. |
| POST /brands/{brandId}/search/sitemap | Submit your sitemap to Google Search Console through your own connection. |
| POST /brands/{brandId}/search/inspect | Google's own index verdict for one URL, verbatim. |
| GET /brands/{brandId}/search/indexnow | The brand's IndexNow key, and where to host it. |
| POST /brands/{brandId}/search/indexnow | Notify Bing, Yandex and the other IndexNow engines about changed URLs. |
| GET /brands/{brandId}/outreach | The publisher pitch pipeline: targets, their levers, contact state, drafts, outcomes and the checks of the live page. |
| POST /brands/{brandId}/outreach/seed | Promote the measured citation targets into the outreach pipeline. |
| POST /brands/{brandId}/outreach/{targetId}/contact | Find the public editorial contact behind one cited page. |
| POST /brands/{brandId}/outreach/{targetId}/draft | Draft the pitch for one target, grounded only in your verified brand facts. |
| GET /webhooks | List the workspace's webhook endpoints. |
| POST /webhooks | Add a webhook endpoint. |
| PATCH /webhooks/{id} | Change, switch on or switch off a webhook endpoint. |
| DELETE /webhooks/{id} | Remove a webhook endpoint and its delivery log. |
| POST /webhooks/{id}/rotate-secret | Rotate an endpoint's signing secret. |
| POST /webhooks/{id}/test | Send a test event (ping) to an endpoint now. |
| GET /webhooks/{id}/deliveries | Read an endpoint's last 50 deliveries. |
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 74 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 76 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.
Prompts or a missing read you need: kailesk@ansengine.co.
