Amplitude Experiments API

Experiment management operations

Operations 4

GET /api/1/experiments Amplitude List All Experiments #
POST /api/1/experiments Amplitude Create an Experiment #
GET /api/1/experiments/{id} Amplitude Get an Experiment #
PATCH /api/1/experiments/{id} Amplitude Update an Experiment #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/amplitude-experiments-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

amplitude-experiments-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Amplitude Experiment Management Experiments API
  description: The Amplitude Experiment Management API provides programmatic control over feature flags and experiments. It supports creating, updating, activating, and archiving experiments and flags, as well as managing deployments, variants, holdout groups, and mutual exclusion groups. This API enables teams to integrate experiment lifecycle management into their CI/CD pipelines, automate flag rollouts, and manage experimentation workflows without using the Amplitude UI.
  version: '1'
  contact:
    name: Amplitude Support
    url: https://amplitude.com/contact
  termsOfService: https://amplitude.com/terms
servers:
- url: https://experiment.amplitude.com
  description: Amplitude Experiment Management Server
security:
- bearerAuth: []
tags:
- name: Experiments
  description: Experiment management operations
paths:
  /api/1/experiments:
    get:
      operationId: listExperiments
      summary: Amplitude List All Experiments
      description: Retrieve a list of all experiments in the project. Returns experiment metadata including status, variants, and deployment information.
      tags:
      - Experiments
      parameters:
      - name: limit
        in: query
        description: The maximum number of experiments to return.
        schema:
          type: integer
      - name: cursor
        in: query
        description: A cursor for pagination.
        schema:
          type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExperimentListResponse'
              examples:
                listExperiments200Example:
                  summary: Default listExperiments 200 response
                  x-microcks-default: true
                  value:
                    experiments:
                    - example_value
                    nextCursor: example_value
        '401':
          description: Unauthorized
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    post:
      operationId: createExperiment
      summary: Amplitude Create an Experiment
      description: Create a new A/B test experiment with the specified key, variants, and targeting configuration.
      tags:
      - Experiments
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateExperimentRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Experiment'
              examples:
                createExperiment200Example:
                  summary: Default createExperiment 200 response
                  x-microcks-default: true
                  value:
                    id: '500123'
                    projectId: '500123'
                    key: example_value
                    name: Example Name
                    description: Example description text
                    enabled: true
                    evaluationMode: local
                    bucketingKey: example_value
                    bucketingSalt: example_value
                    variants:
                    - example_value
                    deployments:
                    - example_value
                    segments:
                    - example_value
                    state: draft
                    rolledOutVariant: example_value
                    startDate: '2025-03-15T14:30:00Z'
                    endDate: '2025-03-15T14:30:00Z'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '409':
          description: Experiment key already exists
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /api/1/experiments/{id}:
    get:
      operationId: getExperiment
      summary: Amplitude Get an Experiment
      description: Retrieve a single experiment by its ID including full configuration details.
      tags:
      - Experiments
      parameters:
      - $ref: '#/components/parameters/experimentId'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Experiment'
              examples:
                getExperiment200Example:
                  summary: Default getExperiment 200 response
                  x-microcks-default: true
                  value:
                    id: '500123'
                    projectId: '500123'
                    key: example_value
                    name: Example Name
                    description: Example description text
                    enabled: true
                    evaluationMode: local
                    bucketingKey: example_value
                    bucketingSalt: example_value
                    variants:
                    - example_value
                    deployments:
                    - example_value
                    segments:
                    - example_value
                    state: draft
                    rolledOutVariant: example_value
                    startDate: '2025-03-15T14:30:00Z'
                    endDate: '2025-03-15T14:30:00Z'
        '401':
          description: Unauthorized
        '404':
          description: Experiment not found
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    patch:
      operationId: updateExperiment
      summary: Amplitude Update an Experiment
      description: Update an existing experiment's configuration.
      tags:
      - Experiments
      parameters:
      - $ref: '#/components/parameters/experimentId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateExperimentRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Experiment'
              examples:
                updateExperiment200Example:
                  summary: Default updateExperiment 200 response
                  x-microcks-default: true
                  value:
                    id: '500123'
                    projectId: '500123'
                    key: example_value
                    name: Example Name
                    description: Example description text
                    enabled: true
                    evaluationMode: local
                    bucketingKey: example_value
                    bucketingSalt: example_value
                    variants:
                    - example_value
                    deployments:
                    - example_value
                    segments:
                    - example_value
                    state: draft
                    rolledOutVariant: example_value
                    startDate: '2025-03-15T14:30:00Z'
                    endDate: '2025-03-15T14:30:00Z'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '404':
          description: Experiment not found
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  schemas:
    Segment:
      type: object
      properties:
        name:
          type: string
          description: The display name of the segment.
        conditions:
          type: array
          description: Array of targeting conditions that define this segment.
          items:
            type: object
            properties:
              type:
                type: string
                description: The condition type.
              prop:
                type: string
                description: The property to evaluate.
              op:
                type: string
                description: The comparison operator.
              values:
                type: array
                description: The values to compare against.
                items:
                  type: string
        variant:
          type: string
          description: The variant key to assign when this segment matches.
        percentage:
          type: integer
          description: The percentage of matching users to include (0-100).
          minimum: 0
          maximum: 100
    CreateExperimentRequest:
      type: object
      required:
      - key
      properties:
        key:
          type: string
          description: The unique key for the experiment.
        name:
          type: string
          description: The display name of the experiment.
        description:
          type: string
          description: A description of the experiment.
        variants:
          type: array
          description: Array of variant configurations.
          items:
            $ref: '#/components/schemas/VariantConfig'
        bucketingKey:
          type: string
          description: The property used for bucketing.
    ExperimentListResponse:
      type: object
      properties:
        experiments:
          type: array
          description: Array of experiment objects.
          items:
            $ref: '#/components/schemas/Experiment'
        nextCursor:
          type: string
          description: A cursor for fetching the next page.
    VariantConfig:
      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: integer
          description: The rollout weight as a percentage (0-100) controlling traffic allocation to this variant.
          minimum: 0
          maximum: 100
    UpdateExperimentRequest:
      type: object
      properties:
        name:
          type: string
          description: The updated display name.
        description:
          type: string
          description: The updated description.
        enabled:
          type: boolean
          description: Whether the experiment should be enabled.
        variants:
          type: array
          description: Updated variant configurations.
          items:
            $ref: '#/components/schemas/VariantConfig'
        segments:
          type: array
          description: Updated targeting segments.
          items:
            $ref: '#/components/schemas/Segment'
    Experiment:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier for the experiment.
        projectId:
          type: string
          description: The project ID the experiment belongs to.
        key:
          type: string
          description: The unique key used to reference the experiment in code.
        name:
          type: string
          description: The display name of the experiment.
        description:
          type: string
          description: A description of the experiment's purpose.
        enabled:
          type: boolean
          description: Whether the experiment is enabled.
        evaluationMode:
          type: string
          description: The evaluation mode, either local or remote.
          enum:
          - local
          - remote
        bucketingKey:
          type: string
          description: The property used for bucketing.
        bucketingSalt:
          type: string
          description: The salt used for hashing.
        variants:
          type: array
          description: Array of variant configurations including control and treatment groups.
          items:
            $ref: '#/components/schemas/VariantConfig'
        deployments:
          type: array
          description: Array of deployment IDs.
          items:
            type: string
        segments:
          type: array
          description: Array of targeting segments.
          items:
            $ref: '#/components/schemas/Segment'
        state:
          type: string
          description: The current state of the experiment.
          enum:
          - draft
          - running
          - stopped
          - archived
        rolledOutVariant:
          type: string
          description: The variant key that was rolled out, if the experiment has concluded.
        startDate:
          type: string
          format: date-time
          description: The date and time the experiment started running.
        endDate:
          type: string
          format: date-time
          description: The date and time the experiment stopped running.
  parameters:
    experimentId:
      name: id
      in: path
      required: true
      description: The unique identifier of the experiment.
      schema:
        type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Use a Management API key generated in the Experiment sidebar of the Amplitude UI. Pass it in the Authorization header as Bearer YOUR_MANAGEMENT_API_KEY.
externalDocs:
  description: Amplitude Experiment Management API Documentation
  url: https://amplitude.com/docs/apis/experiment/experiment-management-api