Leanplum A/B Tests API

The A/B Tests API from Leanplum — 3 operation(s) for a/b tests.

Operations 3

GET /api?action=getAbTest getAbTest #
GET /api?action=getAbTests getAbTests #
GET /api?action=getVariant getVariant #

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/leanplum-a-b-tests-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

leanplum-a-b-tests-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: '1.0'
  title: A/B Tests API
  description: An API to perform actions from a server or remote device.
servers:
- url: https://api.leanplum.com
- url: http://api.leanplum.com
security:
- appIdQuery: []
- clientKeyQuery: []
tags:
- name: A/B Tests
paths:
  /api?action=getAbTest:
    get:
      tags:
      - A/B Tests
      summary: getAbTest
      description: Gets information about an A/B test. This method requires your content read-only API `clientKey`.
      parameters:
      - name: appId
        in: query
        required: true
        description: The application ID. To find yours, select your app in the navigation column, and click Manage Apps. Then click Keys & Settings.
        schema:
          type: string
          default: YOUR_APP_ID
      - name: clientKey
        in: query
        required: true
        description: The Content Read-only key for your Leanplum App.
        schema:
          type: string
          default: YOUR_CONTENT_KEY
      - name: apiVersion
        in: query
        required: true
        description: The version of the Leanplum API to use. The current version is 1.0.6.
        schema:
          type: string
          enum:
          - 1.0.6
          default: 1.0.6
      - name: id
        in: query
        description: The numeric A/B test ID.
        required: true
        schema:
          type: number
          format: integer
      - name: includeDrafts
        in: query
        description: 'Include drafts and unpublished changes. Default: `false`.

          '
        required: false
        schema:
          type: boolean
      responses:
        default:
          description: A successful response will return details about an A/B test.
          content:
            application/json:
              schema:
                type: object
                properties:
                  response:
                    type: array
                    items: {}
                  response[].success:
                    description: Whether the request was *received*. Verify that the response has neither `warning` or `error` objects to confirm the action was taken. See [here](#responses) for more.
                    type: boolean
                  response[].abTest:
                    type: object
                    description: An A/B test object.
                    properties:
                      id:
                        type: integer
                        description: The A/B test ID.
                      name:
                        type: string
                        description: The name of the A/B test.
                      active:
                        type: boolean
                        description: Whether the A/B test is running in production.
                      created:
                        type: number
                        format: float
                        description: Unix timestamp of when the A/B test was created.
                      updated:
                        type: number
                        format: float
                        description: Unix timestamp of when the A/B test was last updated.
                      finished:
                        type: number
                        format: float
                        description: Unix timestamp of when the A/B test was finished (optional).
                      chosenVariant:
                        type: number
                        format: float
                        description: The id number of the variant you selected as the winner of the A/B test (optional).
                      targetingSticky:
                        type: boolean
                        description: Whether the targeting for the test was sticky (magnet button on).
                      state:
                        type: string
                        description: The current status of the A/B test, e.g. active, inactive, finished.
                      variants:
                        type: array
                        description: A list of variant objects for the A/B test.
                        items: {}
                      variants[].id:
                        type: integer
                        description: The ID of the variant.
                      variants[].name:
                        type: string
                        description: The name of the variant.
                      variants[].percent:
                        type: number
                        format: float
                        description: The percentage of new users to allocate to this variant.
                      variants[].variables:
                        type: array
                        description: A list of any variables in the test.
                        items: {}
                      variants[].variables[].name:
                        type: string
                        description: The name of the variable being tested.
                      variants[].variables[].value:
                        type: string
                        description: The variable value assigned to this variant.
                  response[].abTest.details:
                    type: object
                    description: Contains info about the users who created/last updated the test.
                  response[].abTest.details.publishedBy:
                    type: string
                    description: The username or email address of the Leanplum user who published the test.
                  response[].abTest.details.createdBy:
                    type: string
                    description: The username or email address of the Leanplum user who created the test.
      deprecated: false
      operationId: getApi?action=getAbTest
      x-operation-id-source: derived
  /api?action=getAbTests:
    get:
      tags:
      - A/B Tests
      summary: getAbTests
      description: Gets information about A/B tests. This method requires your content read-only API `clientKey`.
      parameters:
      - name: appId
        in: query
        required: true
        description: The application ID. To find yours, select your app in the navigation column, and click Manage Apps. Then click Keys & Settings.
        schema:
          type: string
          default: YOUR_APP_ID
      - name: clientKey
        in: query
        required: true
        description: The Content Read-only key for your Leanplum App.
        schema:
          type: string
          default: YOUR_CONTENT_KEY
      - name: apiVersion
        in: query
        required: true
        description: The version of the Leanplum API to use. The current version is 1.0.6.
        schema:
          type: string
          enum:
          - 1.0.6
          default: 1.0.6
      - name: includeDrafts
        in: query
        required: false
        description: 'Include drafts and unpublished changes. Default: `false`.

          '
        schema:
          type: boolean
      - name: recent
        in: query
        required: false
        description: 'Only return information about active or recently finished A/B tests. Default: `true`.

          '
        schema:
          type: boolean
      responses:
        default:
          description: A successful response will return a list of A/B tests.
          content:
            application/json:
              schema:
                type: object
                properties:
                  response:
                    type: array
                    items: {}
                  response[].success:
                    description: Whether the request was *received*. Verify that the response has neither `warning` or `error` objects to confirm the action was taken. See [here](#responses) for more.
                    type: boolean
                  response[].abTests:
                    type: array
                    description: A list of A/B test objects.
                    items: {}
                  response[].abTests[]:
                    type: object
                    description: An A/B test object.
                    properties:
                      id:
                        type: integer
                        description: The A/B test ID.
                      name:
                        type: string
                        description: The name of the A/B test.
                      active:
                        type: boolean
                        description: Whether the A/B test is running in production.
                      created:
                        type: number
                        format: float
                        description: Unix timestamp of when the A/B test was created.
                      updated:
                        type: number
                        format: float
                        description: Unix timestamp of when the A/B test was last updated.
                      finished:
                        type: number
                        format: float
                        description: Unix timestamp of when the A/B test was finished (optional).
                      chosenVariant:
                        type: number
                        format: float
                        description: The id number of the variant you selected as the winner of the A/B test (optional).
                      targetingSticky:
                        type: boolean
                        description: Whether the targeting for the test was sticky (magnet button on).
                      state:
                        type: string
                        description: The current status of the A/B test, e.g. active, inactive, finished.
                      variants:
                        type: array
                        description: A list of variant objects for the A/B test.
                        items: {}
                      variants[].id:
                        type: integer
                        description: The ID of the variant.
                      variants[].name:
                        type: string
                        description: The name of the variant.
                      variants[].percent:
                        type: number
                        format: float
                        description: The percentage of new users to allocate to this variant.
                      variants[].variables:
                        type: array
                        description: A list of any variables in the test.
                        items: {}
                      variants[].variables[].name:
                        type: string
                        description: The name of the variable being tested.
                      variants[].variables[].value:
                        type: string
                        description: The variable value assigned to this variant.
      deprecated: false
      operationId: getApi?action=getAbTests
      x-operation-id-source: derived
  /api?action=getVariant:
    get:
      tags:
      - A/B Tests
      summary: getVariant
      description: Gets information about an A/B test variant. This method requires your content read-only API `clientKey`.
      parameters:
      - name: appId
        in: query
        required: true
        description: The application ID. To find yours, select your app in the navigation column, and click Manage Apps. Then click Keys & Settings.
        schema:
          type: string
          default: YOUR_APP_ID
      - name: clientKey
        in: query
        required: true
        description: The Content Read-only key for your Leanplum App.
        schema:
          type: string
          default: YOUR_CONTENT_KEY
      - name: apiVersion
        in: query
        required: true
        description: The version of the Leanplum API to use. The current version is 1.0.6.
        schema:
          type: string
          enum:
          - 1.0.6
          default: 1.0.6
      - name: id
        in: query
        description: The numeric variant ID.
        required: true
        schema:
          type: number
          format: integer
      - name: includeDrafts
        in: query
        description: 'Include drafts and unpublished changes. Default: `false`.

          '
        required: false
        schema:
          type: boolean
      responses:
        default:
          description: A successful response will return details about a variant.
          content:
            application/json:
              schema:
                type: object
                properties:
                  response:
                    type: array
                    items: {}
                  response[].success:
                    description: Whether the request was *received*. Verify that the response has neither `warning` or `error` objects to confirm the action was taken. See [here](#responses) for more.
                    type: boolean
                  response[].variant:
                    type: object
                    description: A variant object.
                    properties:
                      id:
                        type: integer
                        description: The ID of the variant.
                      name:
                        type: string
                        description: The name of the variant.
                      percent:
                        type: number
                        format: float
                        description: The percentage of new users to allocate.
                      variables:
                        type: array
                        description: A list of any variables in the test.
                        items: {}
                      variables[].name:
                        type: string
                        description: The name of the variable in the test.
                      variables[].value:
                        type: string
                        description: The variable value assigned to this variant.
      deprecated: false
      operationId: getApi?action=getVariant
      x-operation-id-source: derived
components:
  securitySchemes:
    appIdQuery:
      type: apiKey
      in: query
      name: appId
      description: The application ID. To find yours, select your app in the navigation column, and click Edit Apps. Under Keys, click Show.
    clientKeyQuery:
      type: apiKey
      in: query
      name: clientKey
      description: The client access key. Must be either your production, development, read-only, or data export key, depending on which API method you want to use.
x-api-id: leanplum-api
x-send-defaults: true
x-explorer-enabled: false
x-samples-enabled: false
x-readme:
  proxy-enabled: true