> For the complete documentation index, see [llms.txt](https://alphamoon.gitbook.io/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://alphamoon.gitbook.io/documentation/user-guide-how-tos/generating-new-api-key.md).

# Generating new API key

At Alphamoon we use API keys to authenticate requests. In this step-by-step guide, we'll explain how to generate your new API key for the organization or the single process.

## Create organization API key

To create a new API key for your organization, sign in to Alphamoon and go to **Settings:**

<figure><img src="/files/yyWVX1bDuMWvjrp7Ial9" alt=""><figcaption><p>Settings</p></figcaption></figure>

Next, choose the **API key** tab in the left-hand navigation panel:

<figure><img src="/files/9uV4VMPp6gBDb2FtUpIK" alt=""><figcaption><p>API keys</p></figcaption></figure>

\
Now, click the +**Create new API key** button on the top-right:

<figure><img src="/files/NypBgu2V2E0U6uu6Zh0U" alt=""><figcaption><p>Create new API key button</p></figcaption></figure>

<figure><img src="/files/mJbABqCwMP2Eza8pQzGc" alt=""><figcaption></figcaption></figure>

**Once the modal shows up:**

* Enter your API key's name
* Select API access scopes (determining what actions you can perform within the API - you choose All or select only the ones you need).
* Select the expiration date of your API key (we recommend changing the API key every 3 to 6 months).

Then click the **Create** button.&#x20;

Once you create a new API key, make sure you **save it** in a safe place right away as you won't be able to view it again:

<figure><img src="/files/00wQVMWW3AKUBzuiJkJd" alt=""><figcaption><p>Save your new API key</p></figcaption></figure>

{% hint style="info" %}
**Note:**

Once expired your API key will stop working. Remember to **create a new one in advance** to ensure your application continues to operate.
{% endhint %}

You can remove an API key by clicking the three dots next to the given API key and selecting **Delete:**

<figure><img src="/files/pm8GejoUraYCu4WLBcqa" alt=""><figcaption><p>Delete API key</p></figcaption></figure>

## Create process API key

To create a new API key for your organization, first enter one of your processes in the Dashboard:

<figure><img src="/files/d0iAwgYRSuvUBclSpdTU" alt=""><figcaption><p>Dashboard</p></figcaption></figure>

Next, click the **Configuration** button:

<figure><img src="/files/dq5LEMQv5htqrx0k4gSZ" alt=""><figcaption><p>Queue - Configuration button</p></figcaption></figure>

Once you enter the Configuration, select the **API keys tab** in the left-hand navigation panel:

<figure><img src="/files/NATXhCeiiI9MUq5XcCLN" alt=""><figcaption><p>API keys tab</p></figcaption></figure>

Now, click the + **Generate new key** button on the top-right:

<figure><img src="/files/KERqnfzn2x03WBQVa5ax" alt=""><figcaption><p>Generate new key button</p></figcaption></figure>

<figure><img src="/files/aasXxrENE7iXAOxe4vld" alt=""><figcaption><p>Generate new process API key</p></figcaption></figure>

**Once the modal shows up:**

* Enter your API key's name
* Select API access scopes (determining what actions you can perform within the API - you choose All or select only the ones you need).
* Select the expiration date of your API key (we recommend changing the API key every 3 to 6 months).

Then click the **Create** button.&#x20;

Once you create a new API key, make sure you **save it** in a safe place right away as you won't be able to view it again:

<figure><img src="/files/GYlU1iVxmKd10mD0tsYQ" alt=""><figcaption><p>Save new process API key</p></figcaption></figure>

You can remove your process API key by clicking the three dots next to the given API key and selecting **Delete:**

<figure><img src="/files/JJfbwViBIirOeIxSxAAw" alt=""><figcaption><p>Delete process API key</p></figcaption></figure>

## API key structure

The value of the API key is split by a colon into what we call a **user** and a **pass**. Bear in mind that these credentials are not the same as your Workspace login data.

**Example:**

If your **API key** has the value *h12shadjada:13ehjhj1b3j* then the value for the **user** is *h12shadjada* and the value for the **pass** is *13ehjhj1b3j*.<br>

## API key - security rules

To ensure the full security of your API keys as well as your credentials, we recommend you follow these best practices:

{% hint style="info" %}

* **Keep your API key and credentials confidential:** Treat your API key and credentials as sensitive information and avoid exposing them publicly or including them in source code repositories.
* **Use secure communication channels:** Always transmit the API key and credentials over HTTPS to prevent eavesdropping or interception.
* **Regularly rotate your API key and credentials:** For added security, consider rotating your API key and credentials periodically or whenever there is a potential compromise.
* **Restrict API key and credential permissions:** Limit the scope of the API key and credentials by providing only the necessary permissions required for your application.
* **Monitor API key and credential usage:** Keep track of API key and credential usage and set up alerts or notifications to identify any suspicious activity.<br>
  {% endhint %}

#### See next:
