# API Keys

In order to access the API, you must generate an API key in the Arkis App settings and include it in the Authorization header of every request. The sections below walk through the process and provide relevant development documentation.

## Create a new API key

1. Go to [**API Key Management** page](https://app.arkis.xyz/settings/api-keys).
2. Click **Create API Key** button in the top right corner.
3. Enter a token name, select an expiration date from the predefined options or specify a custom date, and choose the desired permissions.
4. Click **Create API Key** to proceed.

<details>

<summary>Visual walkthrough</summary>

1. Go to [**API Key Management** page](https://app.arkis.xyz/settings/api-keys).

<figure><img src="https://3978617066-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJHNY2cWUA8ooxRaSq4DZ%2Fuploads%2FFt19pU2IP0YuUi8vYhhM%2Fapi%201.png?alt=media&#x26;token=a7f7019b-f07c-4d42-8d50-c9d4b37ca316" alt=""><figcaption></figcaption></figure>

2. Click on **Create API Key** button in the top right corner.

<figure><img src="https://3978617066-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJHNY2cWUA8ooxRaSq4DZ%2Fuploads%2F8ZUCIxxGBvqTi6LEHE5I%2Fapi%202.png?alt=media&#x26;token=1e8d6eee-0df6-4cea-b660-2db917fcf18b" alt=""><figcaption></figcaption></figure>

3. Enter a token name, select an expiration date from the predefined options or specify a custom date, and choose the desired permissions.

<figure><img src="https://3978617066-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJHNY2cWUA8ooxRaSq4DZ%2Fuploads%2FfBqy2sA72l5tnvgzfegw%2Fapi%203.png?alt=media&#x26;token=a864e9d5-7dbb-4daa-8285-cfaae40e70c5" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3978617066-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJHNY2cWUA8ooxRaSq4DZ%2Fuploads%2F0kNi6MpmisH5Mdgi2Dqy%2Fapi%204.png?alt=media&#x26;token=175f2dca-0e87-43b6-974a-e87c2b4dc0ab" alt=""><figcaption></figcaption></figure>

</details>

{% hint style="warning" %}
The token is displayed only once. Make sure to copy it immediately and store it securely. Do not save the token in plain text files. If the token is lost or compromised, it must be manually revoked: [#revoke-an-api-key](#revoke-an-api-key "mention").
{% endhint %}

## Revoke an API key

{% hint style="warning" %}
Only **Organization Admins** can revoke an API key
{% endhint %}

1. Go to [**API Key Management** page](https://app.arkis.xyz/settings/api-keys).
2. Locate the key by its name or tail (the last six characters of the key).
3. Click **Revoke.**

<details>

<summary>Visual walkthrough</summary>

1. Go to [***"API Key Management"*** page](https://app.arkis.xyz/settings/api-keys).

<figure><img src="https://3978617066-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJHNY2cWUA8ooxRaSq4DZ%2Fuploads%2FFt19pU2IP0YuUi8vYhhM%2Fapi%201.png?alt=media&#x26;token=a7f7019b-f07c-4d42-8d50-c9d4b37ca316" alt=""><figcaption></figcaption></figure>

2. Locate the key by its name or tail (the last six characters of the key).

<figure><img src="https://3978617066-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJHNY2cWUA8ooxRaSq4DZ%2Fuploads%2FzBOd8jZCsBiMPwoj4x6G%2Fapi%205.png?alt=media&#x26;token=71422fc2-6abc-4a3a-b5a7-14757505d3cd" alt=""><figcaption></figcaption></figure>

3. Click ***"Revoke"***.

<figure><img src="https://3978617066-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJHNY2cWUA8ooxRaSq4DZ%2Fuploads%2FkbENDGgolGNv8MXLaK47%2Fapi%206.png?alt=media&#x26;token=7b001de1-01e4-43b4-bf41-0993aa236654" alt=""><figcaption></figcaption></figure>

</details>
