# Expiring and ask-only API keys

> Give an API key an expiry of 30 days, 90 days or 1 year, or limit it to asking questions, so a leaked key can do less and lapses on its own.

> Status: in development, not available yet.

When you create an API key you can set an expiry and choose what the key may do. An expiring key stops working on its own. An ask-only key answers questions but cannot escalate, rate or resolve a conversation, so a key that leaks can do less.

## What it does

- **Expiry.** Choose **Never expires**, **Expires in 30 days**, **Expires in 90 days** or **Expires in 1 year**. An expired key gets HTTP 401 with `API key has expired.` on the public API and the workspace MCP server.
- **Access.** Choose **Full access** or **Ask questions only**. An ask-only key can ask questions and read capabilities. It gets HTTP 403 on `/v1/agent/escalate`, `/v1/agent/csat` and `/v1/agent/resolve`, with the message `This API key can only ask questions. Use a key with full access.`
- **True last use.** **Last used** updates on every authenticated call, including MCP and every `/v1` route, at most once a minute per key.
- **Keys you already have.** Existing keys never expire and keep full access.

## How to use it

1. Open **Channels & Apps**, choose the **Developers** tab and select **Create key**. (On the older dashboard: **Channels**, then **REST API**.)
2. Before you create the key, pick when it **Expires** and its **Access** level.
3. Create the key and copy it. It is shown once.
4. The key list shows each key's access and the date it expires, or **Expired**.

Through the API, create a key with `expires_in_days` (1 to 3650) and `scope` set to `ask`. Send `expires_in_days` again on a key update to change its expiry.

## Limits

- Only the workspace owner creates and revokes keys, and you can have up to 10 active keys per workspace.
- There are two access levels, full and ask-only. There is no per-route scope.
- Expiry is set in whole days from the moment you save it.
- An expired key is not deleted. Revoke it to remove it from the list.

## Questions

### Can I extend a key that is about to expire?

Yes. Update the key with a new `expires_in_days`. The new date counts from that moment.

### Which routes does an ask-only key still call?

The question routes and the capabilities read. Routes that change a conversation return 403.

### Do my existing keys change?

No. Keys created before this keep working with no expiry and full access.

## Related

- [API keys](/developers/api-keys/)
- [Query API](/developers/query/)
- [Errors and limits](/developers/errors-and-limits/)
- [MCP server](/developers/mcp-server/)

Source: https://docs.askvault.co/developers/api-key-expiry/
