Leaked API Key or Hacked Account? A Step-by-Step Emergency Checklist

CQTAI

11/16/2026

#Security#Incident Response#API Keys#Checklist
Leaked API Key or Hacked Account? A Step-by-Step Emergency Checklist

You open your usage and see calls you did not make. Or a key turns up in a public repository. Or an email tells you that your account signed in from somewhere strange. The right response is neither panic nor "I will look at it tomorrow". It is a short, ordered list.

This checklist has two tracks: a leaked key and a compromised account. Start with the one that matches, and do the first step before anything else. Bookmark this page now; it is easier to follow when you are not in a hurry.

The one rule: disable first, investigate second

A disabled key stops being accepted. Disabling is reversible, so there is little cost to doing it too early and a large cost to doing it too late. Investigate with the key off.

Track A: you suspect an API key has leaked

Step 1. Disable the key. Open the API Keys page, find the key by name and switch it off. If you are not sure which key leaked, disable every key you cannot account for. Disabling stops further calls with that key from being accepted.

Step 2. Create a replacement with limits. Make a new key, and this time give it an expiry, a usage limit and a model list. Copy it straight into your secret store, since it is shown only once. Roll it out to the services that need it. Details are in our best-practices guide.

Step 3. Look at what happened. Open Logs and filter to the current month, then check:

  • Models you do not use.
  • Activity at hours when your systems are idle.
  • A sudden rise in volume or amount.

Open a record to see its details, including the time, the model, the amount and the source IP address when one is recorded. Personal logs do not show which key made a call, so use timing and the models involved to match activity to a key. If you use an organization, its Activity tab breaks spend down by member and by key.

Step 4. Find out where it leaked, and fix that. Replacing a key does not close the hole that exposed it. Check:

  • Public or shared repositories and their history. Removing a key in a later commit does not unpublish it, so treat any key that was ever committed as burned.
  • Logs, error trackers, CI output and build artifacts.
  • Frontend bundles and mobile app packages.
  • Chats, tickets, screenshots and shared documents.
  • Other secrets stored next to it, such as in the same .env file. If they were exposed together, rotate them too.

Step 5. Delete the old key. Once you are sure nothing depends on it and you have captured what you need from the logs, delete it. Deleting cannot be undone.

Step 6. Check your balance and alerts. Look at your balance and, in Settings, make sure balance alerts are on so a repeat shows up quickly.

Step 7. Contact support if there are charges you cannot explain. Open a ticket from the support page with the key's name (not its value), the time window, the models and amounts you noticed, and what you have done so far. Never paste the full key into a ticket.

Track B: you suspect your account is compromised

If someone can sign in as you, they can create keys, so keys alone are not enough.

Step 1. Change your password in Settings, using a new, unique password from your password manager. After a successful change, existing sessions end, so any session the other person holds is signed out too. If you cannot sign in, use "Forgot password" on the sign-in page and reset it with the code sent to your email.

Step 2. Secure your email account. The reset flow runs through your inbox. If the attacker has your mailbox, they can reset your password again. Change that password, check its forwarding rules and sign-in history, and turn on two-step verification there.

Step 3. Review your login history. In Settings, read Login history for sign-ins from addresses or browsers you do not recognize, including rows marked New network, and for bursts of failed attempts.

Step 4. Review your keys. Disable any key you do not recognize and any key whose origin you cannot explain. Create fresh keys for the services that you still need, with limits.

Step 5. Check your balance alerts. Open the balance alert section in Settings and confirm that the notification target is still yours. Saved webhook addresses and secrets are not shown again, so if in doubt, re-enter your own.

Step 6. If you use an organization, open its audit log. It records key creation, edits and deletion, member changes and invitations, with who did it and from which IP. Remove members you do not recognize, and if your own account was the one compromised, tell the other owners.

Step 7. Contact support from the support page with a timeline: when you first noticed it, what you saw and what you have already done.

What not to do

  • Do not paste the key or your password into a ticket, email or chat. Nobody should need them.
  • Do not wait for confirmation before disabling a key you cannot account for. You can re-enable it later.
  • Do not delete logs or records before you understand what happened.
  • Do not reuse the old password with a small change.
  • Do not click links in emails that claim to be about your incident. Go to the console directly.

After the incident

A short review prevents the next one:

  • How did the key or password leave your control? Write it down.
  • Which limit would have contained it? Add it to every key.
  • Is there a rotation date? Put one on the calendar, at most every 90 days.
  • Does everyone on the team know where to disable a key?

FAQ

Will disabling a key break my application? Yes, for anything using it. If you have a replacement ready, switch to it first. In a real emergency, stopping the spending matters more than a short outage.

Can I tell who used my key? The logs can show what was called, when and, where recorded, from which IP address. They do not identify a person.

Will leaked usage be refunded? Open a ticket with the details and the support team will look at it. We cannot promise an outcome in advance, so reducing the exposure with limits and alerts is the better protection.

Takeaways

  • Disable first, investigate second; disabling can be undone.
  • Replace the key, then find and fix the source of the leak.
  • For account compromise, change your password, secure your email and review login history and keys.
  • Never send a full key or password to anyone, including support.

Prevention is cheaper than response: see how to set up your keys and how to protect your account.