Creating an API key
Create an API key to authenticate your requests
Open the API keys page
Navigate to the API section within your account dashboard. Click the “Create new API key” button to generate a new API key.
The API keys page is empty when you first open it.
Choose the environment
You now need to choose the environment to create the API key in. For this guide we will use the playground environment.
The environment modal is displayed when you click the 'Create new API key' button.
Give the API key a name
You should give the API key a name that will help you identify it. This is helpful when managing multiple API keys. It’s best practice to generate new keys for each use case and revoke them when they are no longer needed.
When creating a new API key, you will be asked to give it a name.
Copy the API key
After the key is created it will be displayed to you only once. You should copy the key and store it securely. If you loose the key you will need to revoke it and generate a new one.
The API key is displayed to you only once.
Securing your API key
It is your responsibility to keep your API keys safe and secure. Anyone holding your key will be able to make requests to the API on your behalf. Review our security best practices for information on how to keep your API keys secure.
The API keys page
Once you have created an API key you can view it on the API keys page. You can also revoke any keys from this page. You can read more in the authentication guide.
The API keys page shows a list of all your API keys.
Using the API key
When making requests to the API you will need to include the API key in the request headers. It must be included in the X-Api-Key
header for all requests.
Next step: Your first order
Now that you have your API key, let’s put it to use by making your first order. You’ll learn about the different ordering modes available and choose the one that best suits your needs.