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

# API Keys

> Create and manage API keys for programmatic access to the Blink API.

API keys provide programmatic access to the Blink API. Use them to integrate Blink with your CI/CD pipelines, scripts, or other automation tools.

## Creating API Keys

Create API keys through the Blink web UI:

1. Navigate to your \**User settings* (top right corner)
2. Go to **Settings** → **API Keys**
3. Click **Create API Key**
4. Optionally provide a name for the key
5. Copy and save the key immediately

<Warning>
  The full API key is shown only once during creation. Store it securely as you cannot retrieve it later.
</Warning>

## API Key Format

API keys follow this format:

```
bk_<lookup>_<secret>
```

* `bk` - Fixed prefix identifying Blink API keys
* `lookup` - 12-character identifier
* `secret` - 32-character secret

## Using API Keys

Include the API key in the `Authorization` header:

```bash theme={null}
curl -H "Authorization: Bearer bk_xxxxxxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
  https://blink.example.com/api/users/me
```

## Key Properties

Each API key has:

| Property        | Description                                        |
| --------------- | -------------------------------------------------- |
| **Name**        | Optional friendly name for identification          |
| **Permissions** | Access level (currently all keys have full access) |
| **Created**     | When the key was created                           |
| **Last Used**   | When the key was last used for authentication      |
| **Expires**     | Expiration date (default: 1 year from creation)    |

## Revoking API Keys

Revoke API keys that are no longer needed or may have been compromised:

1. Navigate to **Settings** → **API Keys**
2. Find the key you want to revoke
3. Click the **Revoke** button

Revoked keys are immediately invalidated and cannot be restored.
