Skip to main content
Creates a new feature that can be used in plans and addons.

Mutation

mutation CreateFeature($input: FeatureInput!) {
  createFeature(input: $input) {
    id
    refId
    displayName
    description
    featureType
    featureStatus
    featureUnits
    featureUnitsPlural
    hasMeter
    meterType
  }
}
{
  "input": {
    "refId": "feature-api-calls",
    "displayName": "API Calls",
    "description": "Number of API calls per month",
    "featureType": "NUMBER",
    "featureUnits": "call",
    "featureUnitsPlural": "calls",
    "environmentId": "env-123"
  }
}
{
  "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
    }
  }
}

Parameters

input
FeatureInput
required
Input for creating a feature

Feature Types

TypeDescriptionExample
BOOLEANOn/off accessSSO, Advanced Reports
NUMBERQuantity limitsAPI calls, Storage
ENUMTier-based accessSupport level

Examples

Boolean Feature

{
  "input": {
    "refId": "feature-sso",
    "displayName": "Single Sign-On",
    "featureType": "BOOLEAN",
    "environmentId": "env-123"
  }
}

Numeric Feature with Meter

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

Enum Feature

{
  "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"
  }
}