---
title: "License Management API"
order: 9
---

The Licenses Management API offer a simple mechanism for querying, creating, and updating [licenses](/docs/proget/sca/licenses), and related data:

* [Create License](/docs/proget/reference-api/proget-api-licenses/proget-api-licenses-create) - creates a specified license
* [Get License](/docs/proget/reference-api/proget-api-licenses/proget-api-licenses-get) - describes an specified license
* [List Licenses](/docs/proget/reference-api/proget-api-licenses/proget-api-licenses-list) - describes all licenses, filtered as specified
* [Update License](/docs/proget/reference-api/proget-api-licenses/proget-api-licenses-update) - updates a specified license
* [Delete License](/docs/proget/reference-api/proget-api-licenses/proget-api-licenses-delete) - deletes a specified license

## Authenticating to Licenses Management API { #authentication }

The following is a summary of access types and their corresponding requirements for various API keys types and endpoints within this API.

| Access Type | Requirements |
| --- | --- |
| System API Keys | `Use/Manage Feeds`  
| Feed API Keys | `View/Download` is required for all endpoints<br/>`Add/Repackage` is required for [Create License](/docs/proget/reference-api/proget-api-licenses/proget-api-licenses-create)<br/>`Overwrite/Delete` is required for [Delete License](/docs/proget/reference-api/proget-api-licenses/proget-api-licenses-delete)
| Personal API Key | `Feeds_ViewFeed` is required for all endpoints<br/>`Feeds_AddPackage` is required for [Create License](/docs/proget/reference-api/proget-api-licenses/proget-api-licenses-create)<br/>`Feeds_DeletePackage` is required for [Delete License](/docs/proget/reference-api/proget-api-licenses/proget-api-licenses-delete)
| No API Key | anonymous or authenticated user must have at least `Feeds_ViewFeed`

To specify an API Key, use the request header (`X-ApiKey`), querystring (`key`), or `api:«api-key»` as the username. See [API Key Usage](/docs/proget/reference-api/proget-apikeys#using-api-keys) to learn more.

:::(Info) (🚀 Quick Example: Authenticating with curl)
For example, to authenticate with the API key `abc12345` to **List Licenses**, you could specify the API key as follows:
````
curl -X GET --header "X-ApiKey: abc12345" "https://proget.corp.local/api/licenses/list"
````
:::

## Data Specifications { #data-specifications }

### LicenseInfo Object Attributes { #license-object }

`LicenseInfo` is a JSON object (see [LicenseInfo.cs](https://github.com/Inedo/pgutil/blob/thousand/Inedo.ProGet/LicenseInfo.cs)) that corresponds to the fields on a license. It's used as input for [Create License](/docs/proget/reference-api/proget-api-licenses/proget-api-licenses-create), and output for [Get License](/docs/proget/reference-api/proget-api-licenses/proget-api-licenses-get) and [List Licenses](/docs/proget/reference-api/proget-api-licenses/proget-api-licenses-list).

`code` and `title` properties are required for [Create License](/docs/proget/reference-api/proget-api-licenses/proget-api-licenses-create). Unless otherwise indicated, omitting a property or supplying `null` as the value will keep the current setting.

#### Example JSON Object
```
{
  "code": "MIT",
  "title": "MIT License",
  "urls": [
    "https://spdx.org/licenses/MIT.html"
  ],
  "spdx": ["MIT"]
}
```
