Skip to content

Developer documentation

Authentication and keys

Access keys for Zunous brains, OAuth 2.1 for MCP, key rotation and best practices for storing them.

Each brain you hire has its own access key. The same key works for the REST API and for authorizing an assistant over MCP.

The access key

  • It starts with ck_ followed by 64 hexadecimal characters.
  • An administrator in your organization generates it in the Console: brain page → Access key card → Generate a new key.
  • It is shown only once. Zunous stores only its fingerprint (SHA-256), so no one can see it again, not even the Zunous team.
  • It gives access to that brain and nothing else: it doesn't work for another brain or another organization.

REST API: Bearer header

Send the key in the Authorization header of every call:

http
POST /api/v1/acme/comercial/buscar HTTP/1.1
Host: mcp.zunous.com
Authorization: Bearer ck_…
Content-Type: application/json
SituationResponse
The header is missing401 {"error": "falta la llave de acceso: Authorization: Bearer ck_…"}
The key doesn't match that organization and brain, or the brain doesn't exist401 {"error": "Llave de acceso inválida para esta organización y cerebro"}

Both key error responses are identical on purpose: that way no one can find out which organizations or brains exist.

MCP: OAuth 2.1

Assistants don't use the key directly. They connect with OAuth 2.1:

  1. The assistant registers itself with Zunous (dynamic client registration, /register).
  2. It opens the Connect a brain screen at mcp.zunous.com/authorize.
  3. The person types the organization, the brain and the key, and clicks Authorize.
  4. The assistant receives a token with the cerebro scope for that brain. Each token lasts one hour and the assistant renews it on its own.

Details and clients in MCP.

Rotate the key

Generate a new key when someone who knew it leaves the company, or if you suspect it leaked. When you do:

  • the old key stops working immediately in the REST API;
  • assistants authorized over MCP with that brain are disconnected: each person reconnects their assistant with the new key;
  • automations that call the API need the new key.

There is only one key per brain. If several integrations share it, rotating it cuts them all off: keep track of where each one is stored.

Best practices

  • Store the key in a secrets manager or in your server's environment variables (ZUNOUS_LLAVE). Never in the repository, a chat, an email or a document.
  • In n8n, Make or Zapier, store it as a "Header Auth" credential, not as text inside the flow.
  • Never paste it into a conversation with an assistant. The Connect a brain screen at mcp.zunous.com is the only place where you type it.
  • The brain treats what it reads from your systems (documents, event data, webhook responses) as information, never as instructions. Even so, don't send it secrets inside the data.

Something unclear? Write to us at hello@zunous.com.