Skip to main content

What should I do if I suspect my API key has been compromised?

If you suspect that your API key may be compromised, we recommend revoking the key immediately. You can do so by logging into your Claude Console account, going to the API keys page (platform.claude.com/settings/keys), clicking the menu (i.e. the three horizontal dots) next to the key in question, and selecting "Delete API key." If you don't see the key, check each of your Workspaces on the API keys page, and any other Console organizations you belong to.

You can generate a new API key by clicking on the "Create key" button on the same page; make sure to save this key somewhere secure, such as a secrets management system and avoid keeping the key in version control. If the key was stored with a service that had a breach, also rotate any other secrets you stored there. If you continue to see any suspicious API activity or have other concerns, please contact our Support team.

Did this answer your question?