---
title: "Create or Update a Software License"
method: POST
path: "/v2/software-license/upsert"
tags: ["Software Licenses"]
---

# Create or Update a Software License

`POST /v2/software-license/upsert`

Create or Update a Software License in a simple way

## Request body

- object
  - `name` string, required — Indicates the name of the software license
  - `description` string, nullable — Indicates a description for the software license
  - `type` 'PER_DEVICE' | 'PER_USER' | 'CUSTOM', required — Indicates the type of the software license
  - `date` integer, nullable — Indicates the purchase date of the software license in unix epoch milliseconds
  - `publisherName` string, required — Name of the publisher
  - `vendorName` string, required — Name of the vendor
  - `scope` object, required — Indicates the scope of the software license
    - `global` boolean — Indicates if the scope is global
    - `organizationNames` string[] — Indicates the organization names for the scope
    - `locationNames` string[] — Indicates the location names for the scope
  - `quantity` integer, required — Indicates the quantity of the software license
  - `currentUsage` integer, nullable — Indicates the current usage of the software license
  - `currentLicensees` string[] — Indicates the names of assigned licensees and removes those not specified
  - `licenseesToAssign` string[] — Indicates the names of the licensees on which the license will be assigned
  - `licenseesToRemove` string[] — Indicates the names of the licensees on which the license will be remowed
  - `note` string, nullable — Indicates a note about the software license
  - `costMode` 'TOTAL' | 'PER_LICENSE', nullable — Indicates the cost mode of the software license
  - `cost` number, nullable — Indicates the cost of the software license
  - `usageMonitoring` object, nullable — Indicates the binary usage monitoring configuration for the software license
    - `binaries` object[] — List of OS-specific binary configurations for usage monitoring
      - `osType` 'WINDOWS' | 'LINUX' | 'MAC' — Operating system type
      - `binaryNames` string[] — List of binary/process names to monitor
      - `nonMatches` boolean — Flag indicating whether configured binaries don't match detected binaries

## Response `200`

The Software License that was created/updated

- object
  - `id` integer
  - `name` string
  - `description` string
  - `type` 'PER_DEVICE' | 'PER_USER' | 'CUSTOM'
  - `automated` boolean
  - `purchaseDate` integer
  - `publisherId` integer
  - `vendorId` integer
  - `publisher` object
    - `id` integer
    - `name` string
    - `description` string
  - `vendor` object
    - `id` integer
    - `name` string
    - `description` string
  - `scope` object
    - `global` boolean
    - `organizations` object[]
      - `id` integer
      - `name` string
    - `locations` object[]
      - `id` integer
      - `name` string
      - `organizationId` integer
  - `quantity` integer
  - `term` object
    - `renewalUnit` 'MONTH' | 'YEAR'
    - `value` integer
    - `expirationDate` integer
    - `autoRenewal` boolean
    - `generateActivityAlert` boolean
    - `daysBeforeExpiration` integer
    - `hasNotifiedExpirationDate` boolean
    - `hasNotifiedUpToRenewal` boolean
  - `notificationChannelInfo` object
    - `email` string
    - `sms` string
    - `pushNotification` string
  - `assigmentAutomationSettings` object
    - `assignmentType` 'NORMALIZED_SOFTWARE' | 'SOFTWARE_INVENTORY' | 'DEVICE_SEARCH_GROUPS' | 'USER_CONTACT'
    - `type` string, required
  - `licenseAssignmentList` object[]
    - `licenseeId` integer
    - `licenseeName` string
    - `licenseeType` 'NODE' | 'APP_USER' | 'CONTACT'
    - `licenseeUserType` 'TECHNICIAN' | 'END_USER' | 'CONTACT'
    - `licenseeOrganizationName` string
    - `licenseeOrganizationId` integer
    - `licenseeEmail` string
    - `firstFoundAt` integer
    - `lastUsedAt` integer
    - `hasViewAccess` boolean
  - `currentUsage` integer
  - `expired` boolean
  - `daysToExpire` integer
  - `note` string
  - `perLicenseCost` number
  - `totalCost` number
  - `costMode` 'TOTAL' | 'PER_LICENSE'
  - `usageMonitoring` object[]
    - `osType` 'WINDOWS' | 'LINUX' | 'MAC'
    - `binaryNames` string[]
    - `nonMatches` boolean
  - `firstFoundAt` integer
  - `lastUsageAt` integer

---

[API](https://skmtc.net/ninjarmm/apis/ninjaone-public-api-2-0.md) · [All operations](https://skmtc.net/ninjarmm/apis/ninjaone-public-api-2-0/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ninjarmm/ninjaone-public-api-2-0/revisions/753f26d46650/schema)
