---
title: "Set a new Unleash license."
method: POST
path: "/api/admin/license"
tags: ["Instance Admin"]
---

# Set a new Unleash license.

`POST /api/admin/license`

**Enterprise feature**

Set a new Unleash license. Only available for self-hosted Enterprise customers.

## Request body

- LicenseUpdateSchema — A model representing a set license token.
  - `token` string, required — The actual license token.

## Response `201`

The resource was successfully created.

- LicenseReadSchema — A model representing a license response.
  - `token` string — The actual license token.
  - `isValid` boolean, required — Whether the license is valid or not.
  - `customer` string — Name of the customer that owns the license. This is the name of the company that purchased the license.
  - `type` string — Type of license.
  - `instanceName` string — Name of the Unleash instance where this license is valid.
  - `instanceId` string — Identifier of the Unleash instance where this license is valid.
  - `plan` string — Name of plan that the license is for.
  - `resources` object — The resources available in the license.
    - `seats` number — Number of seats in the license.
    - `releaseTemplates` number — Number of release templates in the license.
    - `edgeInstances` number — Number of Edge instances in the license.
    - `readOnlyUsers` number — Number of read-only users in the license.
  - `expireAt` string, date-time — Date when the license expires.
  - `issuedAt` string, date-time — Date when the license was issued.

## Other responses

- `400` — The request data does not match what we expect.
- `401` — Authorization information is missing or invalid. Provide a valid API token as the `authorization` header, e.g. `authorization:*.*.my-admin-token`.
- `403` — The provided user credentials are valid, but the user does not have the necessary permissions to perform this operation
- `415` — The operation does not support request payloads of the provided type. Please ensure that you're using one of the listed payload types and that you have specified the right content type in the "content-type" header.

---

[API](https://skmtc.net/unleash/apis/unleash-api-3.md) · [All operations](https://skmtc.net/unleash/apis/unleash-api-3/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/unleash/unleash-api-3/versions/b2c3116e633e/schema)
