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

# API Keys

> Create, list, and revoke programmatic API keys.

API keys are the primary authentication mechanism for backend integrations and the Anthropic Messages API path. See [Authentication → For developers](https://docs.attention.com/mcp/authentication.md#for-developers-api-keys-and-anthropic-messages-api) for the connection-side details.

These tools let you manage keys directly from an MCP session. The full token of a newly created key is shown **only once** — store it immediately.

## Tools

### list\_api\_keys

> [!NOTE]
>
> Scope: `mcp:read`. No parameters.

List API keys in your organization. Tokens themselves are not returned — only metadata (name, ID, scope, last-seen timestamp).

**Returns:** Markdown list of API keys with name, ID, scope (`org-level` / `user-level`), and last used date.

***

### create\_api\_key

> [!WARNING]
>
> Scope: `mcp:write`. Requires admin role. The full token is returned only once — save it now.

Create a new API key. Org-level keys have full org access; user-level keys are scoped to the authenticated user.

**name** `string` *required*

Display name for the API key (e.g. `CRM Integration`, `CI/CD Pipeline`).

**org\_level** `boolean`

If `true` (default), creates an org-level key with full org access. If `false`, creates a user-level key scoped to the authenticated user.

**expiry\_hours** `integer`

Number of hours until the key expires. Omit for a non-expiring key.

**Returns:** A confirmation containing the new key's ID, name, and **the full token** — shown only once. The result text includes a warning to save the token immediately.

***

### delete\_api\_key

> [!WARNING]
>
> Scope: `mcp:write`. Requires admin role. Destructive — any integrations using this key will stop working immediately.

Revoke an API key permanently. Use `list_api_keys` to find key IDs.

**api\_key\_id** `string` *required*

The UUID of the API key to revoke.


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