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

# API keys

> Create, copy, set permissions for and delete workspace API keys, and use a key to connect an app to Connie's MCP server when it can't sign in with OAuth.

A workspace API key lets an app or script connect to Connie's [MCP server](/mcp/overview) without signing in through a browser. Use one only when your app can't sign in with OAuth. For Claude, ChatGPT, Claude Code, Cursor, VS Code and most other AI apps, [sign in instead](/mcp/overview#connect-your-ai-app).

**Where:** **Settings** → **Developers** → **API keys** · `https://connie.ai/<workspace-id>/settings?tab=developers`

## Before you use a key

* **A key belongs to one workspace.** It can't switch workspaces. For several workspaces, create a key in each one or use OAuth.
* **A key acts as one member.** It can do what that member can: the same role, records, lists and connected accounts. The row says **Permissions of \[member]**.
* **A key only works with the MCP server** at `https://mcp.connie.ai`. The endpoints in the [API reference](/api-reference/introduction) use your browser session instead, so a key sent there returns `401`. See [Build on Connie](/developers/overview).
* **Anyone with the key can act as you** in that workspace. Keep it out of shared files, screenshots and chat histories.

## Your personal key

The first time you open **API keys**, Connie creates a key for you named **Personal key**, with a **Personal** badge. It has **Full access** and acts with your permissions. You can use it straight away.

## Create a key

<Steps>
  <Step title="Open API keys">
    Go to **Settings** → **API keys** (under **Developers**).
  </Step>

  <Step title="Generate a key">
    Click **Generate API key**. In the **Generate API key** dialog, enter a **Name API key**, named after the tool or computer that will use it (for example "Codex on laptop"; up to 100 characters).
  </Step>

  <Step title="Create and copy">
    Click **Generate**. A card shows **New key: \[name]** with the key and a **Copy** button. Copy it. Keys start with `sk_` followed by 64 letters and numbers.
  </Step>
</Steps>

The card also has **Copy Codex setup prompt** and **Copy Cursor setup prompt**. These copy a ready-made prompt to paste into those apps. The prompt includes your key, which then stays in that app's chat history. Signing in with OAuth is safer; see [Cursor](/mcp/cursor) and [Other apps](/mcp/other-clients).

You can copy a key you created again later: open its **⋯** menu and click **Copy**.

## What each key row shows

* The name, plus **Personal** for your auto-created key and **Expired** if it has expired.
* The start of the key (`sk_…`).
* **Full access** or **Limited access**.
* "Created \[date] by \[member]" (keys made before keys had names show "Created before named keys").
* "Last used …" or "Never used".
* **Permissions of \[member]**, or **Shared tools only** if the key isn't linked to a member. A **Shared tools only** key can't read or change records, lists or tables.

## Change which member a key acts as

Owners and admins only.

<Steps>
  <Step title="Open the key's menu">
    Click **⋯** on the key's row and choose **Permissions**.
  </Step>

  <Step title="Pick a member">
    The **Permission level** dialog says the key "can do what the selected member can: the same role, records, lists and connected accounts." Pick the member and click **Save**. You'll see "Permission level saved".
  </Step>
</Steps>

You can't choose a member with a higher role than yours. For example, an admin can pick admins and members but not an owner. If you try, you'll see "You can't give a key a higher permission level than your own."

## Delete a key

Click **⋯** on the key's row → **Delete**, then confirm **Delete "\[name]"?**. "Anything using this key stops working immediately. Your other API keys are not affected."

There's no rotate button. To rotate a key, generate a new one, switch your app to it, then delete the old one.

## Use a key with an MCP app

Point the app at `https://mcp.connie.ai` and send this header:

```text theme={null}
Authorization: Bearer sk_your_key_here
```

For example, in Claude Code:

```bash theme={null}
claude mcp add --transport http connie https://mcp.connie.ai --header "Authorization: Bearer sk_your_key_here"
```

Or in an app's JSON config that supports headers:

```json theme={null}
{
  "mcpServers": {
    "connie": {
      "url": "https://mcp.connie.ai",
      "headers": { "Authorization": "Bearer sk_your_key_here" }
    }
  }
}
```

Send only one credential. Don't send both an `Authorization` header and an `X-API-Key` header.

## Good to know

* **Who can do what:**

| | Owner / admin | Member | Guest |
| - | - | - | - |
| See keys | All keys in the workspace | Only their own | Can't use API keys |
| Create a key | Yes | Yes | No |
| Copy a key again | Keys they created | Keys they created | — |
| Change **Permissions** | Yes | No | — |
| Delete a key | Any key | Keys they created | — |

* **Limit:** 50 active keys per workspace.
* **If the member a key acts as leaves the workspace,** the key stops working.
* **Credits:** actions made with a key use the workspace's credits. They're marked as made with an API key in [Analytics](/analytics/overview) → Tool activity and in the credit usage log. See [Credits](/billing/credits).
* **Watch the "Last used" date.** Delete keys you no longer use.

## Troubleshooting

<AccordionGroup>
  <Accordion title="That doesn't look like a complete Connie API key">
    **Why:** the key was cut off when copying. Keys start with `sk_` followed by 64 letters and numbers. **Fix:** copy it again from **Settings** → **API keys** with the **Copy** button.
  </Accordion>

  <Accordion title="Connie doesn't recognise this API key">
    **Why:** the key was deleted, for example when its owner left the workspace. **Fix:** copy your current key, or generate a new one, and update the app's settings.
  </Accordion>

  <Accordion title="The API key was revoked or expired">
    **Fix:** copy your **Personal key**, or generate a new key, and update the app's settings.
  </Accordion>

  <Accordion title="The Authorization header isn't in the right format">
    **Fix:** use the word Bearer, a space, then the key: `Authorization: Bearer sk_...`.
  </Accordion>

  <Accordion title="This request sent two different Connie credentials">
    **Fix:** keep only one header, ideally `Authorization: Bearer <your key>`, and remove `X-API-Key`.
  </Accordion>

  <Accordion title="This API key acts with the permissions of someone who is no longer in the workspace">
    **Fix:** use your own **Personal key**, or ask an owner or admin to change the key's **Permissions** to a current member.
  </Accordion>

  <Accordion title="This Connie API key isn't linked to a workspace member">
    **Why:** it's a **Shared tools only** key. **Fix:** use your **Personal key**, or ask an owner or admin to set the key's **Permissions**.
  </Accordion>

  <Accordion title="Switching workspaces is not available with an API key">
    **Fix:** use the other workspace's own key, or connect with OAuth to reach all your workspaces.
  </Accordion>

  <Accordion title="This API key already has 10 open Connie sessions">
    **Fix:** close chats you aren't using, or restart your app, then try again.
  </Accordion>

  <Accordion title="A workspace can have up to 50 active API keys">
    **Fix:** delete keys you no longer use, then generate the new one.
  </Accordion>

  <Accordion title="Guests cannot use API keys">
    **Fix:** ask a workspace admin for member access. See [Members and roles](/workspace/members-and-roles).
  </Accordion>

  <Accordion title="My key gets 401 when I call connie.ai/api/...">
    **Why:** those endpoints sign in with your browser session, not API keys. **Fix:** use the key with the MCP server at `https://mcp.connie.ai`, or send your session Cookie header to the API (see [API authentication](/api-reference/authentication)).
  </Accordion>
</AccordionGroup>

## Related

* [Build on Connie](/developers/overview)
* [Use Connie in your AI app](/mcp/overview)
* [Errors and limits](/developers/errors-and-limits)
* [Workspace settings](/workspace/settings)


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