# API keys

> Create, name, limit and revoke the API keys that sign your requests to AskVault. Keys belong to one workspace and are shown once, so copy yours straight away.

An API key is the password your server uses to call AskVault. Each key works for one workspace only, so requests carry no workspace id.

## Before you start

- The workspace owner creates and revokes keys. Other roles do not see them.
- Your email must be verified. See [Your account](/settings/your-account/).
- You can have up to 10 active keys per workspace.

## Create a key

#### New dashboard

1. Open **Channels & Apps**, then the **Developers** tab.
2. Under **API keys**, enter a name and create the key.
3. Copy the key from the box that appears. You can rename it later.

#### Previous dashboard

1. Open **Channels** and choose **REST API**.
2. Select **Generate Secret Key**. The key is named for you (API Key 1, API Key 2 and so on), so keep your own note of which key is used where.
3. Copy the key from the banner above the list right away. It looks like `ak_` followed by 64 hexadecimal characters.

AskVault stores only a SHA-256 hash of the key, so the full key cannot be shown again. If you lose it, create a new one and revoke the old one.

## Use a key

Send it as a Bearer token on every request to `/v1/...`:

```
Authorization: Bearer ak_yourkeyhere
```

Write the literal word `Bearer`, one space, then the full key including `ak_`. Any other header form is rejected with HTTP 401 before the key is looked up. Keep keys on your server: never ship one in a web page, a mobile app or a repository.

## Rate limits per key

Each key starts at 60 requests a minute and 1,000 requests a day. The limits belong to the key, not the plan, so two keys on one workspace have independent budgets. Give each integration its own key.

#### New dashboard

Each key row shows its limits and how many questions it answered today. Edit the per-minute and per-day limits on the row. A key can be set up to 1,000 requests a minute and 100,000 a day.

#### Previous dashboard

The dashboard does not change a key's limits. Email `support@askvault.co` to raise them.

## Revoke a key

Choose **Revoke** on the key's row and confirm. The key stops working immediately and every request with it returns HTTP 401. Revoking cannot be undone.

## Rotate a key

1. Create a second key and deploy it to your integration.
2. Check that requests succeed with the new key.
3. Revoke the old one.

Rotate on a schedule that fits your security policy, and straight away if a key may have leaked. Resetting your account password does not change your API keys.

## Check it worked

```bash
curl https://api.askvault.co/v1/agent/capabilities \
  -H "Authorization: Bearer ak_xxx"
```

A valid key returns your workspace name and what the agent can do. A wrong or revoked key returns 401.

## If it doesn't work

**401 with a key that looks right.** The header must be exactly `Bearer ak_...`. A revoked key also returns 401.

**403 saying a higher plan is required.** Your plan does not include API access. Upgrade on the [Billing](/settings/billing/) page.

**"Maximum 10 active API keys".** Revoke a key you no longer use.

**429.** You hit the key's per-minute or per-day limit. See [API errors and rate limits](/developers/errors-and-limits/).

## Related

- [AskVault API: get started](/developers/)
- [Ask a question with the API](/developers/query/)
- [MCP server for your workspace](/developers/mcp-server/)
- [Expiring and ask-only API keys](/developers/api-key-expiry/)

Source: https://docs.askvault.co/developers/api-keys/
