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

# Manage API keys

> Learn how to create, manage, and delete API keys.

This guide shows you how to create and manage API keys for the Writer API. After you create a key in [Control Center](https://app.writer.com/controlcenter), you can authenticate requests to Writer API endpoints.

> [!WARNING]
>
> **Deprecation notice**: Legacy API keys (keys created under the previous API agent model) will stop working on **December 1, 2026**.
>
> **Migration path**: Create a new API key, update your applications to use the new key, then revoke the legacy key.

## About API keys

The Writer API uses token authentication for API requests. Pass your API key in the `Authorization` header:

```
Authorization: Bearer <api-key>
```

Each key is a standalone credential with its own name, owner or organization access, expiration, and permissions. Permissions control which API capabilities the key can call. Expiration defines how long the key remains valid.

## Create an API key

Create a key from the API keys page in Control Center. Use an account with admin access to create and manage organization API keys.

1. From the [Control Center home page](https://app.writer.com/controlcenter), open **Security & compliance** in the navigation menu, then select **API Keys**.
2. Select **New** to open the **Generate an API Key** page.
3. Under **About**, configure the key:
   * **Key name**: a descriptive name that helps you identify the key.
   * **Short description** (optional): notes about how you plan to use the key.
   * Under **Who can use this key?**, choose **All teams** or **Specific user**:
     * For **All teams**, the key is an organization key. The creator is the key owner.
     * For **Specific user**, choose the user who owns the key. That user must be an active member of your organization.
4. Under **Limits**, set **Expiration**:
   * Choose **No expiration**, a preset duration (30, 60, or 90 days, or 1 year), or a custom date.
5. Under **Permissions**, turn on the capabilities this key needs. Each category is either all access or no access:
   * **Playbooks**: run and read playbook content (available when your organization has access to the Playbooks API).
   * **Knowledge graphs and files**: view and create knowledge graphs and files.
   * **Models**: send requests to models enabled for your organization.
6. Select **Generate**.
7. When the key appears, copy it and store it securely. Acknowledge that you have copied the key before you leave the page. You can't view the full key again after that.

> [!NOTE]
>
> Store the API key in a secure location, such as a `.env` file (for example, `WRITER_API_KEY=<API_KEY>`). If you lose a key, delete it and generate a new one—you can't recover the original secret.

## View and manage API keys

The API keys page lists every key as its own row. Use this list to find keys, open details, and edit or delete keys you created on this page.

1. From the [Control Center home page](https://app.writer.com/controlcenter), open **Security & compliance** → **API Keys**.
2. Search or filter the list by access, permissions, owner, or expiration as needed.
3. Select a key name to open its detail page. The detail page shows the masked key ID, access summary, expiration, and history.
4. To change a key, open the row **Actions** menu and select **Edit**, or open the key and edit from there. Save your changes when you finish.

> [!NOTE]
>
> You can't view or reveal the full API key after it's created. Copy it the first time it's shown and store it securely. To replace a lost key, generate a new key.

## Configure key permissions

Permissions are set per key and determine which API endpoints that key can call. Turn each category on for all access or leave it off for no access.

1. From the [Control Center home page](https://app.writer.com/controlcenter), open **Security & compliance** → **API Keys**.
2. Create a new key or open an existing key and select **Edit**.
3. Under **Permissions**, toggle **Playbooks**, **Knowledge graphs and files**, and **Models** as needed.
4. Save your changes (or select **Generate** for a new key).

> [!NOTE]
>
> Capabilities map to Writer API endpoints. Turn on only the permissions your integration needs.

## Understand legacy API keys

Keys created under the previous API agent model appear in the new API keys list as legacy keys. You can view them, but you can't edit, delete, or rotate them on the new page.

Manage those keys on the legacy API keys page until they stop working on **December 1, 2026**. Before that date, create a replacement key on the new page, update your applications, then revoke the legacy key.

## Delete an API key

Delete a key when you no longer need it or when you need to replace a compromised credential. Deletion is permanent.

1. From the [Control Center home page](https://app.writer.com/controlcenter), open **Security & compliance** → **API Keys**.
2. On the row for the key you want to remove, open the **Actions** menu, then select **Delete**.
3. Confirm by selecting **Yes, delete key**.

Legacy keys can't be deleted from the new API keys page. Open the legacy API keys page from the key's detail menu to manage them there until retirement.

## Next steps

* [Make your first API call](https://dev.writer.com/home/quickstart.md) using your API key
* Read the [chat completion endpoint reference](https://dev.writer.com/api-reference/completion-api/chat-completion.md)
* Review [API error codes](https://dev.writer.com/api-reference/error-codes.md) if requests fail authentication
