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

# Create Feature

Creates a new feature that can be used in plans and addons.

## Mutation

<CodeGroup>
  ```graphql Mutation theme={null}
  mutation CreateFeature($input: FeatureInput!) {
    createFeature(input: $input) {
      id
      refId
      displayName
      description
      featureType
      featureStatus
      featureUnits
      featureUnitsPlural
      hasMeter
      meterType
    }
  }
  ```

  ```json Variables theme={null}
  {
    "input": {
      "refId": "feature-api-calls",
      "displayName": "API Calls",
      "description": "Number of API calls per month",
      "featureType": "NUMBER",
      "featureUnits": "call",
      "featureUnitsPlural": "calls",
      "environmentId": "env-123"
    }
  }
  ```

  ```json Response theme={null}
  {
    "data": {
      "createFeature": {
        "id": "feature-uuid-123",
        "refId": "feature-api-calls",
        "displayName": "API Calls",
        "description": "Number of API calls per month",
        "featureType": "NUMBER",
        "featureStatus": "PUBLISHED",
        "featureUnits": "call",
        "featureUnitsPlural": "calls",
        "hasMeter": false,
        "meterType": null
      }
    }
  }
  ```
</CodeGroup>

## Parameters

<ParamField body="input" type="FeatureInput" required>
  Input for creating a feature

  <Expandable title="properties">
    <ParamField body="environmentId" type="UUID" required>
      Environment ID
    </ParamField>

    <ParamField body="displayName" type="String" required>
      Feature display name
    </ParamField>

    <ParamField body="featureType" type="FeatureType" required>
      BOOLEAN, NUMBER, or ENUM
    </ParamField>

    <ParamField body="refId" type="String">
      Unique feature reference ID
    </ParamField>

    <ParamField body="description" type="String">
      Feature description
    </ParamField>

    <ParamField body="featureUnits" type="String">
      Unit label (for NUMBER type)
    </ParamField>

    <ParamField body="featureUnitsPlural" type="String">
      Plural unit label
    </ParamField>

    <ParamField body="meterType" type="MeterType">
      Incremental or Fluctuating (for metered features)
    </ParamField>

    <ParamField body="enumConfiguration" type="[EnumConfigurationEntityInput]">
      Values for ENUM type features
    </ParamField>

    <ParamField body="additionalMetaData" type="JSON">
      Custom metadata
    </ParamField>
  </Expandable>
</ParamField>

## Feature Types

| Type      | Description       | Example               |
| --------- | ----------------- | --------------------- |
| `BOOLEAN` | On/off access     | SSO, Advanced Reports |
| `NUMBER`  | Quantity limits   | API calls, Storage    |
| `ENUM`    | Tier-based access | Support level         |

## Examples

### Boolean Feature

```json theme={null}
{
  "input": {
    "refId": "feature-sso",
    "displayName": "Single Sign-On",
    "featureType": "BOOLEAN",
    "environmentId": "env-123"
  }
}
```

### Numeric Feature with Meter

```json theme={null}
{
  "input": {
    "refId": "feature-storage",
    "displayName": "Storage",
    "featureType": "NUMBER",
    "featureUnits": "GB",
    "featureUnitsPlural": "GB",
    "meterType": "Fluctuating",
    "environmentId": "env-123"
  }
}
```

### Enum Feature

```json theme={null}
{
  "input": {
    "refId": "feature-support",
    "displayName": "Support Level",
    "featureType": "ENUM",
    "enumConfiguration": [
      { "value": "basic", "displayName": "Basic Support" },
      { "value": "premium", "displayName": "Premium Support" },
      { "value": "enterprise", "displayName": "Enterprise Support" }
    ],
    "environmentId": "env-123"
  }
}
```

## Related Operations

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