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

# API Keys

> Create and manage API keys that give your scripts and integrations secure, scoped access to the Tightknit API.

## Accessing API keys

![The API Keys page in Studio](https://mintcdn.com/tightknit/YGPRBt0aH8krlk98/assets/studio/integrations/api-keys.png?fit=max\&auto=format\&n=YGPRBt0aH8krlk98\&q=85\&s=6185e8245bea82786fbea3ede6258e7d)

The API Keys page in Studio

Admins can view and generate the Tightknit API keys from **[Integrations > API > API keys](https://studio.tightknit.ai/-/integrations/api/keys)** in the Studio.

![API Keys settings page](https://mintcdn.com/tightknit/jjquqHa-xIMIQAvv/assets/integrations/api-keys/api-keys-page.png?fit=max\&auto=format\&n=jjquqHa-xIMIQAvv\&q=85\&s=c7ef908aac943c17157c481589582431)

API Keys settings page

## Creating a new API key

Click the `Create API key` button to generate a new API key. Give your key a descriptive name and select its access to each API: **No access**, **Read only**, or **Read & write**. A key needs access to at least one API, and its permissions can't be changed after it's created, so create a new key if you need different access.

Keys don't expire by default. To set an expiration, select **Edit expiration** from the key's menu after creating it.

![Create API key dialog](https://mintcdn.com/tightknit/jjquqHa-xIMIQAvv/assets/integrations/api-keys/create-api-key-dialog.png?fit=max\&auto=format\&n=jjquqHa-xIMIQAvv\&q=85\&s=6f71b64a0d8543eacb8f30fd01f95001)

Create API key dialog

Your key secret will be displayed once and will be in the format `sk_*`.

> [!TIP]
>
> You will only be shown the key secret once, so make sure to save it somewhere
> safe such as a password manager.

## API key introspection

You can check a key's community and permissions before making other API calls. The call differs by API version.

* **v1:** call `GET /v1/api_key`. It needs no permission and returns the key's name, masked value, permissions and community name.
* **v0:** call `GET /admin/v0/api_key/me`. It returns the key's type, associated community, and granted permissions.

If your API key is missing a permission required by an endpoint, the API returns a `403` response. In v1 the error code is `insufficient_scope`. In v0 it is `INSUFFICIENT_SCOPE`, with a hint listing the permission that was required and the permissions your key currently has.

See the [v1 API Reference](https://docs.tightknit.ai/v1/api-reference/introduction.md) or the [v0 API Reference](https://docs.tightknit.ai/api-reference/introduction.md) for full endpoint details.

## Legacy API keys

Legacy API keys with the `tk-*` format are deprecated and will be removed in a future release. Please create new API keys and migrate your integrations.


## Related topics

- [Tightknit Admin API Introduction](https://docs.tightknit.ai/api-reference/introduction.md)
- [Tightknit Admin API v1 Introduction](https://docs.tightknit.ai/v1/api-reference/introduction.md)
- [Retrieve the calling API key](https://docs.tightknit.ai/v1/api-reference/api-keys/retrieve-the-calling-api-key.md)
- [Introspect current API key](https://docs.tightknit.ai/api-reference/api-keys/introspect-current-api-key.md)
- [Migrate from the Admin API v0](https://docs.tightknit.ai/v1/api-reference/migrating-from-v0.md)


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