# Assign Library License

Adds a license reference to a given library

Endpoint: POST /api/v2.0/orgs/{orgToken}/libraries/{libraryUuid}/licenses
Version: 2.0
Security: bearer-key

## Path parameters:

  - `orgToken` (string, required)
    org UUID (by running Entities - Organization > Get User Organizations) or API Key (from the Mend SCA App: Integrate tab > API Key).

  - `libraryUuid` (string, required)
    library UUID (get a project's library by running Library - Project > Get Project Libraries.

## Request fields (application/json):

  - `uuid` (string, required)
    Example: "123e4567-e89b-12d3-a456-426655440000"

  - `assignedByUser` (boolean, required)

  - `licenseReferences` (array, required)

  - `licenseReferences.liabilityReference` (string, required)
    Example: "www.somelink.com"

  - `licenseReferences.customDisclaimer` (string)

## Response 200 fields (application/json):

  - `supportToken` (string)
    Example: "1171c60d"

  - `retVal` (object)

  - `retVal.uuid` (string)
    Example: "123e4567-e89b-12d3-a456-426655440000"

  - `retVal.name` (string)
    Example: "MIT"

  - `retVal.assignedByUser` (boolean)

  - `retVal.licenseReferences` (array)

  - `retVal.licenseReferences.uuid` (string)
    Example: "123e4567-e89b-12d3-a456-426655440000"

  - `retVal.licenseReferences.type` (string)
    Example: "ARTIFACT_DESCRIPTOR"

  - `retVal.licenseReferences.liabilityReference` (string)
    Example: "https://repo.maven.apache.org/maven2/org/jruby/ext/posix/jna-posix/1.0.3/jna-posix-1.0.3.pom"

  - `retVal.licenseReferences.assignedBy` (object)

  - `retVal.licenseReferences.assignedBy.uuid` (string, required)
    Example: "123e4567-e89b-12d3-a456-426655440000"

  - `retVal.licenseReferences.assignedBy.name` (string)
    Example: "Jon Smith"

  - `retVal.licenseReferences.assignedBy.email` (string)
    Example: "jon.smith@mail.com"

  - `retVal.licenseReferences.assignedBy.userType` (string)
    Enum: "REGULAR", "SERVICE", "SCAN_SUMMARY_RECEIVER"

  - `retVal.licenseReferences.assignedBy.accountStatus` (string)
    Enum: "ACTIVE", "INACTIVE", "LOCKOUT"

  - `retVal.licenseReferences.textUrl` (string)

  - `retVal.licenseReferences.customDisclaimer` (string)

  - `retVal.licenseReferences.information` (string)
    Example: "distribution=repo&remoteUrl=https://repo.maven.apache.org/maven2/org/jruby/ext/posix/jna-posix/1.0.3/jna-posix-1.0.3.pom"

## Response 400 fields (*/*):

  - `supportToken` (string)
    Example: "1171c60d"


