# Manage project secrets

> **About this page**
>
> - Kind: How-to guide
> - Summary: Create, list, update and delete a project's own secrets, and see which account secrets the project can use.
> - Last changed: 2026-11-17
> - Page: https://docs.swale.io/how-to-guides/manage-project-secrets
> - CLI reference for its commands: [`swale secret project add`](https://docs.swale.io/reference/cli-reference.md#secret-project-add), [`swale secret account list`](https://docs.swale.io/reference/cli-reference.md#secret-account-list), [`swale secret project list`](https://docs.swale.io/reference/cli-reference.md#secret-project-list), [`swale secret project update`](https://docs.swale.io/reference/cli-reference.md#secret-project-update), [`swale secret project delete`](https://docs.swale.io/reference/cli-reference.md#secret-project-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, viewing inherited secrets, updating, and deleting project-level secrets.

Project secrets belong to a single project. A project secret is used in place of an account secret of the same name; see [Secrets](https://docs.swale.io/reference/expression-language.md#secrets) for the resolution order.

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]
Creating, updating and deleting a project secret require the **Contributor** role or higher and a verified email, and updating and deleting also need a sign-in from the last two hours: when yours is older, the platform asks you to sign in again. Listing and viewing project secrets need no particular role. In an organization, a Contributor reaches only the projects associated with their teams. See [Permissions and restrictions](https://docs.swale.io/reference/permissions-and-restrictions.md#secrets).
:::

## Create a project secret

**With the CLI:**

```bash
swale secret project add \
  --project-name my-project \
  --name MY_SECRET \
  --value my-secret-value
```

**In the UI:**

1. Open the project and navigate to **Secrets**.
2. Click **Create secret**.
3. Enter a name in **Secret name** and the value in **Secret value**.
4. Click **Create secret**.

## List account secrets visible to the project

The project secrets page shows both the project's own secrets and the account secrets whose allowed projects include this project.

Account secrets that are accessible to this project appear in the **Account Secrets** section. You cannot edit their value from the project view — edit them in **Secrets** under the main navigation, which in an organization appears only for Admins and Owners.

**With the CLI:**

```bash
swale secret account list \
  --visible-to-project my-project
```

**In the UI:**

1. Open the project and navigate to **Secrets**.
2. Review the account secrets shown in the **Account Secrets** section.

## List project-owned secrets

**With the CLI:**

```bash
swale secret project list \
  --project-name my-project
```

**In the UI:**

1. Open the project and navigate to **Secrets**.
2. Review the secrets shown in the **Project Secrets** section.

## Update a project secret value

**With the CLI:**

```bash
swale secret project update \
  --project-name my-project \
  --name MY_SECRET \
  --value my-updated-secret-value
```

**In the UI:**

1. Open the project and navigate to **Secrets**.
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**.

## Delete a project secret

**With the CLI:**

```bash
swale secret project delete \
  --project-name my-project \
  --name MY_SECRET
```

**In the UI:**

1. Open the project and navigate to **Secrets**.
2. Find the secret.
3. Click the **Delete** icon and confirm by clicking **Delete**.

If an account secret with the same name allows this project, workflows use that account secret once the project secret is deleted.

## Next steps

- [Manage account secrets](https://docs.swale.io/how-to-guides/manage-account-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)
