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

# API keys

> Keys for the REST API and the CLI.

An API key lets your code and the [CLI](/cli/install) use the [REST API](/api-reference/introduction). A key belongs to a workspace. It can reach only that workspace's projects.

## Create a key

1. Open your workspace → **API keys**.
2. Click **Create key** and give it a name.
3. Copy the key. hooksnode shows it only once. It stores only a SHA-256 hash of the key.

Owners and admins can manage keys. A workspace can have up to 10 keys.

## Use a key

Send it in one of these headers:

```bash theme={null}
curl https://hooksnode.com/api/v1/projects \
  -H "Authorization: Bearer $HOOKSNODE_API_KEY"

curl https://hooksnode.com/api/v1/projects \
  -H "X-API-Key: $HOOKSNODE_API_KEY"
```

## Keep keys safe

* Keep keys in a secret manager or environment variables. Do not put them in code.
* Use one key for each system, so you can revoke one without the others.
* Revoke a key at once if it leaks. Open **API keys** and click **Revoke**.

hooksnode refuses a key when its workspace is suspended, or when the email of the person who made it is not verified.
