---
title: "Create a license"
method: POST
path: "/v3/licenses"
tags: ["Licenses"]
---

# Create a license

`POST /v3/licenses`

Creates a new license.

## Request body

- LicenseRequestModel
  - `key` string, nullable — The key associated with the license. If left empty, key is auto-generated.
  - `revoked` boolean, nullable — Set true to revoke the license.
  - `suspended` boolean, nullable — Set true to suspend the license.
  - `fingerprintMatchingStrategy` 'fuzzy' | 'exact' | 'loose', nullable — Strategy for matching machine fingerprint.
  - `allowedActivations` integer, nullable — Allowed number of activations for the license. Set to 0 or -1 for unlimited activations.
  - `allowedDeactivations` integer, nullable — Allowed number of deactivations for the license. Set to -1 for unlimited deactivations. This setting is ignored for floating licenses.
  - `leaseDuration` integer, nullable — Duration of lease for floating licenses. Set to 0 or -1 for unlimited lease duration.
  - `allowClientLeaseDuration` boolean, nullable — Allow client to set the lease duration for floating licenses.
  - `allowedFloatingClients` integer, nullable — Allowed number of floating clients for the On-Premise LexFloatServer.
  - `serverSyncGracePeriod` integer, nullable — The duration for which the server sync failure due to network error is acceptable. Set to -1 for an unlimited grace period.
  - `serverSyncInterval` integer, nullable — The interval at which license data in client is synced with the server.
  - `allowedClockOffset` integer, nullable — The allowed clock offset between the network time and the local time. Set to -1 to disable clock validation checks.
  - `disableClockValidation` boolean, nullable — Disables clock validation checks on the licensed machine for perpetual licenses.
  - `cryptoBindingEnabled` boolean, nullable — Whether crypto binding is enabled for the license.
  - `expiringSoonEventOffset` integer, nullable — Specifies the offset in seconds before the license's expiration date or the license's maintenance expiration date at which the 'license.expiring-soon' or 'license.maintenance-expiring-soon' webhook event is triggered. This early warning ensures that clients are alerted in advance to take necessary actions before the license or license maintenance expires.
  - `allowVmActivation` boolean, nullable — Indicates whether activation is permitted within a virtual machine environment. Setting this to true allows the license to be activated in virtual machines, which may be necessary for certain deployment scenarios.
  - `allowContainerActivation` boolean, nullable — Indicates whether activation is permitted within a container environment. Setting this to true allows the license to be activated in containers, which is essential for modern cloud-native applications.
  - `disableGeoLocation` boolean, nullable — Whether IP address and geo-location should be stored.
  - `notes` string, nullable — Notes to store with the license.
  - `allowedIpRanges` string[], nullable — Allowed IP ranges. Leave empty to ignore.
  - `allowedCountries` string[], nullable — List of the allowed countries. Leave empty to ignore.
  - `disallowedCountries` string[], nullable — List of the disallowed countries. Leave empty to ignore.
  - `allowedIpAddresses` string[], nullable — List of the allowed ip addresses. Leave empty to ignore.
  - `disallowedIpAddresses` string[], nullable — List of the disallowed ip addresses. Leave empty to ignore.
  - `userId` string, nullable — Unique identifier for the user.
  - `resellerId` string, nullable — Unique identifier for the reseller user.
  - `organizationId` string, nullable — Unique identifier for the organization.
  - `additionalUserIds` string[], nullable — Unique identifier for the additional users.
  - `productVersionId` string, nullable — Unique identifier for the product version.
  - `entitlementSetId` string, nullable — Unique identifier for the Entitlement Set.
  - `maintenancePolicyId` string, nullable — Unique identifier for the maintenance policy.
  - `maxAllowedReleaseVersion` string, nullable — The max allowed release version. This property is ignored if maintenance policy is set for the license. Only following three formats are allowed x.x, x.x.x, x.x.x.x.
  - `tags` string[], nullable — List of tags.
  - `metadata` LicenseMetadataRequestModel[], nullable — List of metdata key/value pairs.
    - `key` string, required — Name of the key.
    - `value` string, required — Value of the key.
    - `viewPermissions` ViewPermission[], nullable — Array of view permissions associated with the metadata.
    - `visible` boolean, nullable — Set true to access the metadata on activation.
  - `meterAttributes` LicenseMeterAttributeRequestModel[], nullable — List of metered attributes.
    - `name` string, required — Name of the attribute.
    - `allowedUses` integer, required — Allowed number of uses for the attribute. Set to -1 for unlimited usage.
    - `viewPermissions` ViewPermission[], nullable — Array of view permissions associated with the meter.
    - `visible` boolean, nullable — Set true to make the meter attribute visible to the user.
    - `floating` boolean, nullable — Set true to make the meter attribute floating.
  - `validity` integer, nullable — The duration (in seconds) after which the license will expire. Set to '0' for no expiry.
  - `expirationStrategy` 'immediate' | 'delayed' | 'rolling', nullable — The strategy to determine the expiration start date.
  - `subscriptionInterval` string, nullable — The length of time which determines the subscription renewal cadence. ISO8601 durations accepted. Examples: - P1Y (1 year) - P6M (6 months) - P1M (1 month) - P1W (1 week) - P7D (7 days) - PT24H (24 hours) - PT1H (1 hour) - PT30M (30 minutes)
  - `subscriptionStartTrigger` 'creation' | 'activation'
  - `expiresAt` string, date-time, nullable — Set the EndDate of the License Subscription.
  - `leasingStrategy` 'per-machine' | 'per-instance', nullable — Leasing strategy for hosted-floating and on-premise license.
  - `userLocked` boolean, nullable — Locks the activation to the machine user.
  - `type` 'node-locked' | 'hosted-floating' | 'on-premise-floating', nullable — Type of the license.
  - `createdAt` string, date-time, nullable — This property should only be used if importing old licenses.
  - `effectiveDate` string, date-time, nullable — Specifies the date after which the license becomes valid. Defaults to the current date if not set. Use this property to post-date or pre-date a license's usage.
  - `productId` string, required — Unique identifier for the product.
  - `licenseTemplateId` string, nullable — Unique identifier for the license template. Use this to override the default license template.
  - `licensePolicyId` string, nullable — Use 'licenseTemplateId' instead.

## Response `201`

Created

- LicenseDto
  - `id` string, required
  - `createdAt` string, date-time, required
  - `updatedAt` string, date-time, required
  - `key` string, required
  - `revoked` boolean, required
  - `suspended` boolean, required
  - `perpetual` boolean, required
  - `totalActivations` integer, required
  - `totalDeactivations` integer, required
  - `validity` integer, nullable
  - `expirationStrategy` 'immediate' | 'delayed' | 'rolling', nullable
  - `subscriptionInterval` string, nullable
  - `subscriptionStartTrigger` 'creation' | 'activation'
  - `fingerprintMatchingStrategy` 'fuzzy' | 'exact' | 'loose', required
  - `allowedActivations` integer, required
  - `allowedDeactivations` integer, required
  - `type` 'node-locked' | 'hosted-floating' | 'on-premise-floating', required
  - `allowedFloatingClients` integer, required
  - `serverSyncGracePeriod` integer, required
  - `serverSyncInterval` integer, required
  - `allowedClockOffset` integer, required
  - `cryptoBindingEnabled` boolean, required
  - `disableClockValidation` boolean, required
  - `expiringSoonEventOffset` integer, required
  - `leaseDuration` integer, required
  - `leasingStrategy` 'per-machine' | 'per-instance', required
  - `effectiveDate` string, date-time, nullable
  - `expiresAt` string, date-time, nullable
  - `activatedAt` string, date-time, nullable
  - `lastUsedAt` string, date-time, nullable
  - `allowVmActivation` boolean, required
  - `allowContainerActivation` boolean, required
  - `allowClientLeaseDuration` boolean, required
  - `userLocked` boolean, required
  - `requireAuthentication` boolean, required
  - `disableGeoLocation` boolean, required
  - `notes` string, nullable
  - `productId` string, required
  - `entitlementSetId` string, nullable
  - `productVersionId` string, nullable
  - `maintenancePolicyId` string, nullable
  - `maintenanceExpiresAt` string, date-time, nullable
  - `currentReleaseVersion` string, nullable
  - `maxAllowedReleaseVersion` string, nullable
  - `organizationId` string, nullable
  - `organization` OrganizationDto
    - `id` string, required
    - `createdAt` string, date-time, required
    - `updatedAt` string, date-time, required
    - `organizationAlias` string, nullable
    - `name` string, required
    - `email` string, required
    - `description` string, required
    - `allowedUsers` integer, required
    - `address` AddressDto, required
      - `addressLine1` string, nullable
      - `addressLine2` string, nullable
      - `city` string, nullable
      - `state` string, nullable
      - `country` string, nullable
      - `postalCode` string, nullable
    - `resellerId` string, nullable
    - `reseller` ResellerDto
      - `id` string, required
      - `createdAt` string, date-time, required
      - `updatedAt` string, date-time, required
      - `name` string, required
      - `email` string, required
      - `description` string, required
      - `allowedUsers` integer, required
      - `allowedOrganizations` integer, required
  - `userId` string, nullable
  - `user` UserDto
    - `id` string, required
    - `createdAt` string, date-time, required
    - `updatedAt` string, date-time, required
    - `name` string, required
    - `firstName` string, required
    - `lastName` string, required
    - `email` string, required
    - `role` string, required
    - `twoFactorEnabled` boolean, required
    - `googleSsoEnabled` boolean, required
    - `lastLoginAt` string, date-time, nullable
    - `company` string, nullable
    - `allowCustomerPortalAccess` boolean, required
    - `roles` string[], required
    - `lastSeenAt` string, date-time, nullable
    - `organizationId` string, nullable
    - `organization` OrganizationDto
      - `id` string, required
      - `createdAt` string, date-time, required
      - `updatedAt` string, date-time, required
      - `organizationAlias` string, nullable
      - `name` string, required
      - `email` string, required
      - `description` string, required
      - `allowedUsers` integer, required
      - `address` AddressDto, required
        - `addressLine1` string, nullable
        - `addressLine2` string, nullable
        - `city` string, nullable
        - `state` string, nullable
        - `country` string, nullable
        - `postalCode` string, nullable
      - `resellerId` string, nullable
      - `reseller` ResellerDto
        - `id` string, required
        - `createdAt` string, date-time, required
        - `updatedAt` string, date-time, required
        - `name` string, required
        - `email` string, required
        - `description` string, required
        - `allowedUsers` integer, required
        - `allowedOrganizations` integer, required
    - `resellerId` string, nullable
    - `reseller` ResellerDto
      - `id` string, required
      - `createdAt` string, date-time, required
      - `updatedAt` string, date-time, required
      - `name` string, required
      - `email` string, required
      - `description` string, required
      - `allowedUsers` integer, required
      - `allowedOrganizations` integer, required
    - `metadata` AdminMetadataDto[], required
      - `id` string, required
      - `createdAt` string, date-time, required
      - `updatedAt` string, date-time, required
      - `key` string, required
      - `value` string, nullable
      - `viewPermissions` ViewPermission[], required
      - `visible` boolean, required
    - `tags` string[], required
  - `resellerId` string, nullable
  - `reseller` ResellerDto
    - `id` string, required
    - `createdAt` string, date-time, required
    - `updatedAt` string, date-time, required
    - `name` string, required
    - `email` string, required
    - `description` string, required
    - `allowedUsers` integer, required
    - `allowedOrganizations` integer, required
  - `additionalUserIds` string[], required
  - `allowedIpRange` string, nullable
  - `allowedIpRanges` string[], required
  - `allowedIpAddresses` string[], required
  - `disallowedIpAddresses` string[], required
  - `allowedCountries` string[], required
  - `disallowedCountries` string[], required
  - `metadata` AdminMetadataDto[], required
    - `id` string, required
    - `createdAt` string, date-time, required
    - `updatedAt` string, date-time, required
    - `key` string, required
    - `value` string, nullable
    - `viewPermissions` ViewPermission[], required
    - `visible` boolean, required
  - `meterAttributes` AdminLicenseMeterAttributeDto[], required
    - `id` string, required
    - `createdAt` string, date-time, required
    - `updatedAt` string, date-time, required
    - `name` string, required
    - `allowedUses` integer, required
    - `totalUses` integer, required
    - `grossUses` integer, required
    - `floating` boolean, required
    - `viewPermissions` ViewPermission[], required
    - `visible` boolean, required
  - `tags` string[], required

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `409` — Conflict
- `429` — Too Many Requests
- `500` — Server Error

---

[API](https://skmtc.net/cryptlex/apis/cryptlex-web-api.md) · [All operations](https://skmtc.net/cryptlex/apis/cryptlex-web-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cryptlex/cryptlex-web-api/revisions/ec1259c12475/schema)
