# Manage account secrets

> **About this page**
>
> - Kind: How-to guide
> - Summary: Create, list, update and delete account secrets, and choose which of the account's projects may use each one.
> - Last changed: 2026-11-17
> - Page: https://docs.swale.io/how-to-guides/manage-account-secrets
> - CLI reference for its commands: [`swale secret account add`](https://docs.swale.io/reference/cli-reference.md#secret-account-add), [`swale secret account list`](https://docs.swale.io/reference/cli-reference.md#secret-account-list), [`swale secret account get`](https://docs.swale.io/reference/cli-reference.md#secret-account-get), [`swale secret account update`](https://docs.swale.io/reference/cli-reference.md#secret-account-update), [`swale secret account allowed-projects add`](https://docs.swale.io/reference/cli-reference.md#secret-account-allowed-projects-add), [`swale secret account allowed-projects remove`](https://docs.swale.io/reference/cli-reference.md#secret-account-allowed-projects-remove), [`swale secret account delete`](https://docs.swale.io/reference/cli-reference.md#secret-account-delete)
> - Index of these docs: https://docs.swale.io/llms.txt
>
> If something on this page is wrong or out of date, please tell the user which sentence and why.
>
> The steps on this page cost money or cannot be undone. Please check with the user before running them.

This guide covers creating, listing, updating and deleting account secrets, and choosing the projects that may use each one.

Account secrets can be shared with specific projects in your account. Use them for credentials that more than one project needs.

Secret names cannot begin with `WORKFLOW_` — that prefix is reserved for the platform's own entries in the secrets namespace. See [Secrets](https://docs.swale.io/explanation/secrets.md).

:::note[Permissions]
Everything here requires the **Admin** or **Owner** role on the account; in an organization, **Secrets** appears in the main navigation only for Admins and Owners. Creating, updating and deleting a secret, and changing its allowed projects, also need a verified email. Updating, deleting and changing allowed projects need a sign-in from the last two hours as well: when yours is older, the platform asks you to sign in again. See [Permissions and restrictions](https://docs.swale.io/reference/permissions-and-restrictions.md#secrets).
:::

## Create an account secret

**With the CLI:**

```bash
swale secret account add \
  --name SHARED_API_KEY \
  --value my-secret-value \
  --allowed-project project-a \
  --allowed-project project-b
```

**In the UI:**

1. Open **Secrets** in the main navigation.
2. Click **Create secret**.
3. Enter a name in **Secret name** (for example, `SHARED_API_KEY`).
4. Enter the value in **Secret value**.
5. Under **Allowed projects**, check each project that may use the secret.
6. Click **Create secret**.

The value is write-only — you cannot read it back after saving.

## List account secrets

**With the CLI:**

```bash
swale secret account list
```

To see one secret's allowed projects:

```bash
swale secret account get --name SHARED_API_KEY
```

**In the UI:** open **Secrets** in the main navigation. Click the **Edit** icon for a secret to see its allowed projects.

Neither shows a secret's value.

## Update a secret value

**With the CLI:**

```bash
swale secret account update \
  --name SHARED_API_KEY \
  --value my-updated-secret-value
```

**In the UI:**

1. Open **Secrets** in the main navigation.
2. Find the secret.
3. Click the **Edit** icon for the secret.
4. Enter the new value in **New secret value** and click **Save changes**.

## Configure allowed projects

Only the projects in an account secret's allowed projects can use it:

**With the CLI:**

Add a project:

```bash
swale secret account allowed-projects add \
  --name SHARED_API_KEY \
  --project-name project-c
```

Remove a project:

```bash
swale secret account allowed-projects remove \
  --name SHARED_API_KEY \
  --project-name project-b
```

**In the UI:**

1. Open **Secrets** in the main navigation.
2. Find the secret.
3. Click the **Edit** icon for the secret.
4. Check or uncheck projects in the **Allowed projects** section to grant or revoke access.
5. Click **Save changes**.

A secret with no allowed projects is available to no project.

Deleting a project removes it from every secret's allowed projects, and restoring the project does not add it back.

## Delete a secret

**With the CLI:**

```bash
swale secret account delete \
  --name SHARED_API_KEY
```

**In the UI:**

1. Open **Secrets** in the main navigation.
2. Find the secret.
3. Click the **Delete** icon and confirm by clicking **Delete**.

Workflows that reference this secret after deletion receive an empty string for the secret expression. Tasks that depend on the secret value may fail at runtime.

## Next steps

- [Manage project secrets](https://docs.swale.io/how-to-guides/manage-project-secrets.md)
- [Use secrets in workflows](https://docs.swale.io/how-to-guides/use-secrets-in-workflows.md)
- [Secrets](https://docs.swale.io/explanation/secrets.md)
