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

# Importing feature usage

<Warning>
  Importing feature usage is supported only for metered features with a Calculated Usage meter type.
</Warning>

<Warning>
  Before importing feature usage, ensure that the relevant customers have been imported to Stigg.
</Warning>

## Using the CLI

1. Create a file named `usage.json` containing the latest usage data for all features. The file **must follow this schema**:

<CodeGroup>
  ```json JSON theme={null}
  {
    "usages": [
      {
        "customerId": "lorem-ipsum",
        "resourceId": "site-1", // optional - required for multiple subscriptions product
        "featureId": "feature-seats",
        "usage": 5
      }
      // ...
    ]
  }
  ```
</CodeGroup>

2. Initiate the bulk import process:

<CodeGroup>
  ```shell shell theme={null}
  npx @stigg/bulk-import --usage-file usage.json
  ```
</CodeGroup>

<Note>
  The import function is idempotent; therefore, importing usage multiple times will produce the same result.
</Note>

## Using the API and SDKs

Use the [Report Usage Bulk](https://studio.apollographql.com/public/Stigg-API/variant/Production/schema/reference) endpoint and include the `updateBehavior: UsageUpdateBehavior.SET` property in each usage report.

<Note>
  The Report Usage Bulk endpoint supports up to **100 records per request** and has a rate limit of **600 requests per minute**. Requests are processed **synchronously**.
</Note>


## Related topics

- [Importing an existing list of features](/documentation/modeling-your-pricing-in-stigg/features/creating-features/importing-list-of-features.md)
- [Feature inspector](/documentation/rolling-out-pricing-changes-with-confidence/feature-inspector.md)
- [Viewing feature usage across plans and add-ons](/documentation/modeling-your-pricing-in-stigg/features/viewing-feature-usage.md)
- [Launch a trial for a paid plan with unlimited usage-based features](/guides/i-want-to/offer-unlimited-usage-during-trial.md)
- [Importing subscriptions](/documentation/importing-and-exporting-data/import/importing-subscriptions.md)
