Amplitude Experiments API

Experiment management operations

GitHub OpenAPI
Business capability
A/B Test Execution BC-4280.50

Operations 4

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /api/1/experiments List experiments in the project · Amplitude List All Experiments #
Ask an LLM
“Which A/B tests are running in my project?”
“Can I page through all experiments with their variants and deployment?”
Tell an agent
List all experiments in the project.
Show {limit} experiments starting at cursor {cursor}.
POST /api/1/experiments Create an A/B test experiment · Amplitude Create an Experiment #
Ask an LLM
“How do I create a new A/B test with its own variants?”
“Can I choose the bucketing key when setting up an experiment?”
Tell an agent
Create an experiment with key {key}.
Create experiment {key} named {name} with variants {variants}.
GET /api/1/experiments/{id} Get an experiment's configuration · Amplitude Get an Experiment #
Ask an LLM
“What variants and targeting does a specific experiment have?”
“Can I fetch one experiment's full configuration by ID?”
Tell an agent
Get experiment {id}.
Show the full configuration of experiment {id}.
PATCH /api/1/experiments/{id} Update an experiment's configuration · Amplitude Update an Experiment #
Ask an LLM
“Can I rename an existing experiment or change its variants?”
“Is it possible to disable an experiment without deleting it?”
Tell an agent
Rename experiment {id} to {name}.
Set experiment {id} enabled to {enabled}.

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:amplitude-experiments-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. 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:
  parameters:
    experimentId:
      name: id
      in: path
      required: true
      description: The unique identifier of the experiment.
      schema:
        type: string
  schemas:
    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.
    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'
    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
    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.
    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.
  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