> ## 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.

# Feature

Represents a feature in the Stigg system. Features are the building blocks of entitlements and define capabilities that can be granted to customers through plans and addons.

## Type Definition

```graphql theme={null}
type Feature {
  id: UUID!
  refId: String!
  displayName: String!
  description: String
  featureType: FeatureType!
  featureStatus: FeatureStatus!

  # Units (for numeric features)
  featureUnits: String
  featureUnitsPlural: String

  # Metering
  hasMeter: Boolean
  meter: Meter
  meterType: MeterType

  # Enum configuration
  enumConfiguration: [EnumConfigurationEntity!]
  usedEnumValues: [String!]

  # Unit transformation
  unitTransformation: UnitTransformation

  # Usage
  hasEntitlements: Boolean

  # Metadata
  additionalMetaData: JSON

  # Timestamps
  createdAt: DateTime
  updatedAt: DateTime!
  environmentId: UUID!
  environment: Environment
  account: Account
}
```

## Fields

### Core Fields

| Field           | Type                                                                      | Description                                           |
| --------------- | ------------------------------------------------------------------------- | ----------------------------------------------------- |
| `id`            | `UUID!`                                                                   | Unique identifier for the feature                     |
| `refId`         | `String!`                                                                 | Your application's unique identifier for this feature |
| `displayName`   | `String!`                                                                 | Display name shown in UI                              |
| `description`   | `String`                                                                  | Feature description                                   |
| `featureType`   | [`FeatureType!`](/api-and-sdks/api-reference/types/enums#featuretype)     | Type of feature (BOOLEAN, NUMBER, ENUM)               |
| `featureStatus` | [`FeatureStatus!`](/api-and-sdks/api-reference/types/enums#featurestatus) | Status of the feature                                 |

### Units (Numeric Features)

| Field                | Type     | Description                                   |
| -------------------- | -------- | --------------------------------------------- |
| `featureUnits`       | `String` | Singular unit name (e.g., "seat", "API call") |
| `featureUnitsPlural` | `String` | Plural unit name (e.g., "seats", "API calls") |

### Metering

| Field       | Type                                                             | Description                                         |
| ----------- | ---------------------------------------------------------------- | --------------------------------------------------- |
| `hasMeter`  | `Boolean`                                                        | Whether this feature has a meter for usage tracking |
| `meter`     | `Meter`                                                          | The meter configuration                             |
| `meterType` | [`MeterType`](/api-and-sdks/api-reference/types/enums#metertype) | Type of metering                                    |

### Enum Configuration

| Field               | Type                         | Description                                   |
| ------------------- | ---------------------------- | --------------------------------------------- |
| `enumConfiguration` | `[EnumConfigurationEntity!]` | Configuration for enum-type features          |
| `usedEnumValues`    | `[String!]`                  | Enum values currently used by plans or addons |

### Unit Transformation

| Field                | Type                 | Description                               |
| -------------------- | -------------------- | ----------------------------------------- |
| `unitTransformation` | `UnitTransformation` | Transformation to apply to reported usage |

## FeatureType Enum

| Value     | Description                             |
| --------- | --------------------------------------- |
| `BOOLEAN` | Feature is either enabled or disabled   |
| `NUMBER`  | Feature has a numeric limit or quantity |
| `ENUM`    | Feature has a set of possible values    |

## FeatureStatus Enum

| Value      | Description                       |
| ---------- | --------------------------------- |
| `ACTIVE`   | Feature is active and can be used |
| `INACTIVE` | Feature is not active             |

## MeterType Enum

| Value         | Description              |
| ------------- | ------------------------ |
| `FLUCTUATING` | Value can go up and down |
| `INCREMENTAL` | Value only increases     |
| `NONE`        | No metering              |

## Example Response

### Boolean Feature

```json theme={null}
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "refId": "feature-sso",
  "displayName": "Single Sign-On",
  "description": "Enable SSO authentication",
  "featureType": "BOOLEAN",
  "featureStatus": "ACTIVE",
  "hasMeter": false,
  "hasEntitlements": true,
  "createdAt": "2024-01-10T10:00:00Z",
  "updatedAt": "2024-01-15T15:30:00Z"
}
```

### Numeric Feature (Metered)

```json theme={null}
{
  "id": "550e8400-e29b-41d4-a716-446655440001",
  "refId": "feature-api-calls",
  "displayName": "API Calls",
  "description": "Number of API calls per month",
  "featureType": "NUMBER",
  "featureStatus": "ACTIVE",
  "featureUnits": "call",
  "featureUnitsPlural": "calls",
  "hasMeter": true,
  "meterType": "INCREMENTAL",
  "meter": {
    "id": "meter-123",
    "aggregation": "SUM"
  },
  "hasEntitlements": true,
  "createdAt": "2024-01-10T10:00:00Z",
  "updatedAt": "2024-01-15T15:30:00Z"
}
```

### Enum Feature

```json theme={null}
{
  "id": "550e8400-e29b-41d4-a716-446655440002",
  "refId": "feature-support-level",
  "displayName": "Support Level",
  "description": "Level of customer support",
  "featureType": "ENUM",
  "featureStatus": "ACTIVE",
  "enumConfiguration": [
    { "value": "basic", "displayName": "Basic Support" },
    { "value": "priority", "displayName": "Priority Support" },
    { "value": "dedicated", "displayName": "Dedicated Support" }
  ],
  "usedEnumValues": ["basic", "priority"],
  "hasEntitlements": true,
  "createdAt": "2024-01-10T10:00:00Z",
  "updatedAt": "2024-01-15T15:30:00Z"
}
```

## Related Types

* [Entitlement](/api-and-sdks/api-reference/types/entitlement) - Entitlement type
* [Plan](/api-and-sdks/api-reference/types/plan) - Plan type
* [Addon](/api-and-sdks/api-reference/types/addon) - Addon type

## Related Operations

* [List Features](/api-and-sdks/api-reference/queries/list-features) - Query features
* [Create Feature](/api-and-sdks/api-reference/mutations/create-feature) - Create new feature
* [Update Feature](/api-and-sdks/api-reference/mutations/update-feature) - Update feature
* [Archive Feature](/api-and-sdks/api-reference/mutations/archive-feature) - Archive feature
