> For the complete documentation index, see [llms.txt](https://docs.contextual.io/documentation-and-resources/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.contextual.io/documentation-and-resources/tenants/what-is-the-tenant-api/api-keys/api-key-settings.md).

# API Key Settings

Once an API Key is created, you can view and manage its settings on the Settings tab of the API Key Detail view.

1. **Access the API Key**
   * Click on the API Key in the data grid on Tenant API > API Keys to view its details.
2. **Settings Tab**
   * **General**
     * **API Key Name**: The name assigned to this API Key. You can update this name as needed.
     * **API Key Description**: The description provided for this API Key, which can also be updated.
   * **Client Details**
     * **Client ID**: Use this in your applications. Click the copy icon to copy the Client ID value to your clipboard.
     * **Client Secret**: A secure secret used alongside the Client ID. The Client Secret is hidden by default. Click the eye icon to securely retrieve this secret and reveal it in the browser. Click the copy icon to securely retrieve this secret and copy it to your clipboard.
     * Use the Client ID and Client Secret together to retrieve an access token from `https://auth.yourTenant.my.contextual.io/oauth/token`
     * The body of your POST to the token endpoint should be as follows:

       {% code title="Request" %}

       ```json
       {
           "grant_type": "client_credentials",
           "client_id": "yourClientId",
           "client_secret": "yourClientSecret",
           "audience": "https://contextual/no-api"
       }
       ```

       {% endcode %}
     * A successful exchange will return the token to use for access to the Tenant API endpoints, as follows:

       {% code title="Response" %}

       ```json
       {
           "expires_in": 86400,
           "access_token": "accessToken"
       }
       ```

       {% endcode %} \* **Status**:
     * **API Key Status**: Enable or disable the API Key without deleting it. Tenant API Key token access is cached for up to 5 minutes, so when disabled, any tokens issued for the key should no longer be functional within 5 minutes. Re-enabling the API Key will restore functionality to issued tokens immediately.
     * **Rotate Client Secret**: Rotate the Client Secret for security purposes. Be aware that once confirmed, the old Client Secret will immediately stop working. This action cannot be undone.
     * **Delete API Key**: Permanently delete the API Key. This action cannot be undone.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.contextual.io/documentation-and-resources/tenants/what-is-the-tenant-api/api-keys/api-key-settings.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
