# License

To run Lenses you need to have a valid license key. The license is a JSON file that you provide to the Lenses at the startup. When valid, you are good to go. You can update the license key at the runtime.

## Expiration <a href="#expiration" id="expiration"></a>

30 days before the expiration of your license key, an amber notification will appear in Lenses.

After expiration, you have a 5-day graceful period to run Lenses.

## Update a license

You can update the license from the UI. Navigate to **Admin** and **License** and paste the content of the license file:

## Update via the CLI / API

License management is also supported by the CLI to enable automation scenarios.

### View license info <a href="#view-license-info" id="view-license-info"></a>

```bash
lenses-cli license get
```

### Update the license of a Lenses instance at runtime <a href="#update-the-license-of-a-lenses-instance-at-runtime" id="update-the-license-of-a-lenses-instance-at-runtime"></a>

```bash
lenses-cli license update --file <license.json>
```

{% openapi src="/files/XIikUxHshFxdZH8KmuEj" path="/api/v1/license" method="get" %}
[openapi-spec.yaml](https://1626952789-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3kFlA2f2XiIvqAjyLMgf%2Fuploads%2Fgit-blob-1ed54673014f44b241c7c8bbf2aa054d91f6840b%2Fopenapi-spec.yaml?alt=media)
{% endopenapi %}

{% openapi src="/files/XIikUxHshFxdZH8KmuEj" path="/api/v1/license" method="put" %}
[openapi-spec.yaml](https://1626952789-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3kFlA2f2XiIvqAjyLMgf%2Fuploads%2Fgit-blob-1ed54673014f44b241c7c8bbf2aa054d91f6840b%2Fopenapi-spec.yaml?alt=media)
{% endopenapi %}

## **Where do I get my license key?**

If you are a customer, your license key is available in the customer portal. Contact your account representative for the details.


---

# Agent Instructions: 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:

```
GET https://docs.lenses.io/latest/devx/5.5/user-guide/licenses.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
