> For the complete documentation index, see [llms.txt](https://docs.currents.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.currents.dev/dashboard/administration/api-keys.md).

# API Keys

Create and manage API keys to access the Currents REST API, MCP server, and integrations

API keys authenticate programmatic access to Currents - the [REST API](https://docs.currents.dev/api/), the [MCP Server](/ai/reference/mcp-server.md), the CLI tools, and other integrations. Every request is authorized against the permissions of the API key it carries, not the dashboard role of the user who created it.

{% hint style="info" %}
API keys are **organization-wide** credentials. They should be treated like passwords - stored in a secret manager and never committed to source control.
{% endhint %}

## Managing API Keys

Only organization **Admins** can create or revoke API keys. **Actions Admin** and **Member** roles can view existing keys, while **Guest** users cannot. See [Manage Team](/dashboard/administration/manage-team.md) for the full permissions matrix.

To create a key:

1. Navigate to **Organization → API Keys**
2. Click **Create API Key**
3. Set a **label** (used to identify the key in audit logs and notifications)
4. Choose the key **permission** (see below)
5. Copy the generated key - it is shown only once

## API Key Permissions

Each key is assigned one of two permission levels that govern what it can do across the entire organization:

| Permission       | Access                                                                                                                                                  |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Read Only**    | `GET` endpoints (runs, tests, analytics, metrics), plus creating [trace API links](/ai/agentic-artifacts/explore-a-trace.md) to recorded test evidence. |
| **Read & Write** | Full read access plus write operations (create, update, delete).                                                                                        |

Authorization is enforced **server-side at the REST API layer**. A **Read Only** key that attempts a write operation - deleting a run, creating a webhook, changing an action, or creating a Jira issue - is rejected with an **HTTP 403 Forbidden**, regardless of which client or tool issued the request.

{% hint style="warning" %}
**Legacy keys** created before permission levels were introduced default to **Read & Write** for backward compatibility. For read-only access, a new key with the **Read Only** permission should be created rather than reusing an older key.
{% endhint %}

### Scope

API key permissions are **organization-wide**. A key applies to all projects and data in the organization exposed by the endpoints it can reach. There is currently no per-project, per-tool, or per-endpoint key scoping - only the Read Only vs Read & Write distinction.

## Using API Keys

The key is passed as a bearer token in the `Authorization` header:

```bash
curl https://api.currents.dev/v1/runs \
-H "Authorization: Bearer API_KEY_HERE"
```

For MCP and integration setups, the key is provided through the relevant configuration (for example the `CURRENTS_API_KEY` environment variable). See the [Local MCP Server](/ai/connect/local.md) and [Remote MCP Server](/ai/connect/remote.md#connect-with-an-api-key) pages for details.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.currents.dev/dashboard/administration/api-keys.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
