# Set number of items available to specified user

Sets the number of items the specified user can buy within the limit applied after it was increased or decreased.

User limit API allows you to sell an item in a limited quantity. To configure the purchase limits, go to the Admin section of the desired item type module:
* Game Keys
* Virtual Items & Currency
* Bundles

Endpoint: PUT /v2/project/{project_id}/admin/user/limit/item/sku/{item_sku}
Version: 2.0.0
Security: basicAuth

## Path parameters:

  - `project_id` (integer, required)
    Project ID. You can find this parameter in your Publisher Account next to the project name and in the browser address bar when working with a project. The URL has the following format: https://publisher.xsolla.com//projects/.
    Example: 44056

  - `item_sku` (string, required)
    Item SKU.
    Example: "booster_mega_1"

## Request fields (application/json):

  - `user` (object, required)

  - `user.user_external_id` (string, required)
    User external ID.

  - `available` (integer, required)
    Remaining number of items or promotion uses available to the user within the limit applied.

## Response 200 fields (application/json):

  - `per_user` (object)

  - `per_user.total` (integer)
    The maximum number of items a user can buy.
    Example: 10

  - `per_user.available` (integer)
    The remaining number of items available for the user to purchase.
    Example: 9

## Response 401 fields (application/json):

  - `statusCode` (integer)
    Example: 401

  - `errorCode` (integer)
    Example: 1020

  - `errorMessage` (string)
    Example: "[0401-1020]: Error in Authentication method occurred"

## Response 404 fields (application/json):

  - `statusCode` (integer)

  - `errorCode` (integer)

  - `errorMessage` (string)

  - `transactionId` (string)

## Response 422 fields (application/json):

  - `statusCode` (integer)

  - `errorCode` (integer)

  - `errorMessage` (string)

  - `errorMessageExtended` (array)

  - `transactionId` (string)


