← Blog

One API key for one assistant: what it sees and what it doesn't

CognitionDesk Team··4 min read

You hand a key to a freelancer so they can work on a single assistant. What else can they see?

1. One key, one assistant

In CognitionDesk an API key can be bound to one or more assistants. From then on, for that key the other assistants in the account don't exist: it can't read them, can't list them, and can't reach them through a side door like a channel or a widget.

That holds for every path someone could use to peek at the rest of the account:

What it asks for Key bound to assistant A
Assistant A Sees it and operates it, within the key's permissions
Another assistant, by id Doesn't see it
The assistant list Returns only A
The channel list Returns only A's channels; an unassigned one doesn't show either
Another assistant's web widget Answers as if it belonged to another account: it doesn't exist, and neither does its embed key
Creating a child key At most with A; it can't mint an unrestricted key or one for another assistant
An assistant the key creates Joins its scope: it can see it, list it and delete it
SeesAssistant A and its channelsA's widgetWhat it creates itselfDoesn't seeOther assistants, not even in listsOther channels and widgetsA child key with wider scope
The limit is the same at every door: by id, in lists, and through the side doors.

2. What a per-assistant key doesn't narrow

Some resources belong to the account, not to an assistant: the knowledge base, inventory, billing, calendar, workflows, tools and skills. Binding the key to an assistant does not narrow those. They are limited by the key's permissions (its scopes).

In practice: for a key you give a third party, give it the assistant and only the permissions it needs. If they don't need the calendar, the key shouldn't have the calendar permission.

3. Check it with three requests

A permission tested only by asking for the allowed resource isn't tested. With the key in hand, make three requests:

  1. By id: ask for assistant A. It should answer.
  2. By list: ask for the assistant list and the channel list. A should appear, and nothing else.
  3. By a neighbouring id: ask for another assistant in the same account, or its widget. It should answer as if it didn't exist.
By idA answersBy listonly ABy a neighbouring iddoesn't exist
If it passes all three, it's a permission. If it only passes the first, it's a lock on one door with the building's floor plan on display.
curl -s https://api.cognitiondesk.com/platform-api/assistants \
  -H "x-api-key: YOUR_RESTRICTED_KEY"
# should return a single assistant

4. Where to issue it

A key bound to one or more assistants is created from the dashboard, on the key's connection, by picking the allowed assistants; or from the CognitionDesk MCP, by passing the assistant list when creating or editing it. An empty list means "all", so for a third party, always use a list.

Need a different cut, say by knowledge base or by channel? Write to us.

Comments and corrections

Build your first AI agent today

RAG over your documents, tools, workflows and a web widget — free tier included.

Get started free