Public API keys
Public API keys can only be used to upload files from your browser. Most of the time they will be used alongside a private key. Public keys follow the format:.env
Whitelist domains
For a public key to work, you must also set your allowed origins on that key. This is just a list of domains that are allowed to use your public key. You can set this in the Restash dashboard.Private API keys
Private API keys can be used to perform any action on your account such as uploading, retrieving, and deleting files. They are used to authenticate requests made to the Restash API from the server. Private keys follow the format:.env
Create an API key
1
Go to Restash dashboard
Go to API keys in the Restash dashboard.

2
Create an API key
Click on the Create API key button. A popup will open prompting you to enter a name for your key. You can also add the allowed origins if needed.

3
Use your API key
You can now use your newly created API key to access your account’s resources programatically via our SDKs.