> For the complete documentation index, see [llms.txt](https://docs.digitalriver.com/digital-river-api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.digitalriver.com/digital-river-api/administration/dashboard/developers/api-keys/rotating-keys.md).

# Rotating keys

You can rotate a standard or restricted API key in your [Digital River Dashboard](https://dashboard.digitalriver.com) if you think an API key is compromised. When you rotate the key, the Dashboard blocks the old key and generates a new one. When you rotate the key, you can block the old key immediately or allow it to expire after the specified expiration time. During that specified expiration time, both keys work. It gives you time to transition from the old key to the new one. In either case, you can use the new key immediately.

{% hint style="warning" %}
Rotating API keys is a widely accepted best practice recommended by security experts. It makes it easier to track usage and detect suspicious activity. **By rotating your API keys regularly**, you can ensure the security and protection of your sensitive information and resources.
{% endhint %}

To rotate a key:

1. From the **API keys** page on the [Digital River Dashboard](https://dashboard.digitalriver.com), click **More options** (vertical ellipses) associated with the key you want to rotate and click **Rotate**.

   <figure><img src="/files/60jnjzqbqVzXQ2fweClJ" alt=""><figcaption></figcaption></figure>
2. Choose the expiration time from the **Choose expiration** list.\
   \
   ![](/files/JbHzXoa2RxbxfprligNa)
3. Type your password in the field and click **Rotate API Key**. The Restricted Keys table will display the creation date for the **Newest Token** and the **Expiring Token** and the expiration date for the **Expiring Token**.

{% hint style="warning" %}
The key will not be available for immediate use. It can take up to 10 minutes for the key to fully propagate.
{% endhint %}

<figure><img src="/files/xlBCdOVoq1i7yRGjou7F" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/i8w2b7c1SFLBVLR8iTv1" alt=""><figcaption></figcaption></figure>


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.digitalriver.com/digital-river-api/administration/dashboard/developers/api-keys/rotating-keys.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
