> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cybedefend.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Assign License to Package

> Manually assign an SPDX license ID to a specific SCA package

## Path Parameters

<ParamField path="projectId" type="string" required>
  The UUID of the project
</ParamField>

<ParamField path="packageId" type="string" required>
  The UUID of the SCA package
</ParamField>

## Authorization

Requires `change_vulnerability_state` permission on the project.

## Request Body

<ParamField body="spdxId" type="string" required>
  The SPDX license identifier to assign (e.g., `MIT`, `Apache-2.0`, `GPL-3.0-only`)
</ParamField>

<RequestExample>
  ```json theme={null}
  {
    "spdxId": "MIT"
  }
  ```
</RequestExample>

## Response

<ResponseField name="success" type="boolean">
  Whether the request succeeded
</ResponseField>

<ResponseField name="message" type="string">
  Confirmation message
</ResponseField>

<ResponseExample>
  ```json theme={null}
  {
    "success": true,
    "message": "License assigned successfully"
  }
  ```
</ResponseExample>

<Note>
  Assigning a license to a package that was previously categorized as **Unknown** will remove the Unknown placeholder and update the package's license list. This is particularly useful for internal packages or packages whose license metadata is missing from the registry.
</Note>
