createFeatureFlag
Create a new feature flag with custom variations and targeting rules to enable controlled feature rollouts and A/B testing in your application.
Instructions
Create a new feature flag in the specified environment
Input Schema
Name | Required | Description | Default |
---|---|---|---|
defaultOffVariationIndex | Yes | Index of the variation to serve when flag is off (0-based) | |
defaultOnVariationIndex | Yes | Index of the variation to serve when flag is on (0-based) | |
description | No | Description of the feature flag | |
environmentId | No | Environment ID (uses default if not provided) | |
id | Yes | Unique identifier for the feature flag (alphanumeric, hyphens, underscores) | |
name | Yes | Human-readable name for the feature flag | |
tags | No | Tags for the feature flag | |
variationType | No | Type of the variation values (default: STRING) | |
variations | Yes | List of variations (at least 2 required) |
Input Schema (JSON Schema)
{
"properties": {
"defaultOffVariationIndex": {
"description": "Index of the variation to serve when flag is off (0-based)",
"type": "number"
},
"defaultOnVariationIndex": {
"description": "Index of the variation to serve when flag is on (0-based)",
"type": "number"
},
"description": {
"description": "Description of the feature flag",
"type": "string"
},
"environmentId": {
"description": "Environment ID (uses default if not provided)",
"type": "string"
},
"id": {
"description": "Unique identifier for the feature flag (alphanumeric, hyphens, underscores)",
"type": "string"
},
"name": {
"description": "Human-readable name for the feature flag",
"type": "string"
},
"tags": {
"description": "Tags for the feature flag",
"items": {
"type": "string"
},
"type": "array"
},
"variationType": {
"description": "Type of the variation values (default: STRING)",
"enum": [
"STRING",
"BOOLEAN",
"NUMBER",
"JSON"
],
"type": "string"
},
"variations": {
"description": "List of variations (at least 2 required)",
"items": {
"properties": {
"description": {
"description": "Description of the variation",
"type": "string"
},
"name": {
"description": "Name of the variation",
"type": "string"
},
"value": {
"description": "The value returned when this variation is served",
"type": "string"
}
},
"required": [
"value",
"name"
],
"type": "object"
},
"type": "array"
}
},
"required": [
"id",
"name",
"variations",
"defaultOnVariationIndex",
"defaultOffVariationIndex"
],
"type": "object"
}