> For clean Markdown of any page, append .md to the page URL. For a complete documentation index, see https://ibee.ai/docs/llms.txt (full text of every page: https://ibee.ai/docs/llms-full.txt). For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://ibee.ai/docs/_mcp/server.

# Enable Secret Manager

> Turn on IBEE Secret Manager for a workspace in the portal or with the API - choose the location, the namespace and how many versions each secret keeps, follow setup, and fix billing, name and setup errors.

Enabling Secret Manager creates an encrypted store for one workspace. You choose three things, and two of them are permanent: the **location** and the **namespace** can't be changed later, and the **versions to keep** becomes the workspace default for every secret. Setup usually takes a few seconds. Enabling is free; you pay for the secrets you store and the operations you make.

## Before you begin

* **Role:** the Owner, an Admin, or a Technical member with access to the workspace. Collaborators see the page read-only: "Read-only access. Ask a workspace admin to enable it."
* **Identity verification** for your organization. Until it's done, the button reads **Complete KYC** or **Verify Identity**. See [Verify your identity](/docs/getting-started/account-setup/verify-your-identity).
* **Billing:** enabling goes through the [billing check](/docs/platform-fundamentals/billing-and-usage#billing-admission-checks).
* **A namespace name** that follows the rules below.

## Choose a namespace

Your applications send the namespace with every request (`VAULT_NAMESPACE`), so pick something short and specific to the workspace, such as `acme-payments` or `acme-payments-staging`.

* 3–32 lowercase letters, digits and single hyphens, starting and ending with a letter or digit.
* Not reserved: names made only of digits, names starting with `ibee`, `i-bee`, `ws-`, `sm-`, `openbao`, `vault`, `hashicorp`, `kube`, `k8s-`, `admin`, `internal`, `official` or `support`, and common words such as `prod`, `dev`, `test`, `api`, `app`, `secret` and `default`.
* Unique across IBEE, and never reused, even after a workspace is deleted.

## Choose how many versions to keep

Each secret keeps its last N versions; when a save would exceed N, the oldest version is destroyed. N is the workspace default for every new secret: from 1 to 1,000, 10 if you don't change it. The default can't be changed after you enable Secret Manager, but each secret can set its own number later.

Every kept version is billed (₹3 per secret per month for the first, ₹3 per month for each older one), so a secret that keeps all 10 versions costs up to ₹30 a month. With fewer than 3 versions, one bad save can leave nothing to go back to. See [Pricing](/docs/tools/secret-manager/pricing).

## Enable it in the portal

### Open Secret Manager

Open the workspace. In the sidebar, under **Tools**, click **Secret Manager**.

### Choose the location

Under **Location**, keep or pick the location, for example **Amaravati** (`VGA · AP, IN`). "Your secrets are stored here. It can't be changed later."

### Enter the namespace

Under **Namespace**, type the name. The portal lowercases it and checks it as you type:

| Message                                                           | Meaning                                |
| ----------------------------------------------------------------- | -------------------------------------- |
| "Available."                                                      | You can use it                         |
| "Use 3-32 lowercase letters, digits and single hyphens."          | The name breaks the character rules    |
| "This name is reserved. Choose another one."                      | The name is reserved                   |
| "This name is already in use. Choose another one."                | Another workspace has it               |
| "Could not check this name. It is checked again when you enable." | The check failed; you can still enable |

### Choose the versions to keep

Under **Versions to keep**, the portal shows "10 per secret". To change it, click **Change** and pick **1**, **3**, **5**, **10** or **25**, or type a number from 1 to 1,000. The hint shows the most a secret will cost each month once all its versions are kept.

### Check the prices and enable

Read **Pricing · pay as you go, excl. GST**, then click **Enable Secret Manager**.

### Setup

The page shows **Setting up Secret Manager** with three steps: **Name reserved**, **Creating your encrypted store** and **Ready for your first secret**. "Usually a few seconds. You can leave this page; setup continues." When it finishes, the page shows **Secret Manager is ready**, then **No secrets yet** with **Create your first secret**.

| You see                                                                                | What to do                                                                                                         |
| -------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
| "Taking a little longer. Retrying automatically."                                      | Nothing. Setup retries on its own.                                                                                 |
| "Taking longer than usual. Setup keeps going; you can leave and come back."            | Come back later                                                                                                    |
| "Hasn't started yet. If it still hasn't in a few minutes, contact support."            | Wait a few minutes, then [contact support](/docs/support/contact-support) with the **Reference for support** shown |
| **Setup didn't finish** — "Billing didn't allow Secret Manager for this organization." | Resolve it under **Billing options**, then click **Try again**                                                     |
| **Setup didn't finish** — the namespace "is already used outside this workspace."      | Click **Choose another name**                                                                                      |
| **Setup didn't finish** — "Your encrypted store couldn't be created."                  | Click **Try again**. Retrying never creates a second store.                                                        |

If Billing refuses before setup starts, **Billing needs attention** opens: "Billing did not allow Secret Manager for this organization. Add funds or resolve the billing issue, then turn it on again." Click **Add Credits**, then enable again.

## Enable it with the API

You need an [API token](/docs/tools/api-tokens) with **Secret Manager → Edit** (`secret-manager.write`) and the workspace ID. Every Secret Manager call takes `workspace_id` as a query parameter.

### Check the name (optional)

```bash
export IBEE_TOKEN="ibee_prod_key_xxxxxxxxxxxx.xxxxxxxx"
WS=710995   # your workspace ID

curl -s "https://api.ibee.ai/v1/secret-manager/namespaces/acme-payments/availability?workspace_id=$WS" \
  -H "Authorization: Bearer $IBEE_TOKEN"
```

```json
{ "namespace": "acme-payments", "available": true, "reason": null }
```

`reason` is `invalid`, `reserved` or `taken` when the name can't be used. The check is advice only; the enable call decides.

### Enable

Send an `Idempotency-Key` (8–128 characters: letters, digits, `.`, `_`, `:` and `-`). Retrying with the same key and body returns the same operation instead of starting a second one.

```bash
curl -s -X POST "https://api.ibee.ai/v1/secret-manager/workspace/enable?workspace_id=$WS" \
  -H "Authorization: Bearer $IBEE_TOKEN" \
  -H "Idempotency-Key: enable-acme-payments-001" \
  -H "Content-Type: application/json" \
  -d '{"namespace": "acme-payments", "max_versions": 10}'
```

The answer is `202` with an operation:

```json
{
  "id": "0193f2c4-7a1e-7c3b-9d2e-4f5a6b7c8d9e",
  "kind": "activate",
  "status": "queued",
  "attempts": 0,
  "error_code": null
}
```

`max_versions` is optional (1–1,000; 10 when left out). The API doesn't take a location: it enables Secret Manager in the default location. To pick a location, use the portal.

### Wait for the operation

```bash
curl -s "https://api.ibee.ai/v1/secret-manager/operations/0193f2c4-7a1e-7c3b-9d2e-4f5a6b7c8d9e?workspace_id=$WS" \
  -H "Authorization: Bearer $IBEE_TOKEN"
```

Poll every few seconds until `status` is `completed` or `failed`. On the way it can be `queued`, `running` or `retrying`. If it ends `failed`, `error_code` says why (for example `billing_denied`); fix the cause and enable again with a **new** `Idempotency-Key` and the same namespace.

### Read the workspace

```bash
curl -s "https://api.ibee.ai/v1/secret-manager/workspace?workspace_id=$WS" \
  -H "Authorization: Bearer $IBEE_TOKEN"
```

```json
{
  "namespace": "acme-payments",
  "state": "active",
  "max_versions": 10,
  "site_code": "VGA",
  "endpoint": "https://secrets.ibee.ai"
}
```

`endpoint` and `namespace` are the `VAULT_ADDR` and `VAULT_NAMESPACE` your applications use. Before Secret Manager is enabled, this call answers `404` with `workspace_not_enabled`; during setup, `state` is `pending`.

## Verify it worked

* **Portal:** the Secret Manager page shows **Secrets | IBEE-managed | Connect** tabs and **Create secret**.
* **API:** `GET /secret-manager/workspace` answers `"state": "active"`.

## Turning it off

You can't turn Secret Manager off yourself, and the namespace stays yours. Storage costs stop when you delete your secrets (or destroy their versions); an enabled workspace with no secrets costs nothing. To remove Secret Manager from a workspace, [contact support](/docs/support/contact-support). Removing it deletes every secret, version and app credential in that workspace permanently, and Secret Manager can't be enabled in that workspace again.

## Troubleshooting

API errors come back as JSON with `error` (the code) and `message`.

| You see                                                             | What it means                                                                                                                                                                            | What to do                                                                        |
| ------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
| `402` `billing_denied`                                              | Billing refused. `billing_reason` says why; with `initial_topup_required`, `required_topup_minor` and `billing_currency` give the first top-up (for example `50000` and `INR` for ₹500). | Add credits, then enable again                                                    |
| `403` `insufficient_scope`, `required_scope` `secret-manager.write` | The API token lacks Secret Manager edit permission                                                                                                                                       | Create a token with **Secret Manager → Edit**                                     |
| `403` `verification_required`                                       | Identity verification isn't complete                                                                                                                                                     | Complete [verification](/docs/getting-started/account-setup/verify-your-identity) |
| `409` `namespace_taken`                                             | Another workspace has the name                                                                                                                                                           | Choose another name                                                               |
| `409` `already_enabled`                                             | Secret Manager is already on in this workspace                                                                                                                                           | Read it with `GET /secret-manager/workspace`                                      |
| `409` `workspace_pending`                                           | Setup is in progress                                                                                                                                                                     | Poll the operation                                                                |
| `409` `namespace_locked`                                            | An earlier attempt may have reserved a different name                                                                                                                                    | Retry with the original namespace                                                 |
| `409` `idempotency_conflict`                                        | The key was used for a different request                                                                                                                                                 | Use a new `Idempotency-Key`                                                       |
| `422` `namespace_invalid`                                           | The name breaks the character rules                                                                                                                                                      | Use 3–32 lowercase letters, digits and single hyphens                             |
| `422` `namespace_reserved`                                          | The name is reserved                                                                                                                                                                     | Choose another name                                                               |
| `503` `billing_unavailable`                                         | Billing couldn't be checked; nothing was charged                                                                                                                                         | Try again in a few minutes                                                        |

## Related pages

* [Concepts](/docs/tools/secret-manager/concepts): namespaces, locations and versions
* [Manage secrets in the portal](/docs/tools/secret-manager/manage-secrets)
* [Enable Secret Manager (API reference)](/docs/api-reference/secret-manager/enable-secret-manager-workspace)