← All posts
Securing AI & Automation ToolsNovember 15, 2026 · 5 min read

Lock down your AI tools' API keys before someone else finds them

Every AI tool your business runs talks to something else through an API key. A leaked key is an open door — here is how to keep yours out of the wrong hands.

Every AI tool your business runs — the one that answers your calls, the one that drafts your emails, the one that books your appointments — talks to other software through an API key. That key is a password with a job: it proves to another system that your tool is allowed in.

Most small businesses never think about their API keys until one leaks. Then it is usually too late to be casual about it. A leaked key can be used to run up bills on your account, read data your tool can reach, or send messages pretending to be your business. The good news is that locking keys down is mostly habits, not expensive software.

What an API key actually is

An API key is a long string of letters and numbers that identifies your account to another service. When your appointment tool talks to your calendar, or your AI receptionist talks to your phone system, the key goes along for the ride. Anyone holding the key can make requests as if they were your tool.

That is why a key should be treated like a password — except keys often have more power than a password, because they skip the login screen entirely. A password gets you into the front door. A key can get straight into the machinery.

Where keys leak

Keys leak in ordinary, boring ways. That is what makes them dangerous: nobody notices until the damage is done.

  • Committed to code. A developer pastes a key into a file, the file goes into a code repository, and the repository ends up public or shared with the wrong people. This is the most common leak, and it happens to big companies too.
  • Pasted into chats and documents. A key gets dropped into a team chat, a shared doc, or a support ticket so someone can "just get it working." Those places keep history forever.
  • Screenshots and screen shares. A key is visible in a settings page during a video call or in a screenshot posted to social media.
  • Old keys nobody revoked. An employee leaves, a contractor finishes, a test project ends — and the keys they used keep working for years.
  • Test keys left in production. A key made for testing, with wide permissions, ends up in the live system because it was easier than making a proper one.

If any of that sounds familiar, do not panic. Just start fixing it from the top.

Six habits that keep keys safe

One key per tool, per environment. Do not share a single key across your live business and your testing. Give each tool its own key, and keep live and test keys separate. When something goes wrong, you can revoke one key without breaking everything else.

Least privilege. Most services let you limit what a key can do. A key that only needs to read your calendar should not also be able to delete things or send messages. Set the narrowest permissions the job actually needs. If you are not sure what a key needs, start narrow and widen it only when something breaks.

Rotate on a schedule. Keys should not live forever. Pick a rhythm — every 90 days is a reasonable one for a small business — and replace keys on that schedule. Put it on the calendar the same way you would any other maintenance. Rotating a key is a few minutes of work; cleaning up after a leaked one is days.

Revoke what you do not use. Go through your tools once a quarter and delete keys for tools you stopped using, people who left, and projects that ended. A key that does not exist cannot leak.

Never put keys in code. Keys belong in environment variables or a secrets manager — a place designed to hold them — not in files that get copied, shared, or uploaded. If a key is sitting in a file right now, move it and then revoke the old one, because you have to assume it has already been seen.

Watch usage and set limits. Most services show you how often a key is used and let you set spending caps or alerts. Turn those on. A sudden spike in usage is often the first sign a key has leaked, and a cap is the difference between a bad morning and a terrible invoice.

If a key leaks

First, revoke it. Do not investigate first and revoke later — revoke first, then look. A revoked key is useless to anyone holding it.

Then check the usage logs for that key: what was accessed, and when. Then rotate — issue a new key, put it where it belongs, and update the tools that need it. Finally, tell the people who need to know, and write down what happened so the same leak does not happen again the same way.

None of this is complicated. It is the kind of unglamorous maintenance that keeps a business running, the same as locking the door at night. The tools you use to automate your business are powerful precisely because they can reach so much. Make sure the only hands on the keys are yours.

Want a second pair of eyes on what your business exposes online? Our done-for-you website security scan starts at $297.

Book a security scan →