API keys for assistants
What the key made by Connect allows, when to make one by hand, which switches to turn on for which job, and how to revoke it.
On this page
An assistant works on your site with an API key: a long password for a program, not a person. The key decides what the assistant may do. This page has what matters for an assistant; the full story (kinds of key, limits, personal and organization keys) is in API keys.
The quick way: Connect
Settings → AI assistants → Connect makes the key for you, named after the assistant and the site ("Cursor on Riverside Bakery"), with these switches on: Read, Save drafts, Pages and blocks and Files. That is enough to write, build pages and add photos, all as drafts. It never has Publish, Delete, Form answers or Send email. The steps are in Connect your assistant.
Make a key by hand, below, when you want something else: a key that only reads, one kept to a few collections, or one that ends on a date.
Make one by hand
You need the Admin or Owner role on the site.
- In the site admin, open Settings, then Site API keys.
- Press New key.
- Name it after the assistant, like "Claude on my laptop". The name shows in History as the author of every change the assistant makes, so you can always tell its work from yours.
- Under It can, switch on what it needs (below).
- Ends: Never, In 30 days, In 90 days or On a date. For an assistant you try for a week, 30 days is a good default.
- Press Make key and copy it now. It is shown only once.
The key starts with clr_site_ and reaches this one site. Give the assistant one key per site.
What to switch on
Give the key only what the job needs. Every switch is off until you turn it on, except Read.
| The assistant should… | Switch on |
|---|---|
| Answer questions, summarise, find things | Read (always on) |
| Change words, write posts, fill records, make preview links | Save drafts |
| Add, change, move or remove blocks; make pages and collections; change the theme | Pages and blocks |
| Add photos from the web, trash files | Files |
| Delete records or pages | Delete |
| Read what people sent through forms | Form answers (personal data: think twice) |
| Email anyone as the site, like a thank-you to someone who filled in a form | Send email (an assistant rarely needs it) |
| Put drafts live on its own | Publish |
Only these collections limits the key to the collections you tick; the assistant then cannot even see the others. Calls a day caps how much it may do in a day; every key is capped at 120 calls a minute anyway.
What the assistant sees
When it connects, the assistant can ask the site what the key allows (describe_site), and gets each switch back as true or false. A well-behaved assistant reads that first and does not look for a way around a switch that is off.
Keys made by signing in
An assistant that signs in instead of using a key (see Connect your assistant) still gets a key behind the scenes, named after the app and the person ("Claude for sam@example.com"). For one site it shows under Settings → Site API keys; for the account-wide connection, under Account → AI assistants in the Console. It is revoked the same way.
Revoking
On Settings → AI assistants, press Revoke next to the assistant under Connected; any key, including one made by hand, can also be revoked on Settings → Site API keys. The assistant stops at once; drafts it already saved stay. Revoke a key when:
- you stop using that assistant;
- the key was pasted somewhere it should not be (a chat, a shared document, a web page);
- someone else used your computer with the assistant signed in.
Then press Connect again, or make a new key. Keys are cheap; make them freely.
Keep it safe
- Paste the key into the tool's own settings (a settings file or a secret field), never into the chat. Anything in the chat may be sent to the assistant's maker.
- One key per assistant and per site, so revoking one changes nothing else.
- A key for trying things out: Read and Save drafts, Ends in 30 days.