Skip to main content
Sixteen endpoints under 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

A POST 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.
Full-text search across answers, prompts, pages, sessions and automations in one pass. Use it to locate something by wording when you do not have an id.
Shell
Response
type tells you which endpoint can fetch the hit in full: promptGET /v1/prompts/{prompt}, pageGET /v1/pages, sessionGET /v1/sessions/{id}, automationGET /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.
Page on 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.
The main measurement endpoint. One call returns an aggregated, ranked slice of your tracking data for a window.
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.
Everything recorded for one prompt: its topic and country, its per-platform rates and delta, the competitors seen in its answers, and the sources those answers cited.
Shell
Response
Passing exact text saves a search round-trip when you already know the wording; inexact text will not match. Percent-encode it — a prompt containing / or ? will otherwise change the route.

GET /v1/pages

Read-only. No credits. MCP tool: get_page.
Everything recorded for one URL on your site: its citation rate overall and per platform, its delta, and the prompts whose answers cited it.
Shell
Response
If this comes back empty, check GET /v1/analytics/bot before rewriting the page — a model cannot cite a page it has never fetched.

Track

POST /v1/prompts

Spends credits. Answers 201. MCP tool: add_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/

Destructive. MCP tool: remove_prompt.
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.
Registers a brand to detect alongside yours in answers already being collected. It creates no new readings, so it costs nothing.
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.
Lists every automation with its cadence and last run. No parameters.
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.
One automation in full, with its most recent run inline — so “did my Monday report run?” costs one call, not two.
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
Returns the created automation in the shape shown under GET /v1/automations.

POST /v1/automations//runs

Spends credits. Answers 200. MCP tool: run_automation.
Runs an automation immediately, outside its cadence. Returns a session handle, not a finished result.
Shell
Response
Poll GET /v1/sessions/{id}. Re-sending this POST without an Idempotency-Key starts a second billed run.

DELETE /v1/automations/

Destructive. MCP tool: delete_automation.
Permanently deletes an automation and its run history. This cannot be undone — confirm with GET /v1/automations/{id} first.
Response

Agent

POST /v1/ask

Spends credits. Answers 200. MCP tool: 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.
Fetches a session started by an ask or an automation run: its status and, once finished, its answer. This is how you poll async work.
Shell
Response
The 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.
The org, workspace, plan, credit balance, which platforms the plan tracks, and what this key may do. No parameters.
Response
Call this before reporting any per-platform number: 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.
Everything needed to start sending AI-crawler hits: the ingest endpoint, your workspace’s HMAC signing secret, the signature header name, the replay window, the daily cap, and a copy-pasteable edge worker. No parameters.
Response
Call it when AI traffic is empty and you need to know how to send us any. The signing secret is derived from the workspace id, so it is stable and can be shown again — unlike your API key, which is displayed exactly once.