API keys allow you to access the Octopus Deploy REST API and perform tasks such as creating and deploying releases. API keys can be saved in scripts or external tools, without having to use your username and password. Each user and service account can have multiple API keys.
See the Service Accounts docs for information about creating service accounts.
Creating an API key
You can create API keys by performing the following steps:
- From the Octopus Deploy web portal, sign in, and view your profile:
- Go to the API keys tab. This lists any previous API keys that you have created.
- Click on New API key, and give the API key a name that you can use to remember what the key was for.
- Click Generate new, and copy the new API key to your clipboard:
Write your key down
Once you generate an API key, it cannot be retrieved from the Octopus web portal again - we store only a one-way hash of the API key. If you want to use the API key again, you need to store it in a secure place such as a password manager. Read about why we hash API keys.