# Rotating API keys

[API keys](/docs/glossary/api-key/) are confidential, privileged tokens which allow access to your account. If you suspect a key may have been compromised you should rotate your API keys immediately. It only takes a few quick steps to regenerate your API keys and secure your network.

1. Log in to the admin panel and go to the [API Keys](https://admin.defined.net/settings/api-keys) page
1. Find the API key in question by its name, and ID. You can determine the ID by removing the last hyphenated section of the key (e.g. `dnkey-IRUTKBSV6QUABZLTSIPEDRXXXY`).
1. [Create a new API key](https://admin.defined.net/settings/api-keys/add) with the old key's permissions
1. Update your existing scripts with the new key
1. Revoke the existing key.
