https://api.attensira.com/v1. Every one takes Authorization: Bearer atn_live_<32 hex>; none takes a workspace id, because the key names the workspace.
Each endpoint below names the MCP tool it is the twin of. The two surfaces carry the same capabilities on purpose.
Before you start: what costs money and what destroys data
Nothing else on this page changes state or produces a bill.
Status codes
APOST that creates a durable resource answers 201. POST /v1/ask and POST /v1/automations/{id}/runs answer 200, because what they return is a handle to work in progress rather than a resource at a new URL. Everything else answers 200. Failures are the error envelope.
Find and measure
GET /v1/search
Read-only. No credits. MCP tool:
search.Shell
Response
type tells you which endpoint can fetch the hit in full: prompt → GET /v1/prompts/{prompt}, page → GET /v1/pages, session → GET /v1/sessions/{id}, automation → GET /v1/automations/{id}.
Every string on a hit is capped at 400 characters, not just
snippet. A complete model answer can never come back through search, no matter which fields a hit carries. Fetch the session for the full text.has_more. total is how many items matched up to the server’s fetch ceiling — a floor, not a grand total.
GET /v1/analytics/
Read-only. No credits. MCP tool:
get_analytics.Shell
Response
area=bot rows carry visits, pages, purpose_mix, last_seen (null when it never came) and agents instead of the rate fields. A model can only cite a page it has fetched, so check bot before concluding a page underperforms on content — but a row here counts only what our middleware recorded, so absence is no proof nothing came.
competitor and source are workspace-wide aggregates. For the rivals and cited sources of one prompt, GET /v1/prompts/{prompt} already returns both — no second call needed.GET /v1/prompts/
Read-only. No credits. MCP tool:
get_prompt.Shell
Response
/ or ? will otherwise change the route.
GET /v1/pages
Read-only. No credits. MCP tool:
get_page.Shell
Response
GET /v1/analytics/bot before rewriting the page — a model cannot cite a page it has never fetched.
Track
POST /v1/prompts
Starts tracking one or more prompts. From the next daily run, each is read across every platform your plan includes.
There is no
platform field. Which surfaces a prompt runs on comes from your plan, not from the request.
Shell
201 Response
credits_spent and credits_remaining are null when your plan does not meter the action. Your plan also caps how many prompts you can hold at once — see Plans.
DELETE /v1/prompts/
Permanently stops tracking a prompt and frees its slot. Its historical data goes with it and this cannot be undone — fetch it first if you want it.Response
POST /v1/competitors
Answers
201. No credits. MCP tool: add_competitor.201 Response
created: false means the domain was already tracked, so nothing changed. Competitor rates use the same denominator as your own, so adding one never changes your numbers.
Automations
GET /v1/automations
Read-only. No credits. MCP tool:
list_automations.Response
status is active (runs on its trigger), paused (does not), or done (a once trigger that already fired). tools: [] means the default read-only set.
GET /v1/automations/
Read-only. No credits. MCP tool:
get_automation.Response
latest_run is null when the automation has never run. Pass its id to GET /v1/sessions/{id} for the full trace.
POST /v1/automations
Answers
201. Creating is free; each run it performs spends credits. MCP tool: create_automation.Shell
GET /v1/automations.
POST /v1/automations//runs
Runs an automation immediately, outside its cadence. Returns a session handle, not a finished result.Shell
Response
GET /v1/sessions/{id}. Re-sending this POST without an Idempotency-Key starts a second billed run.
DELETE /v1/automations/
Permanently deletes an automation and its run history. This cannot be undone — confirm withGET /v1/automations/{id} first.
Response
Agent
POST /v1/ask
Open-ended investigation the measurement endpoints cannot answer — why a prompt is losing, what to change on a page — run by the Attensira agent, which crawls pages, audits them as a model sees them, and searches the web. Try a measurement endpoint first:/v1/analytics/{area} for any metric or ranked list, /v1/prompts/{prompt} for one named prompt, /v1/pages for one URL. Those are free and immediate; this costs credits and takes time.
Response
status is complete (the answer is present), running (poll the session after poll_after_ms) or failed (the run ended without an answer). A running response is the success case, not an error.
The agent runs on an agent model — the LLM powering the chat. That is a different thing from a tracked platform, which is the answer surface Attensira reads on your behalf. Changing your agent model does not change what is measured.
GET /v1/sessions/
Read-only. No credits. MCP tool:
get_session.Shell
Response
events trace shows which tools the agent called and with what arguments — the place to look when an answer seems wrong and you want to know which slice it read.
Account
GET /v1/account
Read-only. No credits. MCP tool:
get_account.Response
plan.platforms is the authority on which surfaces were queried at all, so a platform missing from it was never measured rather than measured at zero. credits.balance and credits.renews are null when the plan does not meter credits.
An endpoint that fails with 403 is missing a scope listed in scopes.
GET /v1/ai-traffic/install
Read-only. No credits. MCP tool:
get_ai_traffic_install.Response