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

# Feature grouping

> Assign features to a group when creating or editing a feature.

Create a group with **Entity type** **Feature** first ([Creating a group](/docs/product-catalogue/groups/create)). Then assign features to that group using the steps below.

## Workflow

<Steps>
  <Step title="Assign group when creating a feature">
    * Go to **Product Catalog** → **Features** → **Create Feature**
    * In the **Group** field, search or select a group (e.g. "Usage Pricing")
    * Save; the feature is stored with that group

    <Frame>
      <img src="https://mintcdn.com/flexprice/e623HncqcXkRezhb/public/images/docs/Groups/create-feature-with-grouping.png?fit=max&auto=format&n=e623HncqcXkRezhb&q=85&s=3f613a5661905bf45cabab3e6790ccbb" alt="Create feature with group" width="3420" height="1970" data-path="public/images/docs/Groups/create-feature-with-grouping.png" />
    </Frame>
  </Step>

  <Step title="Change group on an existing feature">
    * Open the feature → **Edit**
    * In **Group**, set the desired group or **None** to ungroup
    * Save

    <Frame>
      <img src="https://mintcdn.com/flexprice/e623HncqcXkRezhb/public/images/docs/Groups/edit-feature-group.png?fit=max&auto=format&n=e623HncqcXkRezhb&q=85&s=784c12726bd4d45fc31acd8461fb0bf0" alt="Edit feature — Group" width="3420" height="1968" data-path="public/images/docs/Groups/edit-feature-group.png" />
    </Frame>
  </Step>
</Steps>

## API (features)

| Action      | Method | Endpoint              |
| ----------- | ------ | --------------------- |
| Create      | POST   | `/v1/features`        |
| Update      | PUT    | `/v1/features/:id`    |
| Get feature | GET    | `/v1/features/:id`    |
| Search      | POST   | `/v1/features/search` |

**Create:** Optional `group_id`. Group must exist and have `entity_type: "feature"`. Response includes `group_id` and `group`.

**Update:** Send `group_id: "group_..."` to assign, `group_id: ""` to ungroup. Omit to leave unchanged.

**Get:** Response includes `group_id` and `group` when the feature is in a group.

**Search:** Each item has `group_id` and `group` when set. Filter by group: `field: "group_id", operator: "eq", value: { "string": "<group_id>" }` (or `operator: "in"` with array).

### Where reflected

**Usage Breakdown** in the analytics dashboard and [Customer Portal](/docs/customers/customer-portal#usage-tab) **Usage** tab shows usage and cost by group.

<Frame>
  <img src="https://mintcdn.com/flexprice/o8li027exqawQxCQ/public/images/docs/Groups/analytics-usage-breakdown.png?fit=max&auto=format&n=o8li027exqawQxCQ&q=85&s=c6d60bb28c499ab5519d9d7ea6fa005d" alt="Usage breakdown by group" width="3420" height="1966" data-path="public/images/docs/Groups/analytics-usage-breakdown.png" />
</Frame>
