# API Key Expiration

Setting an expiration for your API keys helps increase the security of your application. By regularly rotating keys, you reduce the chance of them leaking or being misused. Expiration can be set either when creating an API key, or for an already-created API key, following this guide. 

Setting API key expiration

First, click the Projects section (1.). 

Now select the project whose API key you want to set the expiration for. 

In the project detail, click Settings (1.). Then click the API keys section (2.). Here, hover over the ... in the top-right corner of your API key and click the Edit option (3.). 

In the API key detail, click the Expiration field. 

Select the API key's expiration date. 

Click the Save button. 

The set expiration date will be shown in the bottom-left part of your API key. 

API key security

Why set a time-based expiration? API key expiration increases its security. It minimizes the risk of misuse in the event of a potential key leak, and shortens the period during which your integration or application would be vulnerable. 

IP restriction ensures that the API key will only allow access from predetermined servers or devices, which eliminates the possibility of unauthorized access, for example when used in internal systems and servers. 

API key encryption

To prevent misuse and the possibility of the API key being intercepted on the frontend, the API key you generate can only be copied during its creation. 

We therefore recommend saving the key, for example, in an external password manager. If you need to copy the API key from the application again later, you will have to create a new one.
