Amplitude · JSON Structure

Experiment Management Api Create Flag Request Structure

CreateFlagRequest schema from Amplitude Experiment Management API

Type: object Properties: 5 Required: 1
A/B TestingAnalyticsExperimentationFeature FlagsProduct AnalyticsUser Behavior

CreateFlagRequest is a JSON Structure definition published by Amplitude, describing 5 properties, of which 1 is required. It conforms to the https://json-structure.org/meta/core/v0/# meta-schema.

Properties

key name description variants bucketingKey

Meta-schema: https://json-structure.org/meta/core/v0/#

JSON Structure

Raw ↑
{
  "$schema": "https://json-structure.org/meta/core/v0/#",
  "$id": "https://raw.githubusercontent.com/api-evangelist/amplitude/refs/heads/main/json-structure/experiment-management-api-create-flag-request-structure.json",
  "name": "CreateFlagRequest",
  "description": "CreateFlagRequest schema from Amplitude Experiment Management API",
  "type": "object",
  "properties": {
    "key": {
      "type": "string",
      "description": "The unique key for the flag."
    },
    "name": {
      "type": "string",
      "description": "The display name of the flag."
    },
    "description": {
      "type": "string",
      "description": "A description of the flag's purpose."
    },
    "variants": {
      "type": "array",
      "description": "Array of variant configurations.",
      "items": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "description": "The unique key for the variant."
          },
          "name": {
            "type": "string",
            "description": "The display name of the variant."
          },
          "payload": {
            "description": "An optional JSON payload associated with the variant."
          },
          "description": {
            "type": "string",
            "description": "A description of what this variant does."
          },
          "rolloutWeight": {
            "type": "int32",
            "description": "The rollout weight as a percentage (0-100) controlling traffic allocation to this variant.",
            "minimum": 0,
            "maximum": 100
          }
        }
      }
    },
    "bucketingKey": {
      "type": "string",
      "description": "The property used for bucketing."
    }
  },
  "required": [
    "key"
  ]
}