Skip to main content
POST
/
api
/
v1
/
features
JavaScript
import Stigg from '@stigg/typescript';

const client = new Stigg({
  apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted
});

const response = await client.v1.events.features.createFeature({
  id: 'id',
  displayName: 'displayName',
  featureType: 'BOOLEAN',
});

console.log(response.data);
{
  "data": {
    "id": "feature-api-calls",
    "displayName": "API Calls",
    "description": "Number of API calls allowed per month",
    "featureType": "NUMBER",
    "meterType": "INCREMENTAL",
    "featureUnits": "call",
    "featureUnitsPlural": "calls",
    "featureStatus": "ACTIVE",
    "unitTransformation": null,
    "enumConfiguration": null,
    "metadata": {},
    "createdAt": "2026-12-29T01:57:54.675Z",
    "updatedAt": "2026-12-29T01:57:54.677Z"
  }
}

Authorizations

X-API-KEY
string
header
required

Server API Key

Headers

X-API-KEY
string
required

Server API Key

Body

application/json

Create a new feature with type, optional metering, and configuration.

id
string
required

The unique identifier for the feature

Required string length: 1 - 255
displayName
string
required

The display name for the feature

Maximum string length: 255
featureType
enum<string>
required

The type of the feature

Available options:
BOOLEAN,
NUMBER,
ENUM
description
string

The description for the feature

Maximum string length: 255
meterType
enum<string>

The meter type for the feature

Available options:
None,
FLUCTUATING,
INCREMENTAL
featureStatus
enum<string>
default:ACTIVE

The status of the feature

Available options:
NEW,
SUSPENDED,
ACTIVE
featureUnits
string

The units for the feature

Maximum string length: 255
featureUnitsPlural
string

The plural units for the feature

Maximum string length: 255
metadata
object

The additional metadata for the feature

unitTransformation
object

Unit transformation to be applied to the reported usage

enumConfiguration
object[]

The configuration data for the feature

Required array length: 1 - 255 elements

Response

The newly created feature object.

Response object

data
Feature · object
required

Feature configuration object