REST API endpoint
GET /v1/account — the call to make before you report any number
The org, workspace, plan, credit balance, tracked platforms and the scopes this key holds. The authority on which surfaces were queried at all.
Karl-Gustav Kallasmaa, Founder & CEOLast updated The request
Paste this and change the key. Every endpoint takes a bearer key and none takes a workspace id — the key names the workspace.
curl https://api.attensira.com/v1/account \
-H "Authorization: Bearer atn_live_<your key>"
The response (200)
Abbreviated, never invented — this is the shape the published reference documents.
{
"org": { "id": "org_3a10", "name": "Acme" },
"project": { "id": "prj_5b22", "name": "Acme", "domain": "acme.com" },
"plan": { "name": "Growth", "platforms": ["chatgpt", "perplexity"] },
"credits": { "balance": 4200, "renews": "2026-10-01T00:00:00Z" },
"scopes": ["read", "write"]
}
What goes wrong, and what it means
The condition on the left, the correct reading of it on the right.
- A call elsewhere fails with 403
- The credential is valid and is missing a scope. The scopes array here is the authoritative list of what this key may do, and widening it means minting a new key rather than retrying.
- credits balance is null
- The plan does not meter credits. It is not a zero balance and it is not an error.
- The workspace is not the one you expected
- The credential names the workspace, so a key or connection pointed at the wrong one is replaced rather than redirected. No request parameter can retarget it.
What this endpoint cannot tell you
The limits are part of the answer, not a disclaimer under it.
- It cannot tell you what a platform measured. It tells you which platforms the plan queried at all — a surface absent from that list was never measured rather than measured at zero, which is a different claim entirely.
- It cannot show your API key. Only a hash is stored, so a key is displayed exactly once at minting and a lost one is replaced rather than recovered.
This endpoint takes no parameters and returns five things, and it is nevertheless the most important call in the API for anyone building a report. It describes the credential you called it with: which organisation and workspace it reaches, what plan that workspace is on, which platforms the plan tracks, how many credits remain, and what this key is permitted to do.
The platform list is a measurement fact
Of everything in the response, the plan's platform list is the one that changes how you read other endpoints. It is the authority on which answer surfaces were queried at all.
That matters because analytics responses carry rows for platforms with a tracked flag, and a row that is not tracked was never asked. The honest thing to say about such a surface is nothing. Rendering it as zero on a chart states that you were not mentioned there, which is a claim about the world rather than about your plan, and it is false.
So the sequence for any report that breaks results down by platform is: fetch the account, read the platform list, and only report on the surfaces it contains. Two calls instead of one, and the second one is free.
Scopes explain your 403s
The scopes array is what this credential may do. When a write endpoint answers 403, the credential is valid and is missing a scope — it is not an authentication failure and it is not something a retry fixes.
Scope is decided when a key is minted or a connection is approved, and it cannot be widened afterwards. The fix is a new credential with the access it needs, and the first thing a fresh integration should do is call this endpoint so that the gap shows up immediately rather than in the middle of a job.
Credits, and what null means
The balance and renewal date describe what is left and when it resets. Both come back null on a plan that does not meter credits, and that is not a depleted balance — it is a plan where the question does not apply. Code that treats null as zero will refuse to make calls that would in fact have succeeded.
No price appears in this response and none appears on this page, because the plan ladder is the only place a price is correct. What the account tells you is what remains, not what anything costs.
One credential, one workspace
The credential names the workspace. No endpoint in the API takes a workspace id, which means there is nothing in a request that can be retargeted — a URL that cannot express a workspace cannot be pointed at somebody else's.
The practical consequence is that working across two workspaces means two credentials rather than a parameter, and that a client reading the wrong workspace is fixed by replacing its credential rather than by adjusting a request. This endpoint is how you check which one you actually have, which is worth doing from a new integration before anything else.
Its twin on the other surface
The get_account MCP tool is the same read, and the documentation recommends calling it first from any fresh assistant connection for both reasons above: to confirm which workspace the credential points at, and to discover a missing scope before a write fails in the middle of a conversation.
A small integration habit
Because it is free, parameterless and describes the credential rather than the data, this is the ideal health check. A job that starts by fetching the account gets four things in one request: proof that the credential still works, the workspace it points at, whether the scopes it needs are present, and whether there are credits left to spend. A failure here is unambiguous in a way that a failure three calls into a pipeline never is, and the cost of adding it to the top of a script is one request per run.
Questions people ask
- Why call this before publishing a per-platform number?
- Because the plan's platform list is the authority on which surfaces were queried. A platform missing from it was never measured, and reporting it as zero invents a result.
- What does a null credit balance mean?
- That the plan does not meter credits. It is not a depleted balance, and no call is about to be refused because of it.
- How do I find out why a write is failing?
- Read the scopes array. A 403 from a write endpoint means the credential lacks a scope it needs, and the fix is a credential with wider access rather than a retry.
- Can I switch workspace with a parameter?
- No. The credential names the workspace and no endpoint takes a workspace id, so working across two means two credentials.
- Does it take any parameters?
- None. It is a single read describing the credential you called it with.
Sources
Every factual statement above, with the page it came from and the date that page was read.
The API reference states that an endpoint failing with 403 is missing a scope listed in the account response's scopes field.
docs.attensira.com · retrieved
“An endpoint that fails with 403 is missing a scope listed in scopes.”
Attensira's documentation states that an API key is displayed exactly once because only a hash is stored, so a lost key is replaced rather than recovered.
docs.attensira.com · retrieved
“An API key is displayed exactly once, because only a hash is stored; Attensira cannot re-display it, and a lost key is replaced rather than recovered.”
Next
- GET /v1/analytics/{area}GET /v1/analytics/{area} — the eight ranked slices of your data
- POST /v1/promptsPOST /v1/prompts — start tracking, and what it costs
- GET /v1/ai-traffic/installGET /v1/ai-traffic/install — everything needed to send crawler hits
- GET /v1/pagesGET /v1/pages — what one URL of yours earns in AI answers