> For the complete documentation index, see [llms.txt](https://docs.gitloom.cloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.gitloom.cloud/api-reference/licences.md). Agents can also search and read this documentation through its [MCP server](https://docs.gitloom.cloud/~gitbook/mcp).

# Licences

Licences for CLIs before 0.4.0. The CLI is free now and needs none.

{% hint style="info" %}
**The CLI no longer needs a licence.** Since 0.4.0 it is free and runs without an account, a key or a licence. These routes remain so CLIs before 0.4.0 keep working; running the installer again is simpler:

```bash
curl -fsSL https://gitloom.cloud/install.sh | sh
```

{% endhint %}

A licence is separate from an API key — it authorizes running an older [CLI](https://docs.gitloom.cloud/documentation/content/cli) locally, not calling the hosted API. Any plan can mint one.

#### POST /v1/licenses

**Dashboard sessions only.** The secret is shown once.

```bash
curl -s -X POST "$GITLOOM_API/v1/licenses" -H "Authorization: Bearer $ID_TOKEN" \
  -H "content-type: application/json" -d '{"name":"laptop"}'
```

```json
{"id": "a1b2c3d4", "key": "gll_a1b2c3d4_...", "name": "laptop", "plan": "free"}
```

`plan` is the account's plan when the key was minted.

#### GET /v1/licenses

```json
{"licenses":[{"id":"a1b2c3d4","name":"laptop","revoked":false,"created_at":"2026-08-01T10:00:00Z"}]}
```

#### DELETE /v1/licenses/{id}

```json
{"id": "a1b2c3d4", "revoked": true}
```

#### POST /v1/license

Exchanges a licence key for a short-lived signed token, verified **offline** by a CLI before 0.4.0 — what its `gitloom license activate` calls under the hood. Authenticated by the key **in the body**, not a bearer credential — a licence key is not an API key and must never reach a route that touches tenant memory, so this route is public and verifies the key itself.

```bash
curl -s -X POST "$GITLOOM_API/v1/license" -H "content-type: application/json" \
  -d '{"key":"gll_a1b2c3d4_..."}'
```

```json
{"token": "eyJ...", "account": "acme", "plan": "free", "expires_at": "2026-09-05T10:00:00Z"}
```

Token life is 30 days; the CLI renews at two-thirds of that, so a machine that connects even monthly never notices. `401 invalid_key` for an unknown or wrong key (deliberately indistinguishable), `403 revoked`, `403 suspended`.


---

# 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.gitloom.cloud/api-reference/licences.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.
