Skip to content

Developers · CLI

Replacing a Developer API Key

Last updated 25 November 2026

Take a new Developer API key when one is exposed or expiring; the old one keeps working for 7 days.

A Developer API key lets the Insites CLI, or a script, reach one site in your name. Every change made with it is recorded against you. If a key may have been exposed, or it has expired, take a new one. The old key keeps working for 7 days, then stops. To stop it at once, revoke it on the card.

Note

Most people sign the CLI in through the Insites Console and never need a Developer API key. Keys are for environments added with a key, such as CI jobs or a machine where a browser sign-in is not possible.

How keys work

RuleWhat it means
7 days to move overTaking a new key replaces your old one, which keeps working for 7 days. Revoke it on the card to stop it sooner
Edit role or higherYou need at least the edit role on the site to take a key
Expires after 90 daysTake a new one before then, or the CLI stops signing in
Shown onceThe Console shows the key only when you take it. It stores a hash, never the key
Your own onlyYou take a key for yourself. Admins can see and revoke the keys of everyone on the site; everyone else sees only their own
Private stack sitesKeys work only for sites on the Insites private stack

Take a new key

  1. Sign in to the Insites Console and open the site.
  2. Open its CLI tab and, on the Developer API key card, select Replace my key, or Get my key if your key has expired.
  3. Copy the command the Console shows. It adds the environment with the proxy address and the new key.
insites-cli env add staging --url <proxy URL> --token insites_developer_...

Keys start with insites_developer_. Requests made with one go through the Insites proxy, which checks your role on every request. A script sends the key in the Authorization header as Bearer <your-key>.

Check it worked

insites-cli doctor

doctor checks each environment's sign-in and whether the site accepts it. It never prints a key or token.

Common mistakes

  • Keeping the old key in a CI secret after taking a new one. The old one stops 7 days after you take the new one; update the secret before then.
  • Sharing one key between people. A key belongs to one person, so the record of who changed what would be wrong.
  • Pasting a key into a file you commit. Keep it in a secret store or an environment variable.