> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cassidyai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Use secret keys

> Securely store API keys, passwords, and sensitive values for use in Send API Request and Run Code actions.

Secret keys let you securely store sensitive values — like API keys, passwords, and tokens — so you can reference them in [Workflow](/workflows/overview) actions without exposing them in plain text. Once created, secret key values are encrypted and never displayed again.

<Info>Secret keys are used in **Send API Request** and **Run Code** actions within Workflows. They're ideal for connecting to external APIs that require authentication.</Info>

## Create a secret key

<Steps>
  <Step title="Open a Workflow action that supports secret keys">
    In the [Workflow builder](/workflows/building), add or open a **Send API Request** or **Run Code** action.
  </Step>

  <Step title="Start creating a key">
    In the action's value field (e.g., a header value or code variable), click the **+** button next to the field. Hover over **Insert a Secret Key**, then click **Create Secret Key**.

    <Frame>
      <img src="https://mintcdn.com/cassidy/4vOVgS8tIBDNrgx6/images/settings/secret-key-insert-button.png?fit=max&auto=format&n=4vOVgS8tIBDNrgx6&q=85&s=c7cd1f1785f005e97bea8eae83b45ff8" alt="Send API Request action showing the plus button next to the value field" width="964" height="1512" data-path="images/settings/secret-key-insert-button.png" />
    </Frame>

    <Frame>
      <img src="https://mintcdn.com/cassidy/4vOVgS8tIBDNrgx6/images/settings/secret-key-dropdown.png?fit=max&auto=format&n=4vOVgS8tIBDNrgx6&q=85&s=36653469be8860068b425091c66128d4" alt="Dropdown menu with Insert a Secret Key option" width="1132" height="492" data-path="images/settings/secret-key-dropdown.png" />
    </Frame>

    <Frame>
      <img src="https://mintcdn.com/cassidy/4vOVgS8tIBDNrgx6/images/settings/secret-key-create-option.png?fit=max&auto=format&n=4vOVgS8tIBDNrgx6&q=85&s=cbe6a5d1f95c26b2f1780f0828accc06" alt="Create Secret Key option in the submenu" width="860" height="610" data-path="images/settings/secret-key-create-option.png" />
    </Frame>
  </Step>

  <Step title="Enter key details">
    Fill in the following:

    * **Name** — A descriptive label for the key (e.g., "Stripe API Key", "HubSpot Token").
    * **Value** — The actual secret value (API key, password, etc.). This will be encrypted and hidden after creation.

    <Frame>
      <img src="https://mintcdn.com/cassidy/4vOVgS8tIBDNrgx6/images/settings/secret-key-create-form.png?fit=max&auto=format&n=4vOVgS8tIBDNrgx6&q=85&s=b8e0ab79f8ec339d4d8792c1997dabf0" alt="Secret key creation form showing name and value fields" width="868" height="638" data-path="images/settings/secret-key-create-form.png" />
    </Frame>

    <Warning>You won't be able to view the secret key value after saving. Make sure you've copied it correctly before proceeding.</Warning>
  </Step>

  <Step title="Set access permissions">
    Choose who can use this secret key:

    * **Team** — Everyone in your organization can use this key in their Workflows.
    * **Restricted** — Only specific people or [groups](/settings/roles-and-groups) can use the key. Click **Add People/Groups** to select who has access.

    For restricted keys, you can also set permission levels:

    * **Use** — Can reference the key in Workflow actions
    * **Manage** — Can update or delete the key

    <Frame>
      <img src="https://mintcdn.com/cassidy/4vOVgS8tIBDNrgx6/images/settings/secret-key-access-type.png?fit=max&auto=format&n=4vOVgS8tIBDNrgx6&q=85&s=8aa19f1286eeae0e0a161cea7f277469" alt="General Access dropdown showing Team and Restricted options" width="934" height="712" data-path="images/settings/secret-key-access-type.png" />
    </Frame>
  </Step>

  <Step title="Save">
    Click **Create**. The key is now stored securely and available for use.

    <Check>Your secret key is created. It appears in the secret key picker and can be inserted into any supported Workflow action.</Check>
  </Step>
</Steps>

## Use a secret key in a Workflow

Once created, you can insert a secret key into any **Send API Request** or **Run Code** action:

1. Click the **+** button next to the value field.
2. Hover over **Insert a Secret Key**.
3. Select the key from the list.

The key is inserted as a variable reference — the actual value is never exposed in the Workflow builder or run results.

<Frame>
  <img src="https://mintcdn.com/cassidy/4vOVgS8tIBDNrgx6/images/settings/secret-key-variable-selector.png?fit=max&auto=format&n=4vOVgS8tIBDNrgx6&q=85&s=036e1d4c283617960002b9e3aca0d306" alt="Secret key available in the variable selector under Insert a Secret Key" width="1116" height="648" data-path="images/settings/secret-key-variable-selector.png" />
</Frame>

## Manage existing keys

To view, update, or delete your secret keys:

1. In any Workflow action that supports secret keys, click the **+** button and select **Manage Secret Keys**.
2. From the management panel, you can:
   * **Rename** a key
   * **Update** the value (you'll need to enter the new value — the old one can't be retrieved)
   * **Change access permissions**
   * **Delete** a key

<Frame>
  <img src="https://mintcdn.com/cassidy/4vOVgS8tIBDNrgx6/images/settings/secret-keys-manage-panel.png?fit=max&auto=format&n=4vOVgS8tIBDNrgx6&q=85&s=55c423e47310a891af017a24e8b2d971" alt="Manage Secret Keys panel with filter tabs and list of stored keys" width="1874" height="1358" data-path="images/settings/secret-keys-manage-panel.png" />
</Frame>

<Frame>
  <img src="https://mintcdn.com/cassidy/4vOVgS8tIBDNrgx6/images/settings/secret-keys-key-options.png?fit=max&auto=format&n=4vOVgS8tIBDNrgx6&q=85&s=2ab67f3cd80bb7f6c1e684eba332c8cc" alt="Key options menu showing rename, edit value, update permissions, and delete" width="558" height="460" data-path="images/settings/secret-keys-key-options.png" />
</Frame>

<Warning>Deleting a secret key will break any Workflow actions that reference it. Make sure no active Workflows depend on the key before removing it.</Warning>

## Next steps

<CardGroup cols={2}>
  <Card title="Build a Workflow" icon="hammer" href="/workflows/building">
    Create Workflows that use secret keys for API authentication.
  </Card>

  <Card title="Assign roles and groups" icon="users-gear" href="/settings/roles-and-groups">
    Set up groups to control who can access restricted secret keys.
  </Card>
</CardGroup>
