# Creating an API Key


An API key is a randomly generated string that is used to authenticate your requests and allow your team to fetch data from the Dyspatch API.

## How to get to the API Keys List

<img class="img-border" src="https://docs.dyspatch.io/img/administration/admin-dropdown.png" alt="Go to API Keys Page link in username dropdown"/>

API keys can only be created by an Organization Administrator or an Organization Developer. The API Keys list is available by selecting **Developer Tools** from your username drop-down menu while in the [Administration portal](https://app.dyspatch.io/admin/). 

## Create an API Key

![Click Generate API Key to create an API Key](https://docs.dyspatch.io/img/administration/api-keys-create.png)

Click **Generate API Key** to create your API key. Name your API key something that will help you and other Administrators identify it.

Select the key permissions level:
- **Read & Write** - Provides access to retrieving and posting requests via the API
- **Read-only**  - Provides access to _only_ retrieving requests via the API

![Copy your API key and save it somewhere secure!](https://docs.dyspatch.io/img/administration/api-keys-copy.png)

<div class="highlight warning">Important! For security reasons, your API key will only be shown once. Please store your API keys in a safe and secure place as lost keys cannot be retrieved.</div>

## Using an API Key

Set **Bearer** followed by your API key as the **Authorization header** in your API requests. Below is an example curl request with an API key in the Authorization header.

```bash
curl --request GET \
  --url https://api.dyspatch.io/templates \
  --header 'Authorization: Bearer EXAMPLEAPIKEYXXXXXXXX12345678' \
  --header 'Accept: application/vnd.dyspatch.2023.01+json'
```

Refer to the <a href="https://docs.dyspatch.io/api/" target="_blank">Dyspatch API Documentation</a> for more information.
