PostHog experiments API

The experiments API from PostHog — 18 operation(s) for experiments.

OpenAPI Specification

posthog-experiments-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: PostHog actions experiments API
  version: 1.0.0
  description: ''
tags:
- name: experiments
paths:
  /api/projects/{project_id}/experiments/:
    get:
      operationId: experiments_list
      description: List experiments for the current project. Supports filtering by status and archival state.
      parameters:
      - in: query
        name: archived
        schema:
          type: boolean
        description: Filter by archived state. Defaults to non-archived experiments only.
      - in: query
        name: created_by_id
        schema:
          type: integer
        description: Filter to experiments created by the given user ID.
      - in: query
        name: feature_flag_id
        schema:
          type: integer
        description: Filter to experiments linked to the given feature flag ID.
      - name: limit
        required: false
        in: query
        description: Number of results to return per page.
        schema:
          type: integer
      - name: offset
        required: false
        in: query
        description: The initial index from which to return the results.
        schema:
          type: integer
      - in: query
        name: order
        schema:
          type: string
        description: Field to order by. Prefix with '-' for descending. Allowlisted fields include name, created_at, updated_at, start_date, end_date, duration, and status.
      - $ref: '#/components/parameters/ProjectIdPath'
      - in: query
        name: search
        schema:
          type: string
        description: Free-text search applied to the experiment name (case-insensitive).
      - in: query
        name: status
        schema:
          type: string
          enum:
          - all
          - complete
          - draft
          - paused
          - running
          - stopped
        description: 'Filter by experiment status. "running" and "paused" are mutually exclusive: "running" returns launched experiments with an active feature flag, "paused" returns launched experiments whose feature flag is deactivated. "complete" is an alias for "stopped". "all" disables status filtering.'
      tags:
      - experiments
      security:
      - PersonalAPIKeyAuth:
        - experiment:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedExperimentList'
          description: ''
      x-explicit-tags:
      - experiments
    post:
      operationId: experiments_create
      description: Create a new experiment in draft status with optional metrics.
      parameters:
      - $ref: '#/components/parameters/ProjectIdPath'
      tags:
      - experiments
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Experiment'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/Experiment'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Experiment'
        required: true
      security:
      - PersonalAPIKeyAuth:
        - experiment:write
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Experiment'
          description: ''
      x-explicit-tags:
      - experiments
  /api/projects/{project_id}/experiments/{id}/:
    get:
      operationId: experiments_retrieve
      description: Retrieve a single experiment by ID, including its current status, metrics, feature flag, and results metadata.
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this experiment.
        required: true
      - $ref: '#/components/parameters/ProjectIdPath'
      tags:
      - experiments
      security:
      - PersonalAPIKeyAuth:
        - experiment:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Experiment'
          description: ''
      x-explicit-tags:
      - experiments
    put:
      operationId: experiments_update
      description: 'Mixin for ViewSets to handle ApprovalRequired exceptions from decorated serializers.


        This mixin intercepts ApprovalRequired exceptions raised by the @approval_gate decorator

        on serializer methods and converts them into proper HTTP 409 Conflict responses with

        change request details.'
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this experiment.
        required: true
      - $ref: '#/components/parameters/ProjectIdPath'
      tags:
      - experiments
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Experiment'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/Experiment'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Experiment'
        required: true
      security:
      - PersonalAPIKeyAuth:
        - experiment:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Experiment'
          description: ''
      x-explicit-tags:
      - experiments
    patch:
      operationId: experiments_partial_update
      description: Update an experiment. Use this to modify experiment properties such as name, description, metrics, variants, and configuration. Metrics can be added, changed and removed at any time.
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this experiment.
        required: true
      - $ref: '#/components/parameters/ProjectIdPath'
      tags:
      - experiments
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedExperiment'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedExperiment'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedExperiment'
      security:
      - PersonalAPIKeyAuth:
        - experiment:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Experiment'
          description: ''
      x-explicit-tags:
      - experiments
    delete:
      operationId: experiments_destroy
      description: Hard delete of this model is not allowed. Use a patch API call to set "deleted" to true
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this experiment.
        required: true
      - $ref: '#/components/parameters/ProjectIdPath'
      tags:
      - experiments
      security:
      - PersonalAPIKeyAuth:
        - experiment:write
      responses:
        '405':
          description: No response body
      x-explicit-tags:
      - experiments
  /api/projects/{project_id}/experiments/{id}/archive/:
    post:
      operationId: experiments_archive_create
      description: 'Archive an ended experiment.


        Hides the experiment from the default list view. The experiment can be

        restored at any time by updating archived=false. Returns 400 if the

        experiment is already archived or has not ended yet.'
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this experiment.
        required: true
      - $ref: '#/components/parameters/ProjectIdPath'
      tags:
      - experiments
      security:
      - PersonalAPIKeyAuth:
        - experiment:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Experiment'
          description: ''
      x-explicit-tags:
      - experiments
  /api/projects/{project_id}/experiments/{id}/copy_to_project/:
    post:
      operationId: experiments_copy_to_project_create
      description: 'Mixin for ViewSets to handle ApprovalRequired exceptions from decorated serializers.


        This mixin intercepts ApprovalRequired exceptions raised by the @approval_gate decorator

        on serializer methods and converts them into proper HTTP 409 Conflict responses with

        change request details.'
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this experiment.
        required: true
      - $ref: '#/components/parameters/ProjectIdPath'
      tags:
      - experiments
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CopyExperimentToProject'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/CopyExperimentToProject'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/CopyExperimentToProject'
        required: true
      security:
      - PersonalAPIKeyAuth:
        - experiment:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Experiment'
          description: ''
      x-explicit-tags:
      - experiments
  /api/projects/{project_id}/experiments/{id}/create_exposure_cohort_for_experiment/:
    post:
      operationId: experiments_create_exposure_cohort_for_experiment_create
      description: 'Mixin for ViewSets to handle ApprovalRequired exceptions from decorated serializers.


        This mixin intercepts ApprovalRequired exceptions raised by the @approval_gate decorator

        on serializer methods and converts them into proper HTTP 409 Conflict responses with

        change request details.'
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this experiment.
        required: true
      - $ref: '#/components/parameters/ProjectIdPath'
      tags:
      - experiments
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Experiment'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/Experiment'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Experiment'
        required: true
      security:
      - PersonalAPIKeyAuth:
        - experiment:write
      responses:
        '200':
          description: No response body
      x-explicit-tags:
      - experiments
  /api/projects/{project_id}/experiments/{id}/duplicate/:
    post:
      operationId: experiments_duplicate_create
      description: 'Mixin for ViewSets to handle ApprovalRequired exceptions from decorated serializers.


        This mixin intercepts ApprovalRequired exceptions raised by the @approval_gate decorator

        on serializer methods and converts them into proper HTTP 409 Conflict responses with

        change request details.'
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this experiment.
        required: true
      - $ref: '#/components/parameters/ProjectIdPath'
      tags:
      - experiments
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Experiment'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/Experiment'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Experiment'
        required: true
      security:
      - PersonalAPIKeyAuth:
        - experiment:write
      responses:
        '200':
          description: No response body
      x-explicit-tags:
      - experiments
  /api/projects/{project_id}/experiments/{id}/end/:
    post:
      operationId: experiments_end_create
      description: "End a running experiment without shipping a variant.\n\nSets end_date to now and marks the experiment as stopped. The feature\nflag is NOT modified — users continue to see their assigned variants\nand exposure events ($feature_flag_called) continue to be recorded.\nHowever, only data up to end_date is included in experiment results.\n\nUse this when:\n\n- You want to freeze the results window without changing which variant\n  users see.\n- A variant was already shipped manually via the feature flag UI and\n  the experiment just needs to be marked complete.\n\nThe end_date can be adjusted after ending via PATCH if it needs to be\nbackdated (e.g. to match when the flag was actually paused).\n\nOther options:\n- Use ship_variant to end the experiment AND roll out a single variant to 100%% of users.\n- Use pause to deactivate the flag without ending the experiment (stops variant assignment but does not freeze results).\n\nReturns 400 if the experiment is not running."
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this experiment.
        required: true
      - $ref: '#/components/parameters/ProjectIdPath'
      tags:
      - experiments
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EndExperiment'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/EndExperiment'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/EndExperiment'
      security:
      - PersonalAPIKeyAuth:
        - experiment:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Experiment'
          description: ''
      x-explicit-tags:
      - experiments
  /api/projects/{project_id}/experiments/{id}/launch/:
    post:
      operationId: experiments_launch_create
      description: 'Launch a draft experiment.


        Validates the experiment is in draft state, activates its linked feature flag,

        sets start_date to the current server time, and transitions the experiment to running.

        Returns 400 if the experiment has already been launched or if the feature flag

        configuration is invalid (e.g. missing "control" variant or fewer than 2 variants).'
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this experiment.
        required: true
      - $ref: '#/components/parameters/ProjectIdPath'
      tags:
      - experiments
      security:
      - PersonalAPIKeyAuth:
        - experiment:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Experiment'
          description: ''
      x-explicit-tags:
      - experiments
  /api/projects/{project_id}/experiments/{id}/pause/:
    post:
      operationId: experiments_pause_create
      description: 'Pause a running experiment.


        Deactivates the linked feature flag so it is no longer returned by the

        /decide endpoint. Users fall back to the application default (typically

        the control experience), and no new exposure events are recorded (i.e.

        $feature_flag_called is not fired).

        Returns 400 if the experiment is not running or is already paused.'
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this experiment.
        required: true
      - $ref: '#/components/parameters/ProjectIdPath'
      tags:
      - experiments
      security:
      - PersonalAPIKeyAuth:
        - experiment:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Experiment'
          description: ''
      x-explicit-tags:
      - experiments
  /api/projects/{project_id}/experiments/{id}/recalculate_timeseries/:
    post:
      operationId: experiments_recalculate_timeseries_create
      description: 'Mixin for ViewSets to handle ApprovalRequired exceptions from decorated serializers.


        This mixin intercepts ApprovalRequired exceptions raised by the @approval_gate decorator

        on serializer methods and converts them into proper HTTP 409 Conflict responses with

        change request details.'
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this experiment.
        required: true
      - $ref: '#/components/parameters/ProjectIdPath'
      tags:
      - experiments
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Experiment'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/Experiment'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Experiment'
        required: true
      security:
      - PersonalAPIKeyAuth:
        - experiment:write
      responses:
        '200':
          description: No response body
      x-explicit-tags:
      - experiments
  /api/projects/{project_id}/experiments/{id}/reset/:
    post:
      operationId: experiments_reset_create
      description: 'Reset an experiment back to draft state.


        Clears start/end dates, conclusion, and archived flag. The feature

        flag is left unchanged — users continue to see their assigned variants.


        Previously collected events still exist but won''t be included in

        results unless the start date is manually adjusted after re-launch.


        Returns 400 if the experiment is already in draft state.'
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this experiment.
        required: true
      - $ref: '#/components/parameters/ProjectIdPath'
      tags:
      - experiments
      security:
      - PersonalAPIKeyAuth:
        - experiment:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Experiment'
          description: ''
      x-explicit-tags:
      - experiments
  /api/projects/{project_id}/experiments/{id}/resume/:
    post:
      operationId: experiments_resume_create
      description: 'Resume a paused experiment.


        Reactivates the linked feature flag so it is returned by /decide again.

        Users are re-bucketed deterministically into the same variants they had

        before the pause, and exposure tracking resumes.

        Returns 400 if the experiment is not running or is not paused.'
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this experiment.
        required: true
      - $ref: '#/components/parameters/ProjectIdPath'
      tags:
      - experiments
      security:
      - PersonalAPIKeyAuth:
        - experiment:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Experiment'
          description: ''
      x-explicit-tags:
      - experiments
  /api/projects/{project_id}/experiments/{id}/ship_variant/:
    post:
      operationId: experiments_ship_variant_create
      description: 'Ship a variant to 100% of users and (optionally) end the experiment.


        Rewrites the feature flag so that the selected variant is served to everyone.

        Existing release conditions (flag groups) are preserved so the change can be

        rolled back by deleting the auto-added release condition in the feature flag UI.


        Can be called on both running and stopped experiments. If the experiment is

        still running, it will also be ended (end_date set and status marked as stopped).

        If the experiment has already ended, only the flag is rewritten - this supports

        the "end first, ship later" workflow.


        If an approval policy requires review before changes on the flag take effect,

        the API returns 409 with a change_request_id. The experiment is NOT ended until

        the change request is approved and the user retries.


        Returns 400 if the experiment is in draft state, the variant_key is not found

        on the flag, or the experiment has no linked feature flag.'
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this experiment.
        required: true
      - $ref: '#/components/parameters/ProjectIdPath'
      tags:
      - experiments
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ShipVariant'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/ShipVariant'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/ShipVariant'
        required: true
      security:
      - PersonalAPIKeyAuth:
        - experiment:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Experiment'
          description: ''
      x-explicit-tags:
      - experiments
  /api/projects/{project_id}/experiments/{id}/timeseries_results/:
    get:
      operationId: experiments_timeseries_results_retrieve
      description: 'Mixin for ViewSets to handle ApprovalRequired exceptions from decorated serializers.


        This mixin intercepts ApprovalRequired exceptions raised by the @approval_gate decorator

        on serializer methods and converts them into proper HTTP 409 Conflict responses with

        change request details.'
      parameters:
      - in: query
        name: fingerprint
        schema:
          type: string
        description: Fingerprint of the metric configuration. Available alongside metric_uuid on each metric in the experiment's metrics array.
        required: true
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this experiment.
        required: true
      - in: query
        name: metric_uuid
        schema:
          type: string
        description: UUID of the metric to fetch timeseries for. Available on each metric in the experiment's metrics array.
        required: true
      - $ref: '#/components/parameters/ProjectIdPath'
      tags:
      - experiments
      security:
      - PersonalAPIKeyAuth:
        - experiment:read
      responses:
        '200':
          description: No response body
      x-explicit-tags:
      - experiments
  /api/projects/{project_id}/experiments/{id}/unarchive/:
    post:
      operationId: experiments_unarchive_create
      description: 'Unarchive an archived experiment.


        Restores the experiment to the default list view. Returns 400 if the

        experiment is not currently archived.'
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this experiment.
        required: true
      - $ref: '#/components/parameters/ProjectIdPath'
      tags:
      - experiments
      security:
      - PersonalAPIKeyAuth:
        - experiment:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Experiment'
          description: ''
      x-explicit-tags:
      - experiments
  /api/projects/{project_id}/experiments/eligible_feature_flags/:
    get:
      operationId: experiments_eligible_feature_flags_retrieve
      description: 'Returns a paginated list of feature flags eligible for use in experiments.


        Eligible flags must:

        - Be multivariate with at least 2 variants

        - Have "control" as the first variant key


        Query parameters:

        - search: Filter by flag key or name (case insensitive)

        - limit: Number of results per page (default: 20)

        - offset: Pagination offset (default: 0)

        - active: Filter by active status ("true" or "false")

        - created_by_id: Filter by creator user ID

        - order: Sort order field

        - evaluation_runtime: Filter by evaluation runtime

        - has_evaluation_contexts: Filter by presence of evaluation contexts ("true" or "false")'
      parameters:
      - $ref: '#/components/parameters/ProjectIdPath'
      tags:
      - experiments
      security:
      - PersonalAPIKeyAuth:
        - feature_flag:read
      responses:
        '200':
          description: No response body
      x-explicit-tags:
      - experiments
  /api/projects/{project_id}/experiments/requires_flag_implementation/:
    get:
      operationId: experiments_requires_flag_implementation_retrieve
      description: 'Mixin for ViewSets to handle ApprovalRequired exceptions from decorated serializers.


        This mixin intercepts ApprovalRequired exceptions raised by the @approval_gate decorator

        on serializer methods and converts them into proper HTTP 409 Conflict responses with

        change request details.'
      parameters:
      - $ref: '#/components/parameters/ProjectIdPath'
      tags:
      - experiments
      security:
      - PersonalAPIKeyAuth:
        - experiment:read
      responses:
        '200':
          description: No response body
      x-explicit-tags:
      - experiments
  /api/projects/{project_id}/experiments/stats/:
    get:
      operationId: experiments_stats_retrieve
      description: 'Mixin for ViewSets to handle ApprovalRequired exceptions from decorated serializers.


        This mixin intercepts ApprovalRequired exceptions raised by the @approval_gate decorator

        on serializer methods and converts them into proper HTTP 409 Conflict responses with

        change request details.'
      parameters:
      - $ref: '#/components/parameters/ProjectIdPath'
      tags:
      - experiments
      security:
      - PersonalAPIKeyAuth:
        - experiment:read
      responses:
        '200':
          description: No response body
      x-explicit-tags:
      - experiments
components:
  schemas:
    PatchedExperiment:
      type: object
      description: Mixin for serializers to add user access control fields
      properties:
        id:
          type: integer
          readOnly: true
        name:
          type: string
          description: Name of the experiment.
          maxLength: 400
        description:
          type: string
          nullable: true
          description: Description of the experiment hypothesis and expected outcomes.
          maxLength: 3000
        start_date:
          type: string
          format: date-time
          nullable: true
        end_date:
          type: string
          format: date-time
          nullable: true
        feature_flag_key:
          type: string
          description: Unique key for the experiment's feature flag. Letters, numbers, hyphens, and underscores only. Search existing flags with the feature-flags-get-all tool first — reuse an existing flag when possible.
        feature_flag:
          type: object
          additionalProperties: true
          readOnly: true
        holdout:
          allOf:
          - $ref: '#/components/schemas/ExperimentHoldout'
          readOnly: true
        holdout_id:
          type: integer
          nullable: true
          description: ID of a holdout group to exclude from the experiment.
        exposure_cohort:
          type: integer
          readOnly: true
          nullable: true
        parameters:
          allOf:
          - $ref: '#/components/schemas/ExperimentParameters'
          nullable: true
          description: 'Variant definitions and rollout configuration. Set feature_flag_variants to customize the split (default: 50/50 control/test). Each variant needs a key and split_percent (the variant''s share of traffic); percentages must sum to 100. Set rollout_percentage (0-100, default 100) to limit what fraction of users enter the experiment. Set minimum_detectable_effect (percentage, suggest 20-30) to control statistical power.'
        secondary_metrics:
          nullable: true
        saved_metrics:
          type: array
          items:
            $ref: '#/components/schemas/ExperimentToSavedMetric'
          readOnly: true
        saved_metrics_ids:
          type: array
          items: {}
          nullable: true
          description: IDs of shared saved metrics to attach to this experiment. Each item has 'id' (saved metric ID) and 'metadata' with 'type' (primary or secondary).
        filters: {}
        archived:
          type: boolean
          default: false
          description: Whether the experiment is archived.
        deleted:
          type: boolean
          nullable: true
        created_by:
          allOf:
          - $ref: '#/components/schemas/UserBasic'
          readOnly: true
        created_at:
          type: string
          format: date-time
          readOnly: true
        updated_at:
          type: string
          format: date-time
          readOnly: true
        type:
          nullable: true
          description: 'Experiment type: web for frontend UI changes, product for backend/API changes.


            * `web` - web

            * `product` - product'
          oneOf:
          - $ref: '#/components/schemas/ExperimentTypeEnum'
          - $ref: '#/components/schemas/NullEnum'
        exposure_criteria:
          allOf:
          - $ref: '#/components/schemas/ExperimentApiExposureCriteria'
          nullable: true
          description: Exposure configuration including filter test accounts and custom exposure events.
        metrics:
          allOf:
          - $ref: '#/components/schemas/_ExperimentApiMetricsList'
          nullable: true
          description: 'Primary experiment metrics. Each metric must have kind=''ExperimentMetric'' and a metric_type: ''mean'' (set source to an EventsNode with an event name), ''funnel'' (set series to an array of EventsNode steps), ''ratio'' (set numerator and denominator EventsNode entries), or ''retention'' (set start_event and completion_event). Use the event-definitions-list tool to find available events in the project.'
        metrics_secondary:
          allOf:
          - $ref: '#/components/schemas/_ExperimentApiMetricsList'
          nullable: true
          description: Secondary metrics for additional measurements. Same format as primary metrics.
        stats_config:
          nullable: true
        scheduling_config:
          nullable: true
        allow_unknown_events:
          type: boolean
          writeOnly: true
          default: false
        _create_in_folder:
          type: string
          writeOnly: true
          title: ' create in folder'
        conclusion:
          nullable: true
          description: 'Experiment conclusion: won, lost, inconclusive, stopped_early, or invalid.


            * `won` - won

            * `lost` - lost

            * `inconclusive` - inconclusive

            * `stopped_early` - stopped_early

            * `invalid` - invalid'
          oneOf:
          - $ref: '#/components/schemas/ConclusionEnum'
          - $ref: '#/components/schemas/NullEnum'
        conclusion_comment:
          type: string
          nullable: true
          description: Comment about the experiment conclusion.
        primary_metrics_ordered_uuids:
          nullable: true
        secondary_metrics_ordered_uuids:
          nullable: true
        only_count_matured_users:
          type: boolean
        update_feature_flag_params:
          type: b

# --- truncated at 32 KB (57 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/posthog/refs/heads/main/openapi/posthog-experiments-api-openapi.yml