- [HTTP request](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/billingAccounts.billingAccountLicenseConfigs/distributeLicenseConfig#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/billingAccounts.billingAccountLicenseConfigs/distributeLicenseConfig#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/billingAccounts.billingAccountLicenseConfigs/distributeLicenseConfig#body.request_body)
  - [JSON representation](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/billingAccounts.billingAccountLicenseConfigs/distributeLicenseConfig#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/billingAccounts.billingAccountLicenseConfigs/distributeLicenseConfig#body.response_body)
  - [JSON representation](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/billingAccounts.billingAccountLicenseConfigs/distributeLicenseConfig#body.DistributeLicenseConfigResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/billingAccounts.billingAccountLicenseConfigs/distributeLicenseConfig#body.aspect)
- [IAM Permissions](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/billingAccounts.billingAccountLicenseConfigs/distributeLicenseConfig#body.aspect_1)

Distributes a `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.licenseConfigs#LicenseConfig` from billing account level to project level.

### HTTP request

Choose an endpoint:
global us   
`POST https://discoveryengine.googleapis.com/v1alpha/{billingAccountLicenseConfig=billingAccounts/*/billingAccountLicenseConfigs/*}:distributeLicenseConfig`

<br />

The URLs use [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `billingAccountLicenseConfig` | `string` Required. Full resource name of `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/billingAccounts.billingAccountLicenseConfigs#BillingAccountLicenseConfig`. Format: `billingAccounts/{billingAccount}/billingAccountLicenseConfigs/{billingAccountLicenseConfigId}`. |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "projectNumber": string, "location": string, "licenseCount": string, "licenseConfigId": string } ``` |

| Fields ||
|---|---|
| `projectNumber` | `string (https://developers.google.com/discovery/v1/type-format format)` Required. The target GCP project number to distribute the license config to. |
| `location` | `string` Required. The target GCP project region to distribute the license config to. |
| `licenseCount` | `string (https://developers.google.com/discovery/v1/type-format format)` Required. The number of licenses to distribute. |
| `licenseConfigId` | `string` Optional. Distribute seats to this license config instead of creating a new one. If not specified, a new license config will be created from the billing account license config. |

### Response body

Response message for `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/billingAccounts.billingAccountLicenseConfigs/distributeLicenseConfig#google.cloud.discoveryengine.v1alpha.LicenseConfigService.DistributeLicenseConfig` method.

If successful, the response body contains data with the following structure:

| JSON representation |
|---|
| ``` { "licenseConfig": { object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.licenseConfigs#LicenseConfig`) } } ``` |

| Fields ||
|---|---|
| `licenseConfig` | ``object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.licenseConfigs#LicenseConfig`)`` The updated or created LicenseConfig. |

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/cloud-platform`
- `https://www.googleapis.com/auth/discoveryengine.readwrite`
- `https://www.googleapis.com/auth/discoveryengine.serving.readwrite`

For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp).

### IAM Permissions

Requires the following [IAM](https://cloud.google.com/iam/docs) permission on the `billingAccountLicenseConfig` resource:

- `discoveryengine.billingAccountLicenseConfigs.distribute`

For more information, see the [IAM documentation](https://cloud.google.com/iam/docs).