# How to Generate an API Key From the Console?

The first step in interacting with our API is to generate an API key. To do this, click Create Key button.

You can copy the Enterprise ID, necessary for API calls, by clicking on the copy icon next to Enterprise ID on the top right of this section.

Create key button

Enter a unique API name and description (optional) and click Create Key.

Add key name

Click Generate Token. This will generate a unique OAuth-based API key.

Generate button

You can then copy (or renew if needed) your API key. API keys need to be renewed every 3 months.

renew key button

You will need your API key and Enterprise ID to access our CLI platform (opens new window) as well as to use the SDK/API in your development and management systems. Please visit Esper documentation Esper docs (opens new window) for more information.

An API key is tied to the user account used to create the key. If you delete a user via User management, then any API keys associated with that user will also be deleted. The API key will be rendered invalid for API, SDK, and CLI use. To avoid such unintended deletion of API key, a best practice is to create a specific user account just for API key management.

The Enterprise ID is specific to your endpoint and does not change.