openapi: 3.1.0 info: version: 1.0.0 title: GrowthBook REST AnalyticsExplorations visual-changesets API description: "GrowthBook offers a full REST API for interacting with the application.\n\nRequest data can use either JSON or Form data encoding (with proper `Content-Type` headers). All response bodies are JSON-encoded.\n\nThe API base URL for GrowthBook Cloud is `https://api.growthbook.io/api`. For self-hosted deployments, it is the same as your API_HOST environment variable (defaults to `http://localhost:3100/api`). The rest of these docs will assume you are using GrowthBook Cloud.\n\n## Versioning\n\nEndpoints are versioned by path prefix:\n\n- `/v1/...` — stable, widely-supported endpoints\n- `/v2/...` — updated endpoints with improved shapes (e.g. unified per-rule environment scope for feature flags)\n\nNew integrations should prefer v2 where available.\n\n## Authentication\n\nWe support both the HTTP Basic and Bearer authentication schemes for convenience.\n\nYou first need to generate a new API Key in GrowthBook. Different keys have different permissions:\n\n- **Personal Access Tokens**: These are sensitive and provide the same level of access as the user has to an organization. These can be created by going to `Personal Access Tokens` under the your user menu.\n- **Secret Keys**: These are sensitive and provide the level of access for the role, which currently is either `admin` or `readonly`. Only Admins with the `manageApiKeys` permission can manage Secret Keys on behalf of an organization. These can be created by going to `Settings -> API Keys`\n\nIf using HTTP Basic auth, pass the Secret Key as the username and leave the password blank (when using curl, add `:` at the end of the secret to indicate an empty password)\n\n```bash\ncurl https://api.growthbook.io/api/v1/features \\\n -u secret_abc123DEF456:\n```\n\nIf using Bearer auth, pass the Secret Key as the token:\n\n```bash\ncurl https://api.growthbook.io/api/v1/features \\\n-H \"Authorization: Bearer secret_abc123DEF456\"\n```\n\n## Errors\n\nThe API may return the following error status codes:\n\n- **400** - Bad Request - Often due to a missing required parameter\n- **401** - Unauthorized - No valid API key provided\n- **402** - Request Failed - The parameters are valid, but the request failed\n- **403** - Forbidden - Provided API key does not have the required access\n- **404** - Not Found - Unknown API route or requested resource\n- **429** - Too Many Requests - You exceeded the rate limit of 60 requests per minute. Try again later.\n- **5XX** - Server Error - Something went wrong on GrowthBook's end (these are rare)\n\nThe response body will be a JSON object with the following properties:\n\n- **message** - Information about the error\n" servers: - url: https://api.growthbook.io/api description: GrowthBook Cloud - url: https://{domain}/api description: Self-hosted GrowthBook security: - bearerAuth: [] - basicAuth: [] tags: - name: visual-changesets x-displayName: Visual Changesets description: Groups of visual changes made by the visual editor to a single page paths: /v1/experiments/{id}/visual-changesets: get: operationId: listVisualChangesets summary: Get all visual changesets tags: - visual-changesets parameters: - name: id in: path required: true description: The experiment id the visual changesets belong to schema: description: The experiment id the visual changesets belong to type: string responses: '200': content: application/json: schema: type: object properties: visualChangesets: type: array items: $ref: '#/components/schemas/VisualChangeset' required: - visualChangesets additionalProperties: false x-codeSamples: - lang: cURL source: "curl -X GET 'https://api.growthbook.io/api/v1/experiments/abc123/visual-changesets' \\\n -H 'Authorization: Bearer YOUR_API_KEY'" post: operationId: postVisualChangesets summary: Create a visual changeset for an experiment tags: - visual-changesets parameters: - $ref: '#/components/parameters/id' requestBody: required: true content: application/json: schema: type: object properties: editorUrl: description: URL of the page opened in the visual editor when creating this changeset type: string urlPatterns: description: URL patterns that determine which pages this visual changeset applies to type: array items: type: object properties: include: type: boolean type: type: string enum: - simple - regex pattern: type: string required: - type - pattern additionalProperties: false required: - editorUrl - urlPatterns additionalProperties: false responses: '200': content: application/json: schema: type: object properties: visualChangeset: $ref: '#/components/schemas/VisualChangeset' required: - visualChangeset additionalProperties: false x-codeSamples: - lang: cURL source: "curl -X POST 'https://api.growthbook.io/api/v1/experiments/abc123/visual-changesets' \\\n -H 'Authorization: Bearer YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\"editorUrl\":\"https://example.com/\",\"urlPatterns\":[{\"type\":\"simple\",\"pattern\":\"/\",\"include\":true}]}'" /v1/visual-changesets/{id}: get: operationId: getVisualChangeset summary: Get a single visual changeset tags: - visual-changesets parameters: - $ref: '#/components/parameters/id' - $ref: '#/components/parameters/includeExperiment' responses: '200': content: application/json: schema: type: object properties: visualChangeset: $ref: '#/components/schemas/VisualChangeset' experiment: $ref: '#/components/schemas/Experiment' required: - visualChangeset additionalProperties: false x-codeSamples: - lang: cURL source: "curl -X GET 'https://api.growthbook.io/api/v1/visual-changesets/abc123' \\\n -H 'Authorization: Bearer YOUR_API_KEY'" put: operationId: putVisualChangeset summary: Update a visual changeset tags: - visual-changesets parameters: - $ref: '#/components/parameters/id' responses: '200': content: application/json: schema: type: object properties: nModified: type: number visualChangeset: $ref: '#/components/schemas/VisualChangeset' required: - nModified - visualChangeset additionalProperties: false x-codeSamples: - lang: cURL source: "curl -X PUT 'https://api.growthbook.io/api/v1/visual-changesets/abc123' \\\n -H 'Authorization: Bearer YOUR_API_KEY'" /v1/visual-changesets/{id}/visual-change: post: operationId: postVisualChange summary: Create a visual change for a visual changeset tags: - visual-changesets parameters: - $ref: '#/components/parameters/id' responses: '200': content: application/json: schema: type: object properties: nModified: type: number required: - nModified additionalProperties: false x-codeSamples: - lang: cURL source: "curl -X POST 'https://api.growthbook.io/api/v1/visual-changesets/{id}/visual-change' \\\n -H 'Authorization: Bearer YOUR_API_KEY'" /v1/visual-changesets/{id}/visual-change/{visualChangeId}: put: operationId: putVisualChange summary: Update a visual change for a visual changeset tags: - visual-changesets parameters: - $ref: '#/components/parameters/id' - $ref: '#/components/parameters/visualChangeId' responses: '200': content: application/json: schema: type: object properties: nModified: type: number required: - nModified additionalProperties: false x-codeSamples: - lang: cURL source: "curl -X PUT 'https://api.growthbook.io/api/v1/visual-changesets/{id}/visual-change/{visualChangeId}' \\\n -H 'Authorization: Bearer YOUR_API_KEY'" components: parameters: visualChangeId: name: visualChangeId in: path required: true description: Specify a specific visual change schema: description: Specify a specific visual change type: string includeExperiment: name: includeExperiment in: query description: Include the associated experiment in payload schema: description: Include the associated experiment in payload type: integer id: name: id in: path required: true description: The id of the requested resource schema: description: The id of the requested resource type: string schemas: VisualChangeset: type: object properties: id: type: string urlPatterns: type: array items: type: object properties: include: type: boolean type: type: string enum: - simple - regex pattern: type: string required: - type - pattern additionalProperties: false editorUrl: type: string experiment: type: string visualChanges: type: array items: type: object properties: description: type: string css: type: string js: type: string variation: type: string domMutations: type: array items: type: object properties: selector: type: string action: type: string enum: - append - set - remove attribute: type: string value: type: string parentSelector: type: string insertBeforeSelector: type: string required: - selector - action - attribute additionalProperties: false required: - variation - domMutations additionalProperties: false required: - urlPatterns - editorUrl - experiment - visualChanges additionalProperties: false ExperimentDecisionFrameworkSettings: description: Controls the decision framework and metric overrides for the experiment. Replaces the entire stored object on update (does not patch individual fields). type: object properties: decisionCriteriaId: type: string decisionFrameworkMetricOverrides: type: array items: type: object properties: id: description: ID of the metric to override settings for. type: string targetMDE: description: The target relative MDE to use for the metric, expressed as proportions (e.g. use 0.1 for 10%). Must be greater than 0. type: number exclusiveMinimum: 0 required: - id additionalProperties: false additionalProperties: false ExperimentMetric: type: object properties: metricId: type: string overrides: type: object properties: delayHours: type: number windowHours: type: number window: type: string enum: - conversion - lookback - '' winRiskThreshold: deprecated: true type: number loseRiskThreshold: deprecated: true type: number properPriorOverride: type: boolean properPriorEnabled: type: boolean properPriorMean: type: number properPriorStdDev: type: number regressionAdjustmentOverride: type: boolean regressionAdjustmentEnabled: type: boolean regressionAdjustmentDays: type: number additionalProperties: false required: - metricId - overrides additionalProperties: false LookbackOverride: description: Controls the lookback override for the experiment. For type "window", value must be a non-negative number and valueUnit is required. type: object properties: type: type: string enum: - date - window value: description: For "window" type - non-negative numeric value (e.g. 7 for 7 days). For "date" type a date string. anyOf: - description: For "window" type - non-negative numeric value (e.g. 7 for 7 days). For "date" type a date string. type: number - format: date-time description: For "window" type - non-negative numeric value (e.g. 7 for 7 days). For "date" type a date string. type: string valueUnit: description: Used when type is "window". Defaults to "days". type: string enum: - minutes - hours - days - weeks required: - type - value additionalProperties: false ExperimentMetricOverrideEntry: description: Per-metric analysis overrides stored on the experiment (matches internal metricOverrides). type: object properties: id: description: ID of the metric to override settings for. type: string windowType: type: string enum: - conversion - lookback - '' windowHours: type: number delayHours: type: number properPriorOverride: description: Must be true for the override to take effect. If true, the other proper prior settings in this object will be used if present. type: boolean properPriorEnabled: type: boolean properPriorMean: type: number properPriorStdDev: type: number regressionAdjustmentOverride: description: Must be true for the override to take effect. If true, the other regression adjustment settings in this object will be used if present. type: boolean regressionAdjustmentEnabled: type: boolean regressionAdjustmentDays: type: number required: - id additionalProperties: false ExperimentAnalysisSettings: type: object properties: datasourceId: type: string assignmentQueryId: type: string experimentId: type: string segmentId: type: string queryFilter: type: string inProgressConversions: type: string enum: - include - exclude attributionModel: description: Setting attribution model to `"experimentDuration"` is the same as selecting "Ignore Conversion Windows" for the Conversion Window Override. Setting it to `"lookbackOverride"` requires a `lookbackOverride` object to be provided. type: string enum: - firstExposure - experimentDuration - lookbackOverride lookbackOverride: $ref: '#/components/schemas/LookbackOverride' statsEngine: type: string enum: - bayesian - frequentist regressionAdjustmentEnabled: type: boolean sequentialTestingEnabled: type: boolean sequentialTestingTuningParameter: type: number postStratificationEnabled: description: When null, the organization default is used. anyOf: - description: When null, the organization default is used. type: boolean - description: When null, the organization default is used. type: 'null' decisionFrameworkSettings: $ref: '#/components/schemas/ExperimentDecisionFrameworkSettings' metricOverrides: description: Per-metric analysis overrides; also reflected in goals/secondaryMetrics/guardrails overrides when applicable. On create/update, this replaces the entire stored array (it does not patch individual entries). type: array items: $ref: '#/components/schemas/ExperimentMetricOverrideEntry' goals: type: array items: $ref: '#/components/schemas/ExperimentMetric' secondaryMetrics: type: array items: $ref: '#/components/schemas/ExperimentMetric' guardrails: type: array items: $ref: '#/components/schemas/ExperimentMetric' activationMetric: $ref: '#/components/schemas/ExperimentMetric' required: - datasourceId - assignmentQueryId - experimentId - segmentId - queryFilter - inProgressConversions - attributionModel - statsEngine - goals - secondaryMetrics - guardrails additionalProperties: false Experiment: type: object properties: id: type: string trackingKey: type: string dateCreated: format: date-time type: string dateUpdated: format: date-time type: string name: type: string type: type: string enum: - standard - multi-armed-bandit project: type: string hypothesis: type: string description: type: string tags: type: array items: type: string owner: description: The userId of the owner (or raw owner name/email for legacy records) type: string ownerEmail: description: The email address of the owner, when the owner can be resolved to a known user. type: string archived: type: boolean status: type: string autoRefresh: type: boolean hashAttribute: type: string fallbackAttribute: type: string hashVersion: anyOf: - type: number const: 1 - type: number const: 2 disableStickyBucketing: type: boolean bucketVersion: type: number minBucketVersion: type: number variations: type: array items: type: object properties: variationId: type: string key: type: string name: type: string description: type: string screenshots: type: array items: type: string required: - variationId - key - name - description - screenshots additionalProperties: false phases: type: array items: type: object properties: name: type: string dateStarted: type: string dateEnded: type: string reasonForStopping: type: string seed: type: string coverage: type: number trafficSplit: type: array items: type: object properties: variationId: type: string weight: type: number required: - variationId - weight additionalProperties: false namespace: type: object properties: namespaceId: type: string enabled: type: boolean range: minItems: 2 maxItems: 2 type: array items: type: number ranges: type: array items: type: array prefixItems: - type: number - type: number required: - namespaceId additionalProperties: false targetingCondition: type: string prerequisites: type: array items: type: object properties: id: type: string condition: type: string required: - id - condition additionalProperties: false savedGroupTargeting: type: array items: type: object properties: matchType: type: string enum: - all - any - none savedGroups: type: array items: type: string required: - matchType - savedGroups additionalProperties: false required: - name - dateStarted - dateEnded - reasonForStopping - seed - coverage - trafficSplit - targetingCondition additionalProperties: false settings: $ref: '#/components/schemas/ExperimentAnalysisSettings' resultSummary: type: object properties: status: type: string winner: type: string conclusions: type: string releasedVariationId: type: string excludeFromPayload: type: boolean required: - status - winner - conclusions - releasedVariationId - excludeFromPayload additionalProperties: false shareLevel: type: string enum: - public - organization publicUrl: type: string banditScheduleValue: type: number banditScheduleUnit: type: string enum: - days - hours banditBurnInValue: type: number banditBurnInUnit: type: string enum: - days - hours banditConversionWindowValue: type: number banditConversionWindowUnit: type: string enum: - days - hours linkedFeatures: type: array items: type: string hasVisualChangesets: type: boolean hasURLRedirects: type: boolean customFields: type: object propertyNames: type: string additionalProperties: {} customMetricSlices: description: Custom slices that apply to ALL applicable metrics in the experiment type: array items: type: object properties: slices: type: array items: type: object properties: column: type: string levels: type: array items: type: string required: - column - levels additionalProperties: false required: - slices additionalProperties: false defaultDashboardId: description: ID of the default dashboard for this experiment. type: string templateId: type: string required: - id - trackingKey - dateCreated - dateUpdated - name - type - project - hypothesis - description - tags - owner - archived - status - autoRefresh - hashAttribute - hashVersion - variations - phases - settings additionalProperties: false securitySchemes: bearerAuth: type: http scheme: bearer description: 'If using Bearer auth, pass the Secret Key as the token: ```bash curl https://api.growthbook.io/api/v1/features -H "Authorization: Bearer secret_abc123DEF456" ``` ' basicAuth: type: http scheme: basic description: 'If using HTTP Basic auth, pass the Secret Key as the username and leave the password blank: ```bash curl https://api.growthbook.io/api/v1/features -u secret_abc123DEF456: # The ":" at the end stops curl from asking for a password ``` ' x-tagGroups: - name: Endpoints tags: - projects - environments - features-v2 - feature-revisions-v2 - features - feature-revisions - ramp-schedules - data-sources - fact-tables - fact-metrics - metrics - experiments - namespaces - snapshots - dimensions - segments - sdk-connections - visual-changesets - saved-groups - organizations - members - code-references - archetypes - queries - settings - attributes - usage - Dashboards - CustomFields - MetricGroups - Teams - ExperimentTemplates - AnalyticsExplorations - RampScheduleTemplates - name: Models tags: - AnalyticsExploration_model - Archetype_model - Attribute_model - CodeRef_model - CustomField_model - Dashboard_model - DataSource_model - Dimension_model - Environment_model - Experiment_model - ExperimentAnalysisSettings_model - ExperimentDecisionFrameworkSettings_model - ExperimentMetric_model - ExperimentMetricOverrideEntry_model - ExperimentResults_model - ExperimentSnapshot_model - ExperimentTemplate_model - ExperimentWithEnhancedStatus_model - FactMetric_model - FactTable_model - FactTableColumn_model - FactTableFilter_model - Feature_model - FeatureBaseRule_model - FeatureDefinition_model - FeatureEnvironment_model - FeatureEnvironmentV2_model - FeatureExperimentRefRule_model - FeatureExperimentRule_model - FeatureForceRule_model - FeatureRevision_model - FeatureRevisionV2_model - FeatureRolloutRule_model - FeatureRule_model - FeatureRuleV2_model - FeatureSafeRolloutRule_model - FeatureV2_model - FeatureWithRevisions_model - FeatureWithRevisionsV2_model - InformationSchema_model - InformationSchemaTable_model - LookbackOverride_model - Member_model - Metric_model - MetricAnalysis_model - MetricGroup_model - MetricUsage_model - Namespace_model - NamespaceExperimentMember_model - Organization_model - PaginationFields_model - Project_model - Query_model - RampSchedule_model - RampScheduleTemplate_model - SavedGroup_model - ScheduleRule_model - SdkConnection_model - Segment_model - Settings_model - Team_model - VisualChange_model - VisualChangeset_model