Skip to main content
An Attensira API key authenticates a program — an MCP client, a script, an agent — as your organisation. You mint it in the app, copy it once, and send it as a bearer token. A key names one workspace as its default, and every tool and endpoint takes an optional project to reach any of the others. One key reaches both programmatic surfaces: the MCP server and the REST API. You do not need a second credential to add the other, and that has not changed — the MCP server accepts keys permanently, alongside OAuth.

When a key, and when OAuth

The MCP server takes either. The REST API takes a key only. Use a key when nothing can open a browser: an n8n workflow that fires at 3am, a CI job, a scheduled script, a server-side agent, anything calling the REST API. A key never expires unless you chose an expiry when you minted it, so unattended work keeps running without anyone re-approving it. Use OAuth when a human is present at first connect — Claude, Claude Code, Cursor, VS Code, ChatGPT. It is nicer there for three reasons: no secret ever lands in a config file you might commit, access tokens are short-lived so a stolen one is worth little, and each client is its own connection you can remove without breaking the rest. Use a key when nothing can open a browser, or when you need access you can cut off instantly: a revoked key stops working on the very next request, while a token already issued survives until it expires. Neither is deprecated and there is no cutover. See Connect a client for both paths and Connections for managing OAuth grants.

Mint a key

1

Open Settings > Your assistant

Go to app.attensira.com/settings/access in the workspace the key should belong to. If you work across several workspaces, check the workspace name before you continue — the key you mint here cannot be moved to another one later.
2

Name the key

Give it a name that says where it will run, such as claude-desktop-laptop or ci-nightly-report. The name is the only thing you will see in the list afterwards, so a vague name makes revoking the right key harder.
3

Choose Read only or Read and write

Read only can read everything and change nothing. Read and write can also ask, steer, configure and approve reversible work. See below for exactly which scopes each one carries. To choose scopes one by one, mint an agent key instead.
4

Choose when it expires

Never is the default. You can pick 30, 90 or 365 days instead. An expired key is refused with a 401, like a revoked one.
5

Copy the key immediately

The full key is shown once, on this screen, and never again. Paste it into your password manager or your client’s configuration before you navigate away.

Choosing scopes

A key carries named scopes, and every call needs one of them. The full list, and which calls need which, is in Scopes. In short:
  • read: every read. Every key holds it.
  • steer: asking, starting and steering projects, setting goals, answering questions, declining work.
  • approve:<lane>:<class>: approving changes in one lane (or *), up to an effect class: pure, reversible or compensable.
  • spend:<usd>/month: starting work that costs credits, up to a monthly ceiling for this key. spend:unbounded has no ceiling of its own.
  • configure: prompts, competitors, topics, markets, skills, automations, webhooks and Brand Book proposals.
Under Settings → Your assistant, the app mints a key with one of two scope sets: Choose Read only whenever the program only reads. To pick scopes one by one, set a spend ceiling or name the agent, mint an agent key.

Agent keys

An agent key is a key for one agent, such as grokbot, muse or cursor@karl, with exactly the scopes that agent needs. Mint one under Settings → Agent keys at app.attensira.com/settings/access/agents:
  • Agent: the agent’s name, also used as the key’s name. It is a short lower-case name: letters, digits and ., _, @ and -, at most 40 characters. It cannot be changed later.
  • Steer and Configure: tick either to add the steer or configure scope.
  • Approve, per lane: for each lane, how far the key may approve: Can’t approve, Nothing outside the session (pure), Up to what can be undone (reversible) or Up to what goes public (compensable). Each choice adds one approve:<lane>:<class> scope. No choice approves something that cannot be undone.
  • Monthly spend: Can’t start paid work (no spend scope), Up to a monthly cap (spend:<usd>/month, at most $1,000,000 with at most two decimals) or No cap of its own (spend:unbounded).
  • Expires: Never, 30, 90 or 365 days.
Every power starts switched off, and every key can read. For example, an agent that drafts and approves fixes to your own site, and may start up to $50 of work a month, holds:
The agent’s name is what the key’s work is credited to. Sessions and Inbox rows the key starts say so (“via grokbot”), and so does an approval it gives (resolved_by.agent on ask.resolved). The name comes from the key, so no header a client sends can change it. The list of keys shows each key’s scopes in words, one per power it holds (for example Read, Steer and Your site: approve up to what can be undone), and when each was last used and by which agent. Agent keys and the keys under Settings → Your assistant are the same kind of credential. Each list shows both, and either screen revokes either kind. No key can raise autonomy, raise a spend ceiling, mint another key or approve an irreversible change. A person does those in the app. A key also never approves work its own run started, and approves only up to the lane and class its approve scopes name. See Who can approve what.
remove_prompt and delete_automation are destructive and are reachable with a key that has configure. There is no separate confirmation step at the API level.

Keys minted before scopes

Keys minted before scopes were moved once: read and write became the bundle above, and read, or nothing at all, became read. If that took something away from one of your keys, you got an email naming the date. For 14 days each call the key is losing still works and carries a Deprecation header. After that it is refused with a 403 that names the missing scope. See Migrating from read and write.

The key format

A key looks like this:
That is the prefix atn_live_ followed by exactly 32 hexadecimal characters. Both the MCP server and the REST API check the token against ^atn_live_[0-9a-fA-F]{32}$ before making any upstream call, so a truncated paste or a stray space fails immediately with a 401 carrying WWW-Authenticate: Bearer. The MCP server answers in the OAuth error shape, which is the same for a malformed key and an unusable OAuth token:
MCP 401
The REST API answers in its standard error envelope:
REST 401
That shape check is not authentication. Whichever surface you use, the token is forwarded to Attensira, which owns the real validation: whether the key exists, revocation, expiry, scopes and rate limiting. Send it as a bearer token:

Why you only see it once

We do not keep a copy of your key that anyone could read back. Apart from the last four characters, which the list shows so you can tell keys apart, the key is shown to you once, at mint, and never stored in a readable form. The consequence is not a policy choice you can appeal: we cannot show you the key again, and we cannot recover it for you. If you lose it, no one at Attensira can read it back. Revoke the lost key and mint a new one.
Before closing the reveal screen, paste the key somewhere durable and confirm you can read it back. That is the only opportunity.

Revoking a key

Revoke from Settings → Your assistant or Settings → Agent keys. Revocation takes effect for new requests; anything already using that key starts failing authentication. OAuth connections are not keys and are not listed there as rows: how to remove one is in Connections, and revoking a key never touches them. Nothing else in the workspace changes — data collected through the key stays, and automations it created keep running on their schedules. Revoke when someone leaves, when a key has been pasted anywhere it should not have been, when a machine is decommissioned, or whenever you cannot say with confidence where a key is stored. Minting a replacement costs nothing, so rotate rather than wonder.

One key, every workspace in the organisation

A key belongs to your organisation and names one workspace as its default. Every MCP tool that works on a workspace takes an optional project, and every REST endpoint an optional ?project=, so a single key reaches every workspace in the organisation — running three domains does not mean minting three keys. Omit it and the default is used. An OAuth connection works the same way, and reaches the same set. It carries read, steer and approve:*:reversible, with no configure and no spend scope. It can lower what the agent may do on its own (update_settings needs only steer for that), and a tool that needs configure, such as add_prompts or create_automation, answers 403 with the code scope_denied. What cannot be widened is the organisation. A workspace outside it is a 404, the same answer as one that never existed, and no scope or setting changes that. get_account lists what a credential can actually reach. Next: Connect over MCP, or the REST API if your own code is doing the work.