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

# API Key Scopes

> Use scoped API keys and collection restrictions to keep integrations narrow and safe.

Bulkgrid supports scoped API keys instead of one unrestricted key model.

## What API keys can control

Keys can be limited by:

* scopes
* collection scope
* selected collection IDs

## Collection scope

The current API key model supports:

* `all`
* `selected`

If `selected` is used, at least one collection must be attached to the key.

## Operational capabilities

The product supports:

* create
* list
* rotate
* update scopes
* revoke
* delete after retention rules for revoked keys

Only workspace owners and admins can manage API keys from the current Next.js implementation.

API key listing is paginated with `page` and `limit`, and responses include attached collection IDs for each key.

## Recommended usage

* use separate keys per environment or service
* prefer narrow scopes
* prefer selected collections when the integration should only access part of the corpus
* rotate keys when access boundaries change
