# Authentication

Create workspace API keys with scopes for the REST API, the CLI and the Wisp MCP server.

## Workspace API keys

Create keys in **Settings → API keys**. Each key belongs to one workspace and has **scopes**:

| Scope | Allows |
| --- | --- |
| `projects:read` | List projects and read their settings and versions |
| `projects:write` | Create, configure and delete projects (limits, domains, alerts, MCP, GitHub) |
| `projects:deploy` | Publish and roll back |
| `functions:read` | Read functions, their code, the library and packages |
| `functions:write` | Create, change and delete functions, library modules and packages; create and restore versions |
| `functions:invoke` | Run functions (uses Run credits) |
| `logs:read` | Read invocation logs, live traces and metrics |
| `storage:read` | Browse key-value data, tables and files |
| `storage:write` | Change and delete stored data |
| `config:read` | List variables and the names of secrets |
| `config:write` | Set and delete variables and secrets |
| `keys:write` | Manage a project's API keys for its callers |
| `assistant:chat` | Run Wisp's assistant (uses AI credits) |

The key is shown once. It looks like `wisp_sk_<id>_<secret>`.

## Send the key

```bash
curl https://wispfn.com/api/projects \
  -H "Authorization: Bearer wisp_sk_..."
```

A request with a missing or invalid key gets `401`. A key without the needed scope gets `403`.

## Revoke a key

Delete it in **Settings → API keys**. It stops working immediately. Each key shows when it was last used.

> [!WARNING]
> Workspace keys act on your whole workspace. Keep them out of code and frontends; give each integration only the scopes it needs. To protect **your own API** with keys, use [project API keys](/api-keys) instead.
