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

# Workspaces

> Group an account's API keys by product, environment or client, choose who works in each workspace, and move or archive keys.

A workspace is a named group of an account's API keys, for example one per product, environment, or client. Use workspaces to see each group's metrics and logs apart, give it its own budget and policies, and let people work only where they need to.

## Before you begin

Every account, personal or team, has a **Default** workspace. It holds every key you haven't put in another workspace, and it can't be renamed or archived.

A workspace changes nothing about how a key works on its own. The balance stays shared across the account, and a key keeps its secret, limit, and spend wherever it is.

Only the owner and admins of the account create, rename, archive, and manage workspaces. Each person switches between the workspaces they work in with the [switcher card](https://docs.naga.ac/account/dashboard.md#switcher-card).

## Create a workspace

1. Open **Account → Workspaces**.
   The page lists each workspace with how many keys it holds and how much they have spent.
2. Create the workspace and give it a name.
3. Select the workspace's name to open it.

A workspace's **Settings** page changes its name, [budget](https://docs.naga.ac/account/budgets-and-policies.md#cap-spending-with-budgets), members, [price limit](https://docs.naga.ac/guides/limit-the-price.md#set-a-price-for-a-workspace-or-a-key), and [routing strategy](https://docs.naga.ac/build/routing.md#strategies).

## Choose who works in a workspace

The owner and admins of the account administer every workspace. A member works in Default and in the workspaces an admin adds them to. The switcher, the API Keys page and the key form show a member only those.

1. Invite the person to the [organization](https://docs.naga.ac/account/organizations.md#invite-members) first.
2. Open the workspace's **Settings** and select **Manage members**, or use the same item in its row menu on **Workspaces**.
   Everyone in the organization is listed, and the owner and admins show as administering it already.
3. Pick the person's [workspace role](#workspace-roles).

### Workspace roles

Each person has one of these roles in a workspace:

| Role | Can use |
| - | - |
| Admin | Every key of the workspace, its Metrics and Logs, and its members |
| Member | The keys they create in the workspace |
| No access | Nothing; the workspace doesn't appear in their dashboard |

A member who administers a workspace also opens Workspaces, Metrics and Logs, which show only the workspaces they administer. Billing has no keys in any workspace and sees the spend of all of them on **Account → Metrics**.

Taking a person out of a workspace disables the keys they created there and passes them to its admins, as when someone [leaves the organization](https://docs.naga.ac/account/organizations.md#remove-a-member).

## Choose who owns a key

A new key goes to the workspace you're in. It belongs to the person who creates it and is disabled when they leave the organization. When the account has more than one person, admins pick the owner:

* **Me**: the admin who creates the key.
* **Teammate**: a person who works in the workspace.
* **Workspace**: the workspace itself. A workspace key has no person behind it, so a service that uses it keeps running when people come and go.

## Move a key to another workspace

Only the owner and admins move keys.

1. Open **API Keys** in the key's workspace.
2. In the key's row menu, select **Move to workspace** and pick the workspace.

A key's history follows the key, so its past requests move with it in Metrics and Logs. A Playground request stays in the workspace it was made in, because the Playground uses no key. To move keys from a script, see [Put keys in workspaces with the API](https://docs.naga.ac/account/api-keys.md#put-keys-in-workspaces-with-the-api).

## Archive a workspace

An admin archives a workspace from its **Settings** page. Archiving a workspace disables its keys and keeps them in it, along with its budget, and spend history. Its keys can't be turned back on there.

To use an archived workspace's key again:

1. Move the key to a live workspace.
2. Enable it from its row menu.

## Troubleshooting

### `400` when you enable a key

The key is in an archived workspace, which keeps its keys disabled. Move it to a live workspace first, then enable it.

### A workspace address returns `404`

You don't work in that workspace. Ask an admin of the account to [add you](#choose-who-works-in-a-workspace).

## See also

* [Budgets and policies](https://docs.naga.ac/account/budgets-and-policies.md): cap a workspace's spending, key lifetime, and models.
* [API keys](https://docs.naga.ac/account/api-keys.md): create and manage the keys in a workspace.
* [Check balance and spending with the API](https://docs.naga.ac/account/balance-and-activity.md): report spend per workspace.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.