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

# Creating Features

> Learn how to create boolean and limit features.

You can create two types of features in PriceOS:

* [Boolean features](#boolean-features)
* [Limit features](#limit-features)

<Note>
  You can create features on the features page, product details page, or with
  the [create feature API](/api-reference/endpoint/features-create).
</Note>

***

## Boolean features

Boolean features are on/off access to a feature (e.g. Priority support, Advanced analytics, API access, etc)

To create one:

1. Go to [Features](https://app.priceos.com/features)
2. Click the <b>New Feature</b> button
3. Add a feature name and key
4. Select <b>Boolean</b> as the feature type
5. Click the <b>Create Feature</b> button

***

## Limit features

Limit features are a numeric cap (e.g. Credits, Team Seats, API requests, etc.).

You can optionally use PriceOS to track usage for your limit features.

To create one:

<Tabs>
  <Tab title="No usage tracking">
    1. Go to [Features](https://app.priceos.com/features)
    2. Click the <b>New Feature</b> button
    3. Add a feature name and key
    4. Select <b>Limit</b> as the feature type
    5. Click the <b>Create Feature</b> button
  </Tab>

  <Tab title="With usage tracking">
    Unlike boolean features, you can track usage for your limit feature to keep track of when customers hit limits.

    1. Go to [Features](https://app.priceos.com/features)

    2. Click the <b>New Feature</b> button

    3. Add a feature name and key

    4. Select <b>Limit</b> as the feature type

    5. Click the <b>Track usage with PriceOS</b> switch

    6. Select a <b>reset interval</b>
       * <b>Never</b> - Usage will never reset
       * <b>Monthly</b> - Usage will reset monthly for customers based on
         <b>resets when</b>
             <Note>
               You can choose daily, weekly, and yearly reset intervals by clicking the{" "}
               <b>More ...</b> button
             </Note>

    7. Select a <b>resets when</b>

       * <b>Billing period start</b> - Usage will reset based on their Stripe subscription date OR their [`usageStartedAt`](/api-reference/endpoint/create#body-usage-started-at) date if not a Stripe customer.
       * <b>Start of month</b> - Usage will reset at the start of the month for all customers regardless of when they signed up

           <Note>
             Billing-period resets apply to Stripe-linked customers. For non-Stripe
             customers, define usage start using
             [`usageStartedAt`](/api-reference/endpoint/create#body-usage-started-at)
             (defaults to the date the customer was created if not provided).
           </Note>

    8. Click the <b>Create Feature</b> button

    <Tip>See [Tracking Usage](/tracking-usage) to learn more.</Tip>
  </Tab>
</Tabs>

***

## Create features with the API

Use the API when you want to create features from your own provisioning flow or internal tools.

```ts theme={null}
import { PriceOS } from "priceos";

const priceos = new PriceOS(process.env.PRICEOS_API_KEY!);

await priceos.features.create({
  name: "API Calls",
  featureKey: "api_calls",
  type: "limit",
  tracksUsage: true,
  usageResetInterval: "month",
  usageResetAnchor: "calendar",
});
```

You can also [update](/api-reference/endpoint/features-update), [archive](/api-reference/endpoint/features-archive), or [delete](/api-reference/endpoint/features-delete) features by feature key.
