# Installed Add-ons Usage Subresource

> \[!WARNING]
>
> The Preview API for this resource is deprecated. To migrate from Preview to V1, refer to the Marketplace API migration guide for [users](/docs/marketplace/listings/api-migration-users) or [publishers](/docs/marketplace/publishers/api-migration-publishers).

The Installed Add-ons Usage subresource allows Twilio Marketplace Partners to manually report customer usage on Add-ons that they own.

> \[!NOTE]
>
> If you already have a published Add-on and would like access to this API resource, reach out to Twilio.

## Prerequisite

The Installed Add-ons Usage subresource requires Twilio to turn on manual usage reporting for an Add-on that you own. To verify that manual usage reporting is turned on, go to **Marketplace > Catalog > Add-on** (select your add-on) in the Twilio Console. Check that "Manual Usage Reporting" is included as a category.

## Properties

| **Parameter** | **Description**                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Quantity      | Required. A number greater than or less than zero that represents usage of a specific add-on installation. When set to a value greater than zero, the update is reported as usage on the customer account, and the customer will be charged. See Charging a customer for Add-on Usage as an example. When set to a value less than zero, the update is reported as a credit on the customer account. Credits should only be used to correct a reporting error with a previous API call. |

## Example requests

### Charge a customer for add-on usage

```bash
curl -X POST "https://preview.twilio.com/marketplace/InstalledAddOns/XExxxxxxxxxxxxxxxxxxxxxxx/Usage" \
--data-urlencode "Quantity=10" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

**Response**

```json
202 Accepted
```

### Credit a customer for add-on usage previously posted

```bash
curl -X POST "https://preview.twilio.com/marketplace/InstalledAddOns/XExxxxxxxxxxxxxxxxxxxxxxx/Usage" \
--data-urlencode "Quantity=-10" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

**Response**

```json
202 Accepted
```
